5
5
tags-ignore : [dev]
6
6
pull_request :
7
7
branches : [main]
8
+ workflow_dispatch :
8
9
defaults :
9
10
run :
10
11
shell : bash
53
54
- run : cargo clippy --no-deps --all-features -p example-tests -- -D warnings
54
55
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-externref-xform -- -D warnings
55
56
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p wasm-bindgen-futures -- -D warnings
56
- - run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p js-sys -- -D warnings
57
57
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-macro -- -D warnings
58
58
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-macro-support -- -D warnings
59
59
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-multi-value-xform -- -D warnings
@@ -66,11 +66,30 @@ jobs:
66
66
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-wasm-interpreter -- -D warnings
67
67
- run : cargo clippy --no-deps --all-features -p wasm-bindgen-webidl -- -D warnings
68
68
- run : cargo clippy --no-deps --all-features -p webidl-tests -- -D warnings
69
+ - run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p wasm-bindgen-benchmark -- -D warnings
70
+
71
+ # Run `cargo clippy` over web-sys and js-sys crates
72
+ clippy_web_sys :
73
+ name : Clippy (web-sys)
74
+ runs-on : ubuntu-latest
75
+ steps :
76
+ - uses : actions/checkout@v4
77
+ - run : rustup update --no-self-update stable && rustup default stable
78
+ - run : rustup target add wasm32-unknown-unknown
79
+ - run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p js-sys -- -D warnings
69
80
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p web-sys -- -D warnings
81
+
82
+ # Run `cargo clippy` over the project
83
+ clippy_project :
84
+ name : Clippy (project)
85
+ runs-on : ubuntu-latest
86
+ steps :
87
+ - uses : actions/checkout@v4
88
+ - run : rustup update --no-self-update stable && rustup default stable
89
+ - run : rustup target add wasm32-unknown-unknown
70
90
- run : cargo clippy --no-deps --no-default-features --target wasm32-unknown-unknown -- -D warnings
71
91
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -- -D warnings
72
92
- run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown --tests -- -D warnings
73
- - run : cargo clippy --no-deps --all-features --target wasm32-unknown-unknown -p wasm-bindgen-benchmark -- -D warnings
74
93
- run : for i in examples/*/; do cd "$i"; cargo +stable clippy --no-deps --all-features --target wasm32-unknown-unknown -- -D warnings || exit 1; cd ../..; done
75
94
76
95
test_wasm_bindgen :
@@ -87,12 +106,52 @@ jobs:
87
106
node-version : ' 20'
88
107
- uses : ./.github/actions/setup-geckodriver
89
108
- run : cargo test --target wasm32-unknown-unknown
109
+ - run : cargo test --target wasm32-unknown-unknown -p wasm-bindgen-futures
110
+
111
+ test_wasm_bindgen_features :
112
+ name : " Run wasm-bindgen crate tests with different features"
113
+ runs-on : ubuntu-latest
114
+ env :
115
+ WASM_BINDGEN_SPLIT_LINKED_MODULES : 1
116
+ steps :
117
+ - uses : actions/checkout@v4
118
+ - run : rustup update --no-self-update stable && rustup default stable
119
+ - run : rustup target add wasm32-unknown-unknown
120
+ - uses : actions/setup-node@v4
121
+ with :
122
+ node-version : ' 20'
123
+ - uses : ./.github/actions/setup-geckodriver
90
124
- run : cargo test --target wasm32-unknown-unknown --features serde-serialize
91
125
- run : cargo test --target wasm32-unknown-unknown --features enable-interning
92
- - run : cargo test --target wasm32-unknown-unknown -p wasm-bindgen-futures
126
+
127
+ test_wasm_bindgen_wasm :
128
+ name : " Run wasm-bindgen wasm test"
129
+ runs-on : ubuntu-latest
130
+ env :
131
+ WASM_BINDGEN_SPLIT_LINKED_MODULES : 1
132
+ steps :
133
+ - uses : actions/checkout@v4
134
+ - run : rustup update --no-self-update stable && rustup default stable
135
+ - run : rustup target add wasm32-unknown-unknown
136
+ - uses : actions/setup-node@v4
137
+ with :
138
+ node-version : ' 20'
93
139
- run : cargo test --target wasm32-unknown-unknown --test wasm
94
140
env :
95
141
WASM_BINDGEN_NO_DEBUG : 1
142
+
143
+ test_wasm_bindgen_envs :
144
+ name : " Run wasm-bindgen crate tests with various environment variables"
145
+ runs-on : ubuntu-latest
146
+ env :
147
+ WASM_BINDGEN_SPLIT_LINKED_MODULES : 1
148
+ steps :
149
+ - uses : actions/checkout@v4
150
+ - run : rustup update --no-self-update stable && rustup default stable
151
+ - run : rustup target add wasm32-unknown-unknown
152
+ - uses : actions/setup-node@v4
153
+ with :
154
+ node-version : ' 20'
96
155
- run : cargo test --target wasm32-unknown-unknown
97
156
env :
98
157
WASM_BINDGEN_EXTERNREF : 1
@@ -171,7 +230,31 @@ jobs:
171
230
- run : cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features Node
172
231
- run : cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features Element
173
232
- run : cargo build --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --features Window
233
+
234
+ test_web_sys_all_features :
235
+ name : " Run web-sys crate tests with all features"
236
+ runs-on : ubuntu-latest
237
+ steps :
238
+ - uses : actions/checkout@v4
239
+ - run : rustup update --no-self-update stable && rustup default stable
240
+ - run : rustup target add wasm32-unknown-unknown
241
+ - uses : actions/setup-node@v4
242
+ with :
243
+ node-version : ' 20'
244
+ - uses : ./.github/actions/setup-geckodriver
174
245
- run : cargo test --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
246
+
247
+ test_web_sys_all_features_unstable :
248
+ name : " Run web-sys crate tests with all features and unstable APIs"
249
+ runs-on : ubuntu-latest
250
+ steps :
251
+ - uses : actions/checkout@v4
252
+ - run : rustup update --no-self-update stable && rustup default stable
253
+ - run : rustup target add wasm32-unknown-unknown
254
+ - uses : actions/setup-node@v4
255
+ with :
256
+ node-version : ' 20'
257
+ - uses : ./.github/actions/setup-geckodriver
175
258
- run : cargo test --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
176
259
env :
177
260
RUSTFLAGS : --cfg=web_sys_unstable_apis
@@ -448,7 +531,7 @@ jobs:
448
531
- uses : actions/checkout@v4
449
532
- run : rustup update --no-self-update 1.57 && rustup default 1.57
450
533
- run : cargo build
451
-
534
+
452
535
msrv-cli :
453
536
name : Check MSRV for CLI tools
454
537
runs-on : ubuntu-latest
@@ -459,12 +542,13 @@ jobs:
459
542
- uses : actions/checkout@v4
460
543
- run : rustup update --no-self-update 1.76 && rustup default 1.76
461
544
- run : cargo build
462
-
545
+
463
546
464
547
deploy :
465
548
permissions :
466
549
contents : write # to push changes in repo (jamesives/github-pages-deploy-action)
467
550
551
+ if : github.repository == 'rustwasm/wasm-bindgen'
468
552
needs :
469
553
- doc_api
470
554
- doc_book
0 commit comments