From a5acc425a669fd9f86fe6b334319a0a602341841 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 1 Aug 2024 14:57:42 +0200 Subject: [PATCH] ci: add job for building and uploading tlsn-wasm build result --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37aac76956..612f4c19a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,8 +58,8 @@ jobs: - name: Test run: cargo test - build-wasm: - name: Build and test wasm + test-wasm: # Browser/no-bundler + name: Test wasm runs-on: ubuntu-latest steps: - name: Checkout repository @@ -93,6 +93,42 @@ jobs: run: | cd crates/wasm-test-runner RUST_LOG=debug ./run.sh + tlsn-wasm: + name: Build wasm + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install stable rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + toolchain: stable + + - name: Install nightly rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown,x86_64-unknown-linux-gnu + toolchain: nightly + components: rust-src + + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + - name: Use caching + uses: Swatinem/rust-cache@v2.7.3 + + - name: Run build + run: | + cd crates/wasm + RUST_LOG=debug ./build.sh + - name: Save artifacts + uses: actions/upload-artifact@v4 + with: + name: tlsn-wasm-pkg + path: ./crates/wasm/pkg + if-no-files-found: error tests-integration: name: Run tests release build runs-on: ubuntu-latest