From 29532177c1c03a20d011e794f9abb70f1bdb6d59 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 15 Apr 2026 14:18:56 -0700 Subject: [PATCH] CI: add coverage for fuzzer compiling From mlugg: this commit originally also added the same coverage to the aarch64-linux-release script, but that caused the aarch64-linux-release job to time out, so that change has been omitted for now. --- ci/aarch64-macos-release.sh | 4 ++++ ci/x86_64-linux-release.sh | 9 ++++++++- ci/x86_64-windows-release.ps1 | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 2c3f377fedaaf0ec4c990b590ea44f19e590e92d..e22b9ab9a01395b349b40936b70424e85abec3b7 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -51,6 +51,10 @@ stage3-release/bin/zig build test docs \ --search-prefix "$PREFIX" \ --test-timeout 2m +# Ensure that the fuzzer at least compiles. +stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe +stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug + # Ensure that stage3 and stage4 are byte-for-byte identical. stage3-release/bin/zig build \ --maxrss ${ZSF_MAX_RSS:-0} \ diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index 2ea3ea89ee3a605f74899b83a6169ce35f035221..b5701a1c93adc369e400a207924728805ec989dc 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -51,7 +51,10 @@ unset CXX ninja install -# simultaneously test building self-hosted without LLVM and with 32-bit arm +# Covers several things: +# 1. building the compiler without LLVM +# 2. 32-bit +# 3. arm stage3-release/bin/zig build \ -Dtarget=arm-linux-musleabihf \ -Dno-lib @@ -70,6 +73,10 @@ stage3-release/bin/zig build test docs \ -Denable-superhtml \ --test-timeout 12m +# Ensure that the fuzzer at least compiles. +stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe +stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug + # Ensure that stage3 and stage4 are byte-for-byte identical. stage3-release/bin/zig build \ --prefix stage4-release \ diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index 38458c98833258032619ba9e7f5a4bca1bb2808b..7a606dbac4892c4045c40e0100a7bb755731b788 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -54,6 +54,13 @@ stage3-release\bin\zig.exe build test docs ` --test-timeout 30m CheckLastExitCode +# Ensure that the fuzzer at least compiles. +# https://codeberg.org/ziglang/zig/issues/31893 +# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe +# CheckLastExitCode +# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug +# CheckLastExitCode + # Ensure that stage3 and stage4 are byte-for-byte identical. Write-Output "Build and compare stage4..." stage3-release\bin\zig.exe build ` -- 2.54.0