Skip to content

Commit 476ba8a

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 175d189 + cff811b commit 476ba8a

File tree

1,580 files changed

+39958
-17417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,580 files changed

+39958
-17417
lines changed

.github/actions/install-rust/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
elif [ "${{ inputs.toolchain }}" = "msrv" ]; then
2929
echo "version=1.$msrv.0" >> "$GITHUB_OUTPUT"
3030
elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-pinned-nightly" ]; then
31-
echo "version=nightly-2025-02-20" >> "$GITHUB_OUTPUT"
31+
echo "version=nightly-2025-04-03" >> "$GITHUB_OUTPUT"
3232
else
3333
echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT"
3434
fi
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Cron triggers for CI"
2+
on:
3+
schedule:
4+
# “At 02:34 on Monday.”
5+
#
6+
# https://crontab.guru/#34_2_*_*_1
7+
#
8+
# This is used to perform a weekly run of CI for all release branches,
9+
# ideally in off-work-hours to not clog up the queue.
10+
- cron: '34 2 * * 1'
11+
12+
# "At 02:34 on Sunday and every day-of-week from Tuesday through Saturday"
13+
#
14+
# https://crontab.guru/#34_2_*_*_0,2-6
15+
#
16+
# This is used to perform a daily run of CI for the `main` branch to prime
17+
# caches for github actions and the merge queue. Note that this frequency
18+
# doesn't overlap the above schedule to avoid triggering two builds on the
19+
# same day.
20+
- cron: '34 2 * * 0,2-6'
21+
22+
# Allow manually triggering this request via a button
23+
workflow_dispatch:
24+
25+
permissions:
26+
issues: write
27+
actions: write
28+
29+
jobs:
30+
run:
31+
if: "github.repository == 'bytecodealliance/wasmtime' || !github.event.schedule"
32+
name: Trigger release branch CI
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
submodules: true
38+
fetch-depth: 0
39+
40+
# Always trigger a CI run on the `main` branch to prime GHA caches.
41+
- run: gh workflow run main.yml --ref main
42+
name: Trigger main branch CI daily
43+
env:
44+
GH_TOKEN: ${{ github.token }}
45+
46+
# If this is a once-a-week run then additionally trigger CI for release
47+
# branches to ensure that the CI there is kept up-to-date.
48+
- run: rustc ci/trigger-release-branch-ci.rs
49+
- run: ./trigger-release-branch-ci
50+
name: Trigger release branch CI weekly
51+
env:
52+
GH_TOKEN: ${{ github.token }}
53+
if: "github.event.schedule == '34 2 * * 1' || !github.event.schedule"

.github/workflows/main.yml

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ on:
99
- main
1010
- 'release-*'
1111

12-
# Run full CI on the `main` branch once a day to prime the GitHub Actions
13-
# caches used by PRs and the merge queue.
14-
schedule:
15-
- cron: '13 4 * * *'
16-
1712
# This is the CI that runs for PRs-to-merge.
1813
merge_group:
1914

@@ -26,6 +21,9 @@ on:
2621
# uploads as well as publication to crates.io.
2722
- 'release-*'
2823

24+
# Allow manually triggering this request via a button or another workflow.
25+
workflow_dispatch:
26+
2927
defaults:
3028
run:
3129
shell: bash
@@ -125,7 +123,7 @@ jobs:
125123
cargo_vet:
126124
name: Cargo vet
127125
needs: determine
128-
if: needs.determine.outputs.audit
126+
if: github.repository == 'bytecodealliance/wasmtime' && needs.determine.outputs.audit
129127
runs-on: ubuntu-latest
130128
outputs:
131129
outcome: ${{ steps.vet.outcome }}
@@ -393,6 +391,7 @@ jobs:
393391
-p wasmtime-cli --no-default-features --features compile
394392
-p wasmtime-cli --no-default-features --features compile,cranelift
395393
-p wasmtime-cli --no-default-features --features compile,cranelift,component-model
394+
-p wasmtime-cli --no-default-features --features objdump
396395
-p wasmtime-cli --all-features
397396
-p wasmtime-cli --features component-model
398397
@@ -405,7 +404,7 @@ jobs:
405404
checks: |
406405
-p cranelift-entity --no-default-features
407406
-p cranelift-entity --no-default-features --features enable-serde
408-
407+
409408
- name: wasmtime-bench-api
410409
checks: |
411410
-p wasmtime-bench-api
@@ -434,17 +433,18 @@ jobs:
434433
- uses: ./.github/actions/cancel-on-failure
435434
if: failure()
436435

