29
29
- run : rustup update --no-self-update stable && rustup default stable
30
30
- run : rustup component add rustfmt
31
31
- run : cargo fmt --all -- --check
32
-
32
+
33
33
# Check TOML style by using Taplo.
34
34
taplo :
35
35
name : Taplo
@@ -68,12 +68,12 @@ jobs:
68
68
- run : cargo clippy --no-deps --all-features -p example-tests -- -D warnings
69
69
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-externref-xform -- -D warnings
70
70
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p wasm-bindgen-futures -- -D warnings
71
- - run : cargo clippy --no-deps --features spans,strict-macro -p wasm-bindgen-macro -- -D warnings
72
- - run : cargo clippy --no-deps --features extra-traits,spans,strict-macro -p wasm-bindgen-macro-support -- -D warnings
71
+ - run : cargo clippy --no-deps --all-features -p wasm-bindgen-macro -- -D warnings
72
+ - run : cargo clippy --no-deps --all-features -p wasm-bindgen-macro-support -- -D warnings
73
73
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-multi-value-xform -- -D warnings
74
74
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-shared -- -D warnings
75
75
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p wasm-bindgen-test -- -D warnings
76
- - run : cargo clippy --no-deps -p wasm-bindgen-test-macro -- -D warnings
76
+ - run : cargo clippy --no-deps --all-features - p wasm-bindgen-test-macro -- -D warnings
77
77
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-threads-xform -- -D warnings
78
78
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p typescript-tests -- -D warnings
79
79
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-wasm-conventions -- -D warnings
@@ -121,8 +121,8 @@ jobs:
121
121
- run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p wasm-bindgen -Zbuild-std=core,alloc -- -D warnings
122
122
- run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p js-sys -Zbuild-std=core,alloc -- -D warnings
123
123
- run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p web-sys -Zbuild-std=core,alloc -- -D warnings
124
- - run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p wasm-bindgen-futures --features once_cell/critical-section - Zbuild-std=core,alloc -- -D warnings
125
- - run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p wasm-bindgen-test --features once_cell/critical-section - Zbuild-std=core,alloc -- -D warnings
124
+ - run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p wasm-bindgen-futures -Zbuild-std=core,alloc -- -D warnings
125
+ - run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -p wasm-bindgen-test -Zbuild-std=core,alloc -- -D warnings
126
126
127
127
# Run `cargo clippy` over the project
128
128
clippy_project :
@@ -206,15 +206,16 @@ jobs:
206
206
test_threads :
207
207
name : " Run wasm-bindgen crate tests with multithreading"
208
208
runs-on : ubuntu-latest
209
+ env :
210
+ WASM_BINDGEN_SPLIT_LINKED_MODULES : 1
209
211
steps :
210
212
- uses : actions/checkout@v4
211
213
- run : rustup default nightly-2024-07-06
212
214
- run : rustup target add wasm32-unknown-unknown
213
215
- run : rustup component add rust-src
214
- # Note: we only run the browser tests here, because wasm-bindgen doesn't support threading in Node yet.
215
216
- run : |
216
217
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
217
- cargo test --target wasm32-unknown-unknown --test headless - Z build-std=std,panic_abort
218
+ cargo test --target wasm32-unknown-unknown -Z build-std=std,panic_abort
218
219
219
220
# I don't know why this is failing so comment this out for now, but ideally
220
221
# this would be figured out at some point and solved.
@@ -239,6 +240,22 @@ jobs:
239
240
# WBINDGEN_I_PROMISE_JS_SYNTAX_WORKS_IN_NODE: 1
240
241
# - run: cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features "Node Window Document"
241
242
243
+ # This checks that the output of the CLI is actually valid JavaScript and TypeScript
244
+ test_cli_reference_typescript :
245
+ name : Run CLI reference TypeScript check
246
+ runs-on : ubuntu-latest
247
+ steps :
248
+ - uses : actions/checkout@v4
249
+ - uses : actions/setup-node@v4
250
+ with :
251
+ node-version : ' lts/*'
252
+ - run : npm i -g typescript
253
+ - run : npm i --save @types/node @types/deno
254
+ - name : Check TypeScript output
255
+ run : tsc --noEmit --skipLibCheck --lib esnext,dom $(echo crates/cli/tests/reference/*.d.ts)
256
+ - name : Check JavaScript output
257
+ run : tsc --noEmit --skipLibCheck --lib esnext,dom --module esnext --allowJs $(echo crates/cli/tests/reference/*.js)
258
+
242
259
test_native :
243
260
name : Run native tests
244
261
runs-on : ubuntu-latest
@@ -325,7 +342,7 @@ jobs:
325
342
runs-on : ubuntu-latest
326
343
steps :
327
344
- uses : actions/checkout@v4
328
- - run : rustup update --no-self-update 1.76 .0 && rustup default 1.76 .0
345
+ - run : rustup update --no-self-update 1.78 .0 && rustup default 1.78 .0
329
346
- run : cargo test -p wasm-bindgen-macro
330
347
- run : cargo test -p wasm-bindgen-test-macro
331
348
@@ -538,6 +555,35 @@ jobs:
538
555
name : doc_api
539
556
path : docs.tar.gz
540
557
558
+ msrv-resolver :
559
+ name : Check feature resolver version 1 compatibility
560
+ runs-on : ubuntu-latest
561
+ strategy :
562
+ fail-fast : false
563
+ matrix :
564
+ rust :
565
+ - 1.57
566
+ - stable
567
+ target :
568
+ - x86_64-unknown-linux-gnu
569
+ - wasm32-unknown-unknown
570
+ features :
571
+ - --no-default-features
572
+ - --no-default-features --features std
573
+ - --no-default-features --features msrv
574
+ - " "
575
+ defaults :
576
+ run :
577
+ working-directory : crates/msrv/resolver
578
+ steps :
579
+ - uses : actions/checkout@v4
580
+ - run : rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} && rustup target add ${{ matrix.target }}
581
+ - if : matrix.rust == '1.57'
582
+ run : |
583
+ cargo update -p bumpalo --precise 3.12.0
584
+ cargo update -p log --precise 0.4.18
585
+ - run : cargo build --target ${{ matrix.target }} ${{ matrix.features }}
586
+
541
587
msrv-lib :
542
588
name : Check MSRV for libraries
543
589
runs-on : ubuntu-latest
@@ -549,6 +595,8 @@ jobs:
549
595
- wasm32-unknown-unknown
550
596
features :
551
597
- --no-default-features
598
+ - --no-default-features --features std
599
+ - --no-default-features --features msrv
552
600
- " "
553
601
defaults :
554
602
run :
0 commit comments