@@ -193,6 +193,7 @@ jobs:
193
193
audit : ${{ steps.calculate.outputs.audit }}
194
194
preview1-adapter : ${{ steps.calculate.outputs.preview1-adapter }}
195
195
run-dwarf : ${{ steps.calculate.outputs.run-dwarf }}
196
+ platform-checks : ${{ steps.calculate.outputs.platform-checks }}
196
197
steps :
197
198
- uses : actions/checkout@v4
198
199
- id : calculate
@@ -215,6 +216,8 @@ jobs:
215
216
run_full=true
216
217
elif grep -q 'prtest:debug' commits.log; then
217
218
echo run-dwarf=true >> $GITHUB_OUTPUT
219
+ elif grep -q 'prtest:platform-checks' commits.log; then
220
+ echo platform-checks=true >> $GITHUB_OUTPUT
218
221
fi
219
222
if grep -q crates.c-api names.log; then
220
223
echo test-capi=true >> $GITHUB_OUTPUT
@@ -256,6 +259,7 @@ jobs:
256
259
echo audit=true >> $GITHUB_OUTPUT
257
260
echo preview1-adapter=true >> $GITHUB_OUTPUT
258
261
echo run-dwarf=true >> $GITHUB_OUTPUT
262
+ echo platform-checks=true >> $GITHUB_OUTPUT
259
263
fi
260
264
261
265
# Build all documentation of Wasmtime, including the C API documentation,
@@ -440,29 +444,6 @@ jobs:
440
444
- uses : ./.github/actions/cancel-on-failure
441
445
if : failure()
442
446
443
- # Checks for no_std support, ensure that crates can build on a no_std target
444
- no_std_checks :
445
- name : no_std checks
446
- runs-on : ubuntu-latest
447
- env :
448
- CARGO_NDK_VERSION : 2.12.2
449
- steps :
450
- - uses : actions/checkout@v4
451
- with :
452
- submodules : true
453
- - uses : ./.github/actions/install-rust
454
-
455
- - run : rustup target add x86_64-unknown-none
456
- - run : cargo check --target x86_64-unknown-none -p wasmtime --no-default-features --features runtime,component-model
457
- - run : cargo check --target x86_64-unknown-none -p wasmtime --no-default-features --features runtime,gc,component-model
458
- - run : cargo check --target x86_64-unknown-none -p wasmtime --no-default-features --features runtime,gc,component-model,signals-based-traps
459
- - run : cargo check --target x86_64-unknown-none -p cranelift-control --no-default-features
460
- - run : cargo check --target x86_64-unknown-none -p pulley-interpreter --features encode,decode,disas,interp
461
-
462
- # common logic to cancel the entire run if this job fails
463
- - uses : ./.github/actions/cancel-on-failure
464
- if : failure()
465
-
466
447
# Check that Clippy lints are passing.
467
448
clippy :
468
449
name : Clippy
@@ -512,10 +493,6 @@ jobs:
512
493
env :
513
494
CARGO_PROFILE_DEV_DEBUG_ASSERTIONS : false
514
495
515
- # Check whether `wasmtime` cross-compiles to x86_64-unknown-freebsd
516
- - run : rustup target add x86_64-unknown-freebsd
517
- - run : cargo check --target x86_64-unknown-freebsd
518
-
519
496
# Re-vendor all WIT files and ensure that they're all up-to-date by ensuring
520
497
# that there's no git changes.
521
498
- name : Re-vendor WIT
@@ -531,44 +508,65 @@ jobs:
531
508
- uses : ./.github/actions/cancel-on-failure
532
509
if : failure()
533
510
534
- checks_illumos :
535
- name : Check illumos
536
- runs-on : ubuntu-latest
511
+ # Various checks that Wasmtime builds for a variety of platforms. Each
512
+ # platform may not include the entire dependency tree and maybe just a few
513
+ # features here and there, see the `include` matrix for more details.
514
+ platform_checks :
515
+ needs : determine
516
+ if : needs.determine.outputs.platform-checks
517
+ name : " Platform: ${{ matrix.target }}"
518
+ runs-on : ${{ matrix.os }}
519
+ strategy :
520
+ fail-fast : true
521
+ matrix :
522
+ include :
523
+ - target : x86_64-unknown-freebsd
524
+ os : ubuntu-latest
525
+ test : cargo check
526
+ - target : aarch64-pc-windows-msvc
527
+ os : windows-latest
528
+ test : cargo check
529
+ # While we're here testing a windows target also test a feature'd build
530
+ # on Windows. Note that this isn't covered by `micro_checks` above since
531
+ # that's for unix platforms, not Windows, so include a small check here
532
+ # which isn't the full `micro_checks` matrix but hopefully enough bang
533
+ # for our buck.
534
+ - target : i686-pc-windows-msvc
535
+ os : windows-latest
536
+ test : cargo check && cargo build -p wasmtime --no-default-features --features runtime
537
+ # This is used for general compatibility with `#![no_std]` targets and a
538
+ # variety of crates are tested here.
539
+ - target : x86_64-unknown-none
540
+ os : ubuntu-latest
541
+ test : >
542
+ cargo check -p wasmtime --no-default-features --features runtime,component-model &&
543
+ cargo check -p wasmtime --no-default-features --features runtime,gc,component-model &&
544
+ cargo check -p wasmtime --no-default-features --features runtime,gc,component-model,signals-based-traps &&
545
+ cargo check -p wasmtime --no-default-features --features runtime,gc,component-model,signals-based-traps &&
546
+ cargo check -p cranelift-control --no-default-features &&
547
+ cargo check -p pulley-interpreter --features encode,decode,disas,interp
548
+ # Use `cross` for illumos to have a C compiler/linker available.
549
+ - target : x86_64-unknown-illumos
550
+ os : ubuntu-latest
551
+ cross : true
552
+ test : cross build
553
+ - target : wasm32-wasip1
554
+ os : ubuntu-latest
555
+ test : cargo build --no-default-features --features compile,cranelift,all-arch
537
556
steps :
538
557
- uses : actions/checkout@v4
539
558
with :
540
559
submodules : true
541
560
- uses : ./.github/actions/install-rust
542
-
543
- # Check whether `wasmtime` cross-compiles to illumos. We need to use `cross` for this (even for
544
- # cargo check) because of non-Rust dependencies.
561
+ - run : rustup target add ${{ matrix.target }}
545
562
- name : Install cross
546
563
run : |
547
564
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
548
565
cargo binstall --no-confirm cross
549
- - name : Cross-compile to illumos
550
- run :
551
- cross build --target x86_64-unknown-illumos
552
-
553
- # common logic to cancel the entire run if this job fails
554
- - uses : ./.github/actions/cancel-on-failure
555
- if : failure()
556
-
557
- # Check whether `wasmtime` cross-compiles to aarch64-pc-windows-msvc
558
- # We don't build nor test it because it lacks trap handling.
559
- # Tracking issue: https://github.com/bytecodealliance/wasmtime/issues/4992
560
- checks_winarm64 :
561
- needs : determine
562
- if : needs.determine.outputs.run-full
563
- name : Check Windows ARM64
564
- runs-on : windows-latest
565
- steps :
566
- - uses : actions/checkout@v4
567
- with :
568
- submodules : true
569
- - uses : ./.github/actions/install-rust
570
- - run : rustup target add aarch64-pc-windows-msvc
571
- - run : cargo check -p wasmtime --target aarch64-pc-windows-msvc
566
+ if : ${{ matrix.cross }}
567
+ - run : ${{ matrix.test }}
568
+ env :
569
+ CARGO_BUILD_TARGET : ${{ matrix.target }}
572
570
573
571
# common logic to cancel the entire run if this job fails
574
572
- uses : ./.github/actions/cancel-on-failure
@@ -956,27 +954,6 @@ jobs:
956
954
- uses : ./.github/actions/cancel-on-failure
957
955
if : failure()
958
956
959
-
960
- build-wasmtime-target-wasm32 :
961
- name : Build wasmtime-target-wasm32
962
- if : needs.determine.outputs.run-full
963
- needs : determine
964
- runs-on : ubuntu-latest
965
- steps :
966
- - uses : actions/checkout@v4
967
- with :
968
- submodules : true
969
- - uses : ./.github/actions/install-rust
970
- - run : rustup target add wasm32-wasip1 wasm32-unknown-unknown
971
- - run : cargo build --target wasm32-wasip1 --no-default-features --features compile,cranelift,all-arch
972
- env :
973
- VERSION : ${{ github.sha }}
974
-
975
- # common logic to cancel the entire run if this job fails
976
- - uses : ./.github/actions/cancel-on-failure
977
- if : failure()
978
-
979
-
980
957
bench :
981
958
needs : determine
982
959
if : needs.determine.outputs.run-full
@@ -1171,19 +1148,16 @@ jobs:
1171
1148
- doc
1172
1149
- micro_checks
1173
1150
- fiber_tests
1174
- - no_std_checks
1175
1151
- clippy
1176
1152
- monolith_checks
1177
- - checks_illumos
1178
- - checks_winarm64
1153
+ - platform_checks
1179
1154
- bench
1180
1155
- meta_deterministic_check
1181
1156
- verify-publish
1182
1157
- determine
1183
1158
- miri
1184
1159
- build-preview1-component-adapter
1185
1160
- build-preview1-component-adapter-provider
1186
- - build-wasmtime-target-wasm32
1187
1161
- test-min-platform-example
1188
1162
- check_js
1189
1163
if : always()
0 commit comments