From 392ea1f2d9aba58db2e5ce7f330e0f3b9a20460d Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 17 Oct 2023 15:04:52 -0700 Subject: [PATCH] Build compiler playground as part of GitHub CI (take 2) (#4470) Summary: We reverted this in https://github.com/facebook/relay/commit/6911daa825956038ba3b12286eda1d5776f31992 because it was failing in CI. Can't repro locally, so trying again on GitHub to see what the error looks like. Pull Request resolved: https://github.com/facebook/relay/pull/4470 Reviewed By: tyao1 Differential Revision: D50383749 Pulled By: captbaritone fbshipit-source-id: 57dff308c675af9a4b1622264c41edce27945401 --- .github/workflows/docusaurus.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/docusaurus.yml b/.github/workflows/docusaurus.yml index d72c7b8c941ca..3dfc2b379c6f5 100644 --- a/.github/workflows/docusaurus.yml +++ b/.github/workflows/docusaurus.yml @@ -11,17 +11,48 @@ on: - main jobs: + build-compiler-explorer: + name: Build Compiler Explorer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.73.0 # We hit an LLVM error building Wasm on 1.72 + override: true + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - name: "Build Compiler Playground Wasm NPM package" + run: RUST_LOG=debug wasm-pack build --target web + working-directory: ./compiler/crates/relay-compiler-playground + - uses: actions/upload-artifact@v3 + with: + name: compiler-playground-package + path: compiler/crates/relay-compiler-playground/pkg/ + build-and-deploy: runs-on: ubuntu-latest + needs: [build-compiler-explorer] steps: - name: Checkout uses: actions/checkout@v2.3.1 with: persist-credentials: false + - name: Download Compiler Explorer + uses: actions/download-artifact@v2 + with: + name: compiler-playground-package + path: tmp/compiler-playground-package + + - name: Link Compiler Explorer + run: yarn link + working-directory: tmp/compiler-playground-package + - name: Install and Build run: | yarn + yarn link relay-compiler-playground yarn build working-directory: website/