From cf96fe7673cd3ecdff2e1edd9efe5f9740720c66 Mon Sep 17 00:00:00 2001 From: Jose Daniel Hernandez Date: Thu, 26 Jan 2023 14:54:26 -0600 Subject: [PATCH] ci: Add a job in the `build+test` GH actions workflow Add a job in the `build+test` Github Actions workflow for compiling to `wasm` and generating the JS bindings for the `web-client` --- .github/workflows/build+test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/build+test.yml b/.github/workflows/build+test.yml index 83e5e0f3b1..6b3017793a 100644 --- a/.github/workflows/build+test.yml +++ b/.github/workflows/build+test.yml @@ -110,6 +110,36 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} args: --release --all-features + web-client: + runs-on: ubuntu-20.04 + + steps: + - name: "Free up disk space" + run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ hashFiles('**/Cargo.toml') }} + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Install Protoc + run: sudo apt-get install protobuf-compiler + - name: Install wasm-pack + uses: actions-rs/cargo@v1 + with: + command: install + args: wasm-pack + - name: Compile to wasm and generate bindings + working-directory: ./web-client + run: wasm-pack build --target web + reconnect-test: runs-on: ubuntu-20.04