A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Change how warnings are denied in CI (#14299)
Alex Crichton3f87c49e318d
diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.ymlindex 10284df9d6..0284c0a7b8 100644--- a/.github/actions/install-rust/action.yml+++ b/.github/actions/install-rust/action.yml@@ -64,7 +64,7 @@ runs:EOF# Deny warnings on CI to keep our code warning-free as it lands in-tree.- echo RUSTFLAGS="-D warnings $RUSTFLAGS" >> "$GITHUB_ENV"+ echo CARGO_BUILD_WARNINGS=deny >> "$GITHUB_ENV"if [[ "${{ runner.os }}" = "macOS" ]]; thencat >> "$GITHUB_ENV" <<EOFdiff --git a/.github/workflows/main.yml b/.github/workflows/main.ymlindex fc20b1fa5e..1f6a01e7c0 100644--- a/.github/workflows/main.yml+++ b/.github/workflows/main.yml@@ -285,7 +285,7 @@ jobs:name: Doc buildruns-on: ubuntu-latestenv:- RUSTDOCFLAGS: -Dwarnings --cfg docsrs+ RUSTDOCFLAGS: --cfg docsrsOPENVINO_SKIP_LINKING: 1steps:- uses: actions/checkout@v6@@ -650,6 +650,8 @@ jobs:os: ubuntu-latestcross: truetest: cross build+ env:+ RUSTFLAGS: -Alinker-messages- target: wasm32-wasip1os: ubuntu-latesttest: cargo build --no-default-features --features compile,cranelift,all-arch@@ -858,9 +860,7 @@ jobs:needs: determinename: ${{ matrix.name }}runs-on: ${{ matrix.os }}- env:- QEMU_BUILD_VERSION: 10.0.3- SDE_BUILD_VERSION: 9.58.0-2025-06-16+ env: ${{ matrix.env || fromJSON('{}') }}strategy:fail-fast: ${{ github.event_name != 'pull_request' }}matrix: ${{ fromJson(needs.determine.outputs.test-matrix) }}@@ -926,14 +926,6 @@ jobs:upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')echo CARGO_TARGET_${upcase}_RUNNER=${{ runner.tool_cache }}/qemu/bin/${{ matrix.qemu }} >> $GITHUB_ENV- # QEMU emulation is not always the speediest, so total testing time- # goes down if we build the libs in release mode when running tests.- echo CARGO_PROFILE_DEV_OPT_LEVEL=2 >> $GITHUB_ENV-- # See comments in the source for why we enable this during QEMU- # emulation.- echo WASMTIME_TEST_NO_HOG_MEMORY=1 >> $GITHUB_ENV-# See if qemu is already in the cacheif [ -f ${{ runner.tool_cache }}/qemu/built ]; thenexit 0@@ -962,18 +954,6 @@ jobs:# Set up SDE as runner for x86_64 targetsecho "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=${{ runner.tool_cache }}/sde/sde64 -future --" >> $GITHUB_ENV- # SDE emulation is very slow, so use release mode for better performance- echo CARGO_PROFILE_DEV_OPT_LEVEL=2 >> $GITHUB_ENV-- # Enable environment variable to indicate SDE is being used- echo WASMTIME_TEST_SDE=1 >> $GITHUB_ENV-- # Generic variable for skipping tests that are problematic under SDE (performance, compatibility, etc.)- echo WASMTIME_TEST_NO_SDE=1 >> $GITHUB_ENV-- # Similar to QEMU, reduce memory usage during SDE emulation- echo WASMTIME_TEST_NO_HOG_MEMORY=1 >> $GITHUB_ENV-# See if SDE is already in the cacheif [ -f ${{ runner.tool_cache }}/sde/sde64 ]; thenexit 0@@ -989,14 +969,6 @@ jobs:chmod +x ${{ runner.tool_cache }}/sde/sde64if: matrix.sde != ''- - name: Configure ASAN- run: |- echo CARGO_PROFILE_DEV_OPT_LEVEL=2 >> $GITHUB_ENV- echo CARGO_PROFILE_TEST_OPT_LEVEL=2 >> $GITHUB_ENV- echo RUSTFLAGS=-Zsanitizer=address >> $GITHUB_ENV- echo RUSTDOCFLAGS="-Zsanitizer=address -Copt-level=2 -Ccodegen-units=16" >> $GITHUB_ENV- if: ${{ contains(matrix.name, 'ASAN') }}-# Record some CPU details; this is helpful information if tests fail due# to CPU-specific features.- name: CPU informationdiff --git a/ci/build-build-matrix.js b/ci/build-build-matrix.jsindex c3624159e7..6695c511d3 100644--- a/ci/build-build-matrix.js+++ b/ci/build-build-matrix.js@@ -82,13 +82,19 @@ const array = ["build": "x86_64-musl","os": ubuntu,"target": "x86_64-unknown-linux-musl",- "env": { "DOCKER_IMAGE": "./ci/docker/x86_64-musl/Dockerfile" },+ "env": {+ "DOCKER_IMAGE": "./ci/docker/x86_64-musl/Dockerfile",+ "RUSTFLAGS": "-Alinker-messages",+ },},{"build": "aarch64-musl","os": ubuntu,"target": "aarch64-unknown-linux-musl",- "env": { "DOCKER_IMAGE": "./ci/docker/aarch64-musl/Dockerfile" },+ "env": {+ "DOCKER_IMAGE": "./ci/docker/aarch64-musl/Dockerfile",+ "RUSTFLAGS": "-Alinker-messages",+ },},{"build": "aarch64-windows",diff --git a/ci/build-test-matrix.js b/ci/build-test-matrix.jsindex bd37e596b6..d556428810 100644--- a/ci/build-test-matrix.js+++ b/ci/build-test-matrix.js@@ -94,6 +94,8 @@ const FAST_MATRIX = [//// * `rust` - the Rust version to install, and if unset this'll be set to// `default`+//+// * `env` - environment variables to set for this job.const FULL_MATRIX = [...FAST_MATRIX,{@@ -115,6 +117,12 @@ const FULL_MATRIX = ["filter": "asan","rust": "wasmtime-ci-pinned-nightly","target": "x86_64-unknown-linux-gnu",+ "env": {+ "CARGO_PROFILE_DEV_OPT_LEVEL": 2,+ "CARGO_PROFILE_TEST_OPT_LEVEL": 2,+ "RUSTFLAGS": "-Zsanitizer=address",+ "RUSTDOCFLAGS": "-Zsanitizer=address -Copt-level=2 -Ccodegen-units=16",+ },},{"name": "Test Intel SDE",@@ -135,6 +143,9 @@ const FULL_MATRIX = ["os": macos,"filter": "macos-arm64","target": "aarch64-apple-darwin",+ "env": {+ "RUSTFLAGS": "-Alinker-messages",+ },},{"name": "Test MSVC x86_64",@@ -352,6 +363,37 @@ async function main() {if (config.rust === undefined) {config.rust = 'default';}++ if (config.qemu !== undefined) {+ if (config.env === undefined)+ config.env = {};+ config.env.QEMU_BUILD_VERSION = "10.0.3";++ // QEMU emulation is not always the speediest, so total testing time+ // goes down if we build the libs in release mode when running tests.+ config.env.CARGO_PROFILE_DEV_OPT_LEVEL = 2;+ // See comments in the source for why we enable this during QEMU+ // emulation.+ config.env.WASMTIME_TEST_NO_HOG_MEMORY = 1;+ }++ if (config.sde !== undefined) {+ if (config.env === undefined)+ config.env = {};+ config.env.SDE_BUILD_VERSION = "9.58.0-2025-06-16";++ // SDE emulation is very slow, so use release mode for better performance+ config.env.CARGO_PROFILE_DEV_OPT_LEVEL = 2;++ // Enable environment variable to indicate SDE is being used+ config.env.WASMTIME_TEST_SDE = 1;++ // Generic variable for skipping tests that are problematic under SDE (performance, compatibility, etc.)+ config.env.WASMTIME_TEST_NO_SDE = 1;++ // Similar to QEMU, reduce memory usage during SDE emulation+ config.env.WASMTIME_TEST_NO_HOG_MEMORY = 1;+ }}// If the optional third argument to this script is `true` then that means all