Skip to content

Commit 6def9ce

Browse files
committed
ci: Add stage3/4 diff to (aarch64,x86_64)-windows-release scripts.
1 parent 624fa85 commit 6def9ce

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

ci/aarch64-windows.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,22 @@ Write-Output "Main test suite..."
6969
-Dskip-non-native `
7070
-Denable-symlinks-windows
7171
CheckLastExitCode
72+
73+
# Ensure that stage3 and stage4 are byte-for-byte identical.
74+
Write-Output "Build and compare stage4..."
75+
& "stage3-release\bin\zig.exe" build `
76+
--prefix stage4-release `
77+
-Denable-llvm `
78+
-Dno-lib `
79+
-Doptimize=ReleaseFast `
80+
-Dstrip `
81+
-Dtarget="$TARGET" `
82+
-Duse-zig-libcxx `
83+
-Dversion-string="$(stage3-release\bin\zig version)"
84+
CheckLastExitCode
85+
86+
# Compare-Object returns an error code if the files differ.
87+
Write-Output "If the following command fails, it means nondeterminism has been"
88+
Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical."
89+
Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe)
90+
CheckLastExitCode

ci/x86_64-windows-release.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,25 @@ Write-Output "Main test suite..."
7070
-Denable-symlinks-windows
7171
CheckLastExitCode
7272

73+
# Ensure that stage3 and stage4 are byte-for-byte identical.
74+
Write-Output "Build and compare stage4..."
75+
& "stage3-release\bin\zig.exe" build `
76+
--prefix stage4-release `
77+
-Denable-llvm `
78+
-Dno-lib `
79+
-Doptimize=ReleaseFast `
80+
-Dstrip `
81+
-Dtarget="$TARGET" `
82+
-Duse-zig-libcxx `
83+
-Dversion-string="$(stage3-release\bin\zig version)"
84+
CheckLastExitCode
85+
86+
# Compare-Object returns an error code if the files differ.
87+
Write-Output "If the following command fails, it means nondeterminism has been"
88+
Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical."
89+
Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe)
90+
CheckLastExitCode
91+
7392
Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..."
7493
& "stage3-release\bin\zig.exe" test `
7594
..\test\behavior.zig `

0 commit comments

Comments
 (0)