🐛 Avoid panic in liblzma::bufferd::XzEncoder::read
#392
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: [push, pull_request] | |
jobs: | |
test: | |
name: Test WebAssembly | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
target: | |
- wasm32-unknown-emscripten | |
- wasm32-unknown-unknown | |
- wasm32-wasi | |
- 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-20 | |
- target: wasm32-unknown-unknown | |
- target: wasm32-wasi | |
container: ghcr.io/portable-network-archive/wasi-sdk-gh-actions:wasi-sdk-20 | |
- target: wasm32-wasi | |
- target: wasm32-wasip1 | |
container: ghcr.io/portable-network-archive/wasi-sdk-gh-actions:wasi-sdk-20 | |
- target: wasm32-wasip1 | |
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 }} | |
- 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') }} | |
name: Run test | |
run: | | |
cargo test --target ${{ matrix.target }} --features wasm -- --skip standard_files | |
- if: ${{ !startsWith(matrix.target, 'wasm32-wasi') }} | |
name: Run build | |
run: | | |
cargo build --target ${{ matrix.target }} --features wasm | |
- name: Run test | |
if: ${{ startsWith(matrix.target, 'wasm32-unknown-emscripten') }} | |
run: | | |
cargo test --target ${{ matrix.target }} --features wasm -- --skip standard_files | |
env: | |
RUSTFLAGS: "-C link-args=-sINITIAL_MEMORY=128MB" |