Skip to content

Commit

Permalink
Test emscripten via Cross (#302)
Browse files Browse the repository at this point in the history
Part of addressing #275 

Signed-off-by: Joe Richey <joerichey@google.com>
  • Loading branch information
josephlr committed Oct 22, 2022
1 parent d2ca769 commit ce5c2d9
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
aarch64-unknown-linux-gnu,
aarch64-linux-android,
mips-unknown-linux-gnu,
wasm32-unknown-emscripten,
]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -237,41 +238,6 @@ jobs:
mv /tmp/wasmtime ~/.cargo/bin
- run: cargo test --target wasm32-wasi

emscripten-tests:
name: Emscripten tests
runs-on: ubuntu-latest
env:
EMSDK_VERSION: 1.39.20 # Last emsdk compatible with Rust's LLVM 11
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: rustup target add wasm32-unknown-emscripten
- run: rustup target add asmjs-unknown-emscripten
- uses: Swatinem/rust-cache@v1
- name: Cache emsdk
id: cache-emsdk
uses: actions/cache@v2
with:
path: ~/emsdk
key: ${{ runner.os }}-${{ env.EMSDK_VERSION }}-emsdk
- name: Install emsdk
if: steps.cache-emsdk.outputs.cache-hit != 'true'
run: |
git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
cd ~/emsdk
./emsdk install $EMSDK_VERSION
./emsdk activate $EMSDK_VERSION
- run: echo "$HOME/emsdk/upstream/emscripten" >> $GITHUB_PATH
- name: wasm test
run: cargo test --target=wasm32-unknown-emscripten --features=std
- name: asm.js test
run: | # Debug info breaks on asm.js
RUSTFLAGS="$RUSTFLAGS -C debuginfo=0"
cargo test --target=asmjs-unknown-emscripten --features=std
build:
name: Build only
runs-on: ubuntu-latest
Expand Down

0 comments on commit ce5c2d9

Please sign in to comment.