Skip to content

Commit ce5c2d9

Browse files
authored
Test emscripten via Cross (#302)
Part of addressing #275 Signed-off-by: Joe Richey <[email protected]>
1 parent d2ca769 commit ce5c2d9

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

.github/workflows/tests.yml

+1-35
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ jobs:
142142
aarch64-unknown-linux-gnu,
143143
aarch64-linux-android,
144144
mips-unknown-linux-gnu,
145+
wasm32-unknown-emscripten,
145146
]
146147
steps:
147148
- uses: actions/checkout@v2
@@ -237,41 +238,6 @@ jobs:
237238
mv /tmp/wasmtime ~/.cargo/bin
238239
- run: cargo test --target wasm32-wasi
239240

240-
emscripten-tests:
241-
name: Emscripten tests
242-
runs-on: ubuntu-latest
243-
env:
244-
EMSDK_VERSION: 1.39.20 # Last emsdk compatible with Rust's LLVM 11
245-
steps:
246-
- uses: actions/checkout@v2
247-
- uses: actions-rs/toolchain@v1
248-
with:
249-
profile: minimal
250-
toolchain: stable
251-
- run: rustup target add wasm32-unknown-emscripten
252-
- run: rustup target add asmjs-unknown-emscripten
253-
- uses: Swatinem/rust-cache@v1
254-
- name: Cache emsdk
255-
id: cache-emsdk
256-
uses: actions/cache@v2
257-
with:
258-
path: ~/emsdk
259-
key: ${{ runner.os }}-${{ env.EMSDK_VERSION }}-emsdk
260-
- name: Install emsdk
261-
if: steps.cache-emsdk.outputs.cache-hit != 'true'
262-
run: |
263-
git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
264-
cd ~/emsdk
265-
./emsdk install $EMSDK_VERSION
266-
./emsdk activate $EMSDK_VERSION
267-
- run: echo "$HOME/emsdk/upstream/emscripten" >> $GITHUB_PATH
268-
- name: wasm test
269-
run: cargo test --target=wasm32-unknown-emscripten --features=std
270-
- name: asm.js test
271-
run: | # Debug info breaks on asm.js
272-
RUSTFLAGS="$RUSTFLAGS -C debuginfo=0"
273-
cargo test --target=asmjs-unknown-emscripten --features=std
274-
275241
build:
276242
name: Build only
277243
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)