-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests w/ fallback on wasm32-unknown-unknown #1114
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,8 +61,9 @@ jobs: | |
- run: cargo test --verbose --package rayon | ||
- run: cargo test --verbose --package rayon-core | ||
|
||
# wasm32-unknown-unknown builds, and even has the runtime fallback for | ||
# unsupported threading, but we don't have an environment to execute in. | ||
# wasm32-unknown-unknown has a runtime fallback for unsupported threading. | ||
# Proper threading needs more glue and is tested in wasm-bindgen-rayon, | ||
# but we can at least verify that all tests can run on Wasm with the fallback. | ||
wasm: | ||
name: WebAssembly (standalone) | ||
runs-on: ubuntu-latest | ||
|
@@ -71,7 +72,8 @@ jobs: | |
include: | ||
- toolchain: stable | ||
- toolchain: nightly | ||
cargoflags: --features web_spin_lock | ||
components: rust-src | ||
cargoflags: -Z build-std=panic_abort,std --features web_spin_lock | ||
rustflags: -C target-feature=+atomics,+bulk-memory,+mutable-globals | ||
env: | ||
RUSTFLAGS: ${{ matrix.rustflags }} | ||
|
@@ -80,8 +82,10 @@ jobs: | |
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: ${{ matrix.components }} | ||
targets: wasm32-unknown-unknown | ||
- run: cargo build --verbose --target wasm32-unknown-unknown ${{ matrix.cargoflags }} | ||
- uses: jetli/wasm-pack-action@v0.4.0 | ||
- run: wasm-pack test --chrome --headless -- --verbose ${{ matrix.cargoflags }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm probably. |
||
|
||
# wasm32-wasi can test the fallback by running in wasmtime. | ||
wasi: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wary of adding 3rd-party github actions -- can we just use the official installer like I did for
wasmtime
below?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a reasonably popular action, but, sure, we can use official installer too, especially since wasm-pack provides prebuilt binaries and doesn't need recompilation from source.