Skip to content

Commit

Permalink
Enable testing on Node.js with atomics
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 10, 2024
1 parent 455d693 commit 95ef78a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
browser: true,
service-worker: true,
}
- { browser: false }
- { name: WASM_BINDGEN_USE_NODE_EXPERIMENTAL, browser: false }
include:
- target: { target: x86_64-unknown-linux-gnu }
rust: { version: stable }
Expand All @@ -106,17 +106,16 @@ jobs:
# Firefox doesn't support module service workers.
- driver: { firefox: true }
environment: { service-worker: true }
# `wasm-bindgen` support of Node.js with atomics is incomplete.
- driver: { nodejs: true }
rust: { atomics: true }

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install `wasm-bindgen-cli`
uses: taiki-e/install-action@v2
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: wasm-bindgen-cli
git: https://github.com/daxpedda/wasm-bindgen
rev: 9dc93d8c096cdb50c2c2d8a181f337ddfa927517
- name: Install Rust
run: |
rustup toolchain install ${{ matrix.rust.version }} --profile minimal ${{ matrix.rust.component }} --target ${{ matrix.target.target }}
Expand All @@ -131,7 +130,7 @@ jobs:
if: matrix.driver.browser == true
run: echo "${{ matrix.driver.name }}=${{ matrix.driver.value }}" >> $GITHUB_ENV
- name: Set Environment
if: matrix.environment.browser == true
if: matrix.environment.browser == true || matrix.environment.nodejs == true
run: echo "${{ matrix.environment.name }}=1" >> $GITHUB_ENV
- name: Test
env:
Expand Down
2 changes: 1 addition & 1 deletion tests-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ web-sys = { version = "0.3", default-features = false, features = [
"console",
"OfflineAudioContext",
] }
web-thread = { git = "https://github.com/daxpedda/wasm-worker", rev = "93236ab92354cbe0a0c07e71b9888be8b3e45999", optional = true, features = [
web-thread = { git = "https://github.com/daxpedda/wasm-worker", rev = "ce376d95dbdd9e7b59ac7de9c6f14090076f7865", optional = true, features = [
"audio-worklet",
] }

Expand Down

0 comments on commit 95ef78a

Please sign in to comment.