Skip to content

Commit

Permalink
(ci) Add test_emscripten stage
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Dec 7, 2023
1 parent 63acb03 commit c233a2b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,36 @@ jobs:
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: ubuntu-latest
target: wasm32-unknown-emscripten
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- name: Install emscripten (wasm32-unknown-emscripten)
if: ${{ matrix.target == 'wasm32-unknown-emscripten' }}
- name: Run ${{ matrix.lua }} tests
run: |
cargo test --manifest-path testcrate/Cargo.toml --release --features ${{ matrix.lua }}
shell: bash

test_emscripten:
name: Test emscripten
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
lua: [lua54, lua53, lua52, lua51]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-emscripten
- name: Install emscripten
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends emscripten
echo 'CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node' >> $GITHUB_ENV
echo 'RUSTFLAGS="-C link-args=-sERROR_ON_UNDEFINED_SYMBOLS=0"' >> $GITHUB_ENV
shell: bash
- name: Run ${{ matrix.lua }} tests
run: |
export CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node
cargo test --manifest-path testcrate/Cargo.toml --release --features ${{ matrix.lua }}
shell: bash

Expand Down

0 comments on commit c233a2b

Please sign in to comment.