✅ Added check for impl Chunk
trait at compile time
#6241
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Webassembly | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
jobs: | |
test: | |
name: Test WebAssembly | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
target: | |
- wasm32-unknown-emscripten | |
- wasm32-unknown-unknown | |
- wasm32-wasip1 | |
include: | |
- target: wasm32-unknown-emscripten | |
container: emscripten/emsdk:latest | |
- target: wasm32-unknown-unknown | |
container: ghcr.io/portable-network-archive/wasi-sdk-gh-actions:wasi-sdk-25 | |
- target: wasm32-wasip1 | |
container: ghcr.io/portable-network-archive/wasi-sdk-gh-actions:wasi-sdk-25 | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
toolchain: ${{ matrix.rust }} | |
rustflags: '' | |
- if: ${{ startsWith(matrix.target, 'wasm32-wasi') }} | |
name: Setup wasmtime | |
uses: bytecodealliance/actions/wasmtime/setup@v1 | |
with: | |
github_token: ${{ github.token }} | |
- if: ${{ startsWith(matrix.target, 'wasm32-wasi') && matrix.rust != 'nightly' }} | |
name: Run test | |
run: | | |
cargo test -p libpna --target ${{ matrix.target }} -- --nocapture | |
- if: ${{ startsWith(matrix.target, 'wasm32-wasi') && matrix.rust == 'nightly'}} | |
name: Run test | |
run: | | |
cargo test --target ${{ matrix.target }} -- --nocapture | |
- if: ${{ startsWith(matrix.target, 'wasm32-unknown-emscripten') }} | |
name: Run test | |
run: | | |
cargo test -p libpna --target ${{ matrix.target }} -- --skip test_readme_deps --skip test_html_root_url | |
env: | |
RUSTFLAGS: "-C link-arg=-sINITIAL_MEMORY=512MB -C link-arg=-sTOTAL_STACK=16MB" | |
- if: ${{ endsWith(matrix.target, 'unknown') }} | |
name: get wasm-bindgen version | |
id: get_version | |
run: | | |
VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "wasm-bindgen") | .version') | |
echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
- if: ${{ endsWith(matrix.target, 'unknown') }} | |
name: Install cargo-binstall | |
uses: cargo-bins/cargo-binstall@v1.10.22 | |
- if: ${{ endsWith(matrix.target, 'unknown') }} | |
name: Install wasm-bindgen-cli from crates.io | |
run: | | |
cargo binstall --no-confirm --force wasm-bindgen-cli --version ${{ steps.get_version.outputs.version }} | |
- if: ${{ endsWith(matrix.target, 'unknown') }} | |
name: Run test | |
run: | | |
cargo test -p libpna --target ${{ matrix.target }} --release |