From 6def9cee009a0ce300c8625d1d11a54e4e35c3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 2 Aug 2024 00:54:05 +0200 Subject: [PATCH] ci: Add stage3/4 diff to (aarch64,x86_64)-windows-release scripts. --- ci/aarch64-windows.ps1 | 19 +++++++++++++++++++ ci/x86_64-windows-release.ps1 | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/ci/aarch64-windows.ps1 b/ci/aarch64-windows.ps1 index 8365ff285d..bf68a6443c 100644 --- a/ci/aarch64-windows.ps1 +++ b/ci/aarch64-windows.ps1 @@ -69,3 +69,22 @@ Write-Output "Main test suite..." -Dskip-non-native ` -Denable-symlinks-windows CheckLastExitCode + +# Ensure that stage3 and stage4 are byte-for-byte identical. +Write-Output "Build and compare stage4..." +& "stage3-release\bin\zig.exe" build ` + --prefix stage4-release ` + -Denable-llvm ` + -Dno-lib ` + -Doptimize=ReleaseFast ` + -Dstrip ` + -Dtarget="$TARGET" ` + -Duse-zig-libcxx ` + -Dversion-string="$(stage3-release\bin\zig version)" +CheckLastExitCode + +# Compare-Object returns an error code if the files differ. +Write-Output "If the following command fails, it means nondeterminism has been" +Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical." +Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe) +CheckLastExitCode diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index d2826f242d..3d8938ce19 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -70,6 +70,25 @@ Write-Output "Main test suite..." -Denable-symlinks-windows CheckLastExitCode +# Ensure that stage3 and stage4 are byte-for-byte identical. +Write-Output "Build and compare stage4..." +& "stage3-release\bin\zig.exe" build ` + --prefix stage4-release ` + -Denable-llvm ` + -Dno-lib ` + -Doptimize=ReleaseFast ` + -Dstrip ` + -Dtarget="$TARGET" ` + -Duse-zig-libcxx ` + -Dversion-string="$(stage3-release\bin\zig version)" +CheckLastExitCode + +# Compare-Object returns an error code if the files differ. +Write-Output "If the following command fails, it means nondeterminism has been" +Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical." +Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe) +CheckLastExitCode + Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..." & "stage3-release\bin\zig.exe" test ` ..\test\behavior.zig `