From c36ab59a3b1f303af44e55bfa194ab922f57b11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 18 Jul 2026 14:43:33 +0200 Subject: [PATCH] ci: bring riscv64-linux scripts in line with the rest --- ci/riscv64-linux-debug.sh | 15 +++++++++++---- ci/riscv64-linux-release.sh | 20 ++++++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index f01fc2bb09d763e3dbd06abbc055148d7d1b5ba0..1885782df8f202b2dbe096d178ab447ed5783910 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -11,8 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" -export PATH="$HOME/local/bin:$PATH" - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. @@ -46,11 +44,20 @@ ninja install export ZIG_LIB_DIR="$PWD/../lib" # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. -stage3-debug/bin/zig build test-modules test-c-abi \ +stage3-debug/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ -Dskip-non-native \ - -Dskip-single-threaded \ -Dtarget=native-native-musl \ --search-prefix "$PREFIX" \ --test-timeout 4m + +stage3-debug/bin/zig build \ + --prefix stage4-debug \ + -Denable-llvm \ + -Dno-lib \ + -Dtarget=$TARGET \ + -Duse-zig-libcxx \ + -Dversion-string="$(stage3-debug/bin/zig version)" + +stage4-debug/bin/zig test ../test/behavior.zig diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 34719e9d0d9595ff05f9d99f600b74347ddcb208..396cfac90ba6d626c41e40f9842462a2e81456c4 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -11,8 +11,6 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" PREFIX="$HOME/deps/$CACHE_BASENAME" ZIG="$PREFIX/bin/zig" -export PATH="$HOME/local/bin:$PATH" - # Override the cache directories because they won't actually help other CI runs # which will be testing alternate versions of zig, and ultimately would just # fill up space on the hard drive for no reason. @@ -46,11 +44,25 @@ ninja install export ZIG_LIB_DIR="$PWD/../lib" # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. -stage3-release/bin/zig build test-modules test-c-abi \ +stage3-release/bin/zig build test docs \ --maxrss ${ZSF_MAX_RSS:-0} \ -Dstatic-llvm \ -Dskip-non-native \ - -Dskip-single-threaded \ -Dtarget=native-native-musl \ --search-prefix "$PREFIX" \ --test-timeout 4m + +# Ensure that stage3 and stage4 are byte-for-byte identical. +stage3-release/bin/zig build \ + --prefix stage4-release \ + -Denable-llvm \ + -Dno-lib \ + -Doptimize=ReleaseFast \ + -Dstrip \ + -Dtarget=$TARGET \ + -Duse-zig-libcxx \ + -Dversion-string="$(stage3-release/bin/zig version)" + +echo "If the following command fails, it means nondeterminism has been" +echo "introduced, making stage3 and stage4 no longer byte-for-byte identical." +diff stage3-release/bin/zig stage4-release/bin/zig -- 2.54.0