437-
fiber_tests:
438-
name: wasmtime-fiber tests
436+
special_tests:
437+
name: One-off special tests
439438
runs-on: ubuntu-latest
440-
env:
441-
CARGO_NDK_VERSION: 2.12.2
439+
needs: determine
440+
if: needs.determine.outputs.run-full
442441
steps:
443442
- uses: actions/checkout@v4
444443
with:
445444
submodules: true
446445
- uses: ./.github/actions/install-rust
447446
- run: cargo test -p wasmtime-fiber --no-default-features
447+
- run: cargo test -p cranelift-tools --test logged-filetests
448448

449449
# common logic to cancel the entire run if this job fails
450450
- uses: ./.github/actions/cancel-on-failure
@@ -655,7 +655,7 @@ jobs:
655655
strategy:
656656
fail-fast: true
657657
matrix:
658-
os: [ubuntu-latest, macos-latest, windows-latest]
658+
os: [ubuntu-24.04, macos-14, windows-2025]
659659

660660
steps:
661661
- uses: actions/checkout@v4
@@ -667,7 +667,7 @@ jobs:
667667
# Rust programs. Note that this only executes if the `determine` step told
668668
# us to test the capi which is off-by-default for PRs.
669669
- run: rustup target add wasm32-wasip2 # wasip2 target needed by example programs
670-
- run: cmake -Sexamples -Bexamples/build -DBUILD_SHARED_LIBS=OFF
670+
- run: cmake -Sexamples -Bexamples/build -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON
671671
- run: cmake --build examples/build --config Debug
672672
- run: cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build examples/build --config Debug --target RUN_TESTS
673673
if: runner.os == 'Windows'
@@ -770,6 +770,14 @@ jobs:
770770
touch ${{ runner.tool_cache }}/qemu/built
771771
if: matrix.qemu != ''
772772

773+
- name: Configure ASAN
774+
run: |
775+
echo CARGO_PROFILE_DEV_OPT_LEVEL=2 >> $GITHUB_ENV
776+
echo CARGO_PROFILE_TEST_OPT_LEVEL=2 >> $GITHUB_ENV
777+
echo RUSTFLAGS=-Zsanitizer=address >> $GITHUB_ENV
778+
echo RUSTDOCFLAGS=-Zsanitizer=address >> $GITHUB_ENV
779+
if: ${{ contains(matrix.name, 'ASAN') }}
780+
773781
# Record some CPU details; this is helpful information if tests fail due
774782
# to CPU-specific features.
775783
- name: CPU information
@@ -813,10 +821,10 @@ jobs:
813821
test_wasi_nn:
814822
strategy:
815823
matrix:
816-
feature: ["openvino", "onnx"]
817-
os: ["ubuntu-latest", "windows-latest"]
824+
feature: ["openvino"]
825+
os: ["ubuntu-24.04", "windows-2025"]
818826
include:
819-
- os: windows-latest
827+
- os: windows-2025
820828
feature: winml
821829
name: Test wasi-nn (${{ matrix.feature }}, ${{ matrix.os }})
822830
runs-on: ${{ matrix.os }}
@@ -1193,7 +1201,7 @@ jobs:
11931201
- cargo_vet
11941202
- doc
11951203
- micro_checks
1196-
- fiber_tests
1204+
- special_tests
11971205
- clippy
11981206
- monolith_checks
11991207
- platform_checks
@@ -1273,3 +1281,29 @@ jobs:
12731281
}
12741282
EOF
12751283
if: steps.tag.outputs.push_tag == 'yes'
1284+
1285+
# File an issue on the repo if this run failed and was triggered via
1286+
# `workflow_dispatch`, which mostly means that
1287+
# `.github/workflows/trigger-release-branch-ci.yml` will file issues on
1288+
# failure so we get to see a notification when a build fails for a historical
1289+
# release branch.
1290+
file-issue-on-error:
1291+
name: File an issue if this build failed and was cron-triggered
1292+
runs-on: ubuntu-latest
1293+
needs: ci-status
1294+
if: |
1295+
always()
1296+
&& needs.ci-status.result != 'success'
1297+
&& github.event_name == 'workflow_dispatch'
1298+
permissions:
1299+
issues: write
1300+
steps:
1301+
- uses: actions/github-script@v7
1302+
with:
1303+
script: |
1304+
github.rest.issues.create({
1305+
owner: context.repo.owner,
1306+
repo: context.repo.repo,
1307+
title: `Failed CI build for ${context.ref}`,
1308+
body: `See https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
1309+
})

0 commit comments

Comments
 (0)