authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-10 00:35:38+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-10 00:35:38+02:00
loge5aa6fd115bb79b89c572a8cb3dd2c9713854253
tree1dd971d0896635c0725eb63b9b1db966d97fc18d
parentf1c2b30b7e269cce212d01860be0ea65a67ffe33
parent114af83d3f01948d79263a7cf1f67175a1981a29

Merge pull request 'some CI script cleanups' (#36796) from alexrp/zig:ci-cleanups into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/36796

32 files changed, 332 insertions(+), 344 deletions(-)

ci/aarch64-freebsd-debug.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -55,6 +51,7 @@ stage3-debug/bin/zig build \
5551 -Denable-llvm \
5652 -Dno-lib \
5753 -Dtarget=$TARGET \
54 -Dcpu=$MCPU \
5855 -Duse-zig-libcxx \
5956 -Dversion-string="$(stage3-debug/bin/zig version)"
6057
ci/aarch64-freebsd-release.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -58,6 +54,7 @@ stage3-release/bin/zig build \
5854 -Doptimize=ReleaseFast \
5955 -Dstrip \
6056 -Dtarget=$TARGET \
57 -Dcpu=$MCPU \
6158 -Duse-zig-libcxx \
6259 -Dversion-string="$(stage3-release/bin/zig version)"
6360
ci/aarch64-linux-debug.sh+4-10
......@@ -19,33 +19,26 @@ export PATH="$HOME/local/bin:$PATH"
1919export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
2020export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
2121
22mkdir build-debug
22mkdir -p build-debug
2323cd build-debug
2424
25export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
26export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
27
2825cmake .. \
2926 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
3027 -DCMAKE_PREFIX_PATH="$PREFIX" \
3128 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3231 -DZIG_TARGET_TRIPLE="$TARGET" \
3332 -DZIG_TARGET_MCPU="$MCPU" \
3433 -DZIG_STATIC=ON \
3534 -DZIG_NO_LIB=ON \
3635 -GNinja
3736
38# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
39# so that installation and testing do not get affected by them.
40unset CC
41unset CXX
42
4337ninja install
4438
4539# Must be done after zig cc is finished.
4640export ZIG_LIB_DIR="$PWD/../lib"
4741
48# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4942stage3-debug/bin/zig build test docs \
5043 --maxrss ${ZSF_MAX_RSS:-0} \
5144 -Dstatic-llvm \
......@@ -59,6 +52,7 @@ stage3-debug/bin/zig build \
5952 -Denable-llvm \
6053 -Dno-lib \
6154 -Dtarget=$TARGET \
55 -Dcpu=$MCPU \
6256 -Duse-zig-libcxx \
6357 -Dversion-string="$(stage3-debug/bin/zig version)"
6458
ci/aarch64-linux-release.sh+4-10
......@@ -19,33 +19,26 @@ export PATH="$HOME/local/bin:$PATH"
1919export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
2020export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
2121
22mkdir build-release
22mkdir -p build-release
2323cd build-release
2424
25export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
26export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
27
2825cmake .. \
2926 -DCMAKE_INSTALL_PREFIX="stage3-release" \
3027 -DCMAKE_PREFIX_PATH="$PREFIX" \
3128 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3231 -DZIG_TARGET_TRIPLE="$TARGET" \
3332 -DZIG_TARGET_MCPU="$MCPU" \
3433 -DZIG_STATIC=ON \
3534 -DZIG_NO_LIB=ON \
3635 -GNinja
3736
38# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
39# so that installation and testing do not get affected by them.
40unset CC
41unset CXX
42
4337ninja install
4438
4539# Must be done after zig cc is finished.
4640export ZIG_LIB_DIR="$PWD/../lib"
4741
48# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4942stage3-release/bin/zig build test docs \
5043 --maxrss ${ZSF_MAX_RSS:-0} \
5144 -Dstatic-llvm \
......@@ -62,6 +55,7 @@ stage3-release/bin/zig build \
6255 -Doptimize=ReleaseFast \
6356 -Dstrip \
6457 -Dtarget=$TARGET \
58 -Dcpu=$MCPU \
6559 -Duse-zig-libcxx \
6660 -Dversion-string="$(stage3-release/bin/zig version)"
6761
ci/aarch64-macos-debug.sh+5-3
......@@ -5,28 +5,29 @@
55set -x
66set -e
77
8ZIGDIR="$PWD"
98TARGET="aarch64-macos-none"
109MCPU="baseline"
1110CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1211PREFIX="$HOME/$CACHE_BASENAME"
1312ZIG="$PREFIX/bin/zig"
1413
14ZIGDIR="$PWD"
1515if [ ! -d "$PREFIX" ]; then
1616 cd $HOME
1717 curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
1818 tar xf "$CACHE_BASENAME.tar.xz"
1919fi
20
2120cd $ZIGDIR
2221
22export PATH="$HOME/local/bin:$PATH"
23
2324# Override the cache directories because they won't actually help other CI runs
2425# which will be testing alternate versions of zig, and ultimately would just
2526# fill up space on the hard drive for no reason.
2627export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
2728export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
2829
29mkdir build-debug
30mkdir -p build-debug
3031cd build-debug
3132
3233cmake .. \
......@@ -65,6 +66,7 @@ stage3-debug/bin/zig build \
6566 -Denable-llvm \
6667 -Dno-lib \
6768 -Dtarget=$TARGET \
69 -Dcpu=$MCPU \
6870 -Duse-zig-libcxx \
6971 -Dversion-string="$(stage3-debug/bin/zig version)"
7072
ci/aarch64-macos-release.sh+5-3
......@@ -5,28 +5,29 @@
55set -x
66set -e
77
8ZIGDIR="$PWD"
98TARGET="aarch64-macos-none"
109MCPU="baseline"
1110CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1211PREFIX="$HOME/$CACHE_BASENAME"
1312ZIG="$PREFIX/bin/zig"
1413
14ZIGDIR="$PWD"
1515if [ ! -d "$PREFIX" ]; then
1616 cd $HOME
1717 curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
1818 tar xf "$CACHE_BASENAME.tar.xz"
1919fi
20
2120cd $ZIGDIR
2221
22export PATH="$HOME/local/bin:$PATH"
23
2324# Override the cache directories because they won't actually help other CI runs
2425# which will be testing alternate versions of zig, and ultimately would just
2526# fill up space on the hard drive for no reason.
2627export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
2728export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
2829
29mkdir build-release
30mkdir -p build-release
3031cd build-release
3132
3233cmake .. \
......@@ -72,6 +73,7 @@ stage3-release/bin/zig build \
7273 -Doptimize=ReleaseFast \
7374 -Dstrip \
7475 -Dtarget=$TARGET \
76 -Dcpu=$MCPU \
7577 -Duse-zig-libcxx \
7678 -Dversion-string="$(stage3-release/bin/zig version)"
7779
ci/aarch64-netbsd-debug.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -55,6 +51,7 @@ stage3-debug/bin/zig build \
5551 -Denable-llvm \
5652 -Dno-lib \
5753 -Dtarget=$TARGET \
54 -Dcpu=$MCPU \
5855 -Duse-zig-libcxx \
5956 -Dversion-string="$(stage3-debug/bin/zig version)"
6057
ci/aarch64-netbsd-release.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -58,6 +54,7 @@ stage3-release/bin/zig build \
5854 -Doptimize=ReleaseFast \
5955 -Dstrip \
6056 -Dtarget=$TARGET \
57 -Dcpu=$MCPU \
6158 -Duse-zig-libcxx \
6259 -Dversion-string="$(stage3-release/bin/zig version)"
6360
ci/aarch64-openbsd-debug.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -55,6 +51,7 @@ stage3-debug/bin/zig build \
5551 -Denable-llvm \
5652 -Dno-lib \
5753 -Dtarget=$TARGET \
54 -Dcpu=$MCPU \
5855 -Duse-zig-libcxx \
5956 -Dversion-string="$(stage3-debug/bin/zig version)"
6057
ci/aarch64-openbsd-release.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.2030+f955266cf"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -63,6 +59,7 @@ stage3-release/bin/zig build \
6359 -Doptimize=ReleaseFast \
6460 -Dstrip \
6561 -Dtarget=$TARGET \
62 -Dcpu=$MCPU \
6663 -Duse-zig-libcxx \
6764 -Dversion-string="$(stage3-release/bin/zig version)"
6865
ci/aarch64-windows-debug.ps1 created+72
......@@ -0,0 +1,72 @@
1$TARGET = "aarch64-windows-gnu"
2$MCPU = "baseline"
3$PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
4$ZIG = "$PREFIX_PATH\bin\zig.exe"
5$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
6
7$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH"
8
9function CheckLastExitCode {
10 if (!$?) {
11 exit 1
12 }
13 return 0
14}
15
16# Override the cache directories because they won't actually help other CI runs
17# which will be testing alternate versions of zig, and ultimately would just
18# fill up space on the hard drive for no reason.
19$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
20$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
21
22Write-Output "Building from source..."
23New-Item -Force -Path 'build-debug' -ItemType Directory
24Set-Location -Path 'build-debug'
25
26# CMake gives a syntax error when file paths with backward slashes are used.
27# Here, we use forward slashes only to work around this.
28cmake .. `
29 -GNinja `
30 -DCMAKE_INSTALL_PREFIX="stage3-debug" `
31 -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" `
32 -DCMAKE_BUILD_TYPE=Debug `
33 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `
34 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `
35 -DCMAKE_AR="$($ZIG -Replace "\\", "/")" `
36 -DZIG_AR_WORKAROUND=ON `
37 -DZIG_TARGET_TRIPLE="$TARGET" `
38 -DZIG_TARGET_MCPU="$MCPU" `
39 -DZIG_STATIC=ON `
40 -DZIG_NO_LIB=ON
41CheckLastExitCode
42
43ninja install
44CheckLastExitCode
45
46# Must be done after zig cc is finished.
47$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib"
48
49Write-Output "Main test suite..."
50stage3-debug\bin\zig.exe build test docs `
51 --maxrss $ZSF_MAX_RSS `
52 --search-prefix "$PREFIX_PATH" `
53 -Dstatic-llvm `
54 -Dskip-non-native `
55 -Denable-symlinks-windows `
56 --test-timeout 30m
57CheckLastExitCode
58
59Write-Output "Build and test stage4..."
60stage3-debug\bin\zig.exe build `
61 --prefix stage4-debug `
62 -Denable-llvm `
63 -Dno-lib `
64 -Doptimize=Debug `
65 -Dtarget="$TARGET" `
66 -Dcpu="$MCPU" `
67 -Duse-zig-libcxx `
68 -Dversion-string="$(stage3-debug\bin\zig.exe version)"
69CheckLastExitCode
70
71stage4-debug\bin\zig.exe test ..\test\behavior.zig
72CheckLastExitCode
ci/aarch64-windows-release.ps1 created+84
......@@ -0,0 +1,84 @@
1$TARGET = "aarch64-windows-gnu"
2$MCPU = "baseline"
3$PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
4$ZIG = "$PREFIX_PATH\bin\zig.exe"
5$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
6
7$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH"
8
9function CheckLastExitCode {
10 if (!$?) {
11 exit 1
12 }
13 return 0
14}
15
16# Override the cache directories because they won't actually help other CI runs
17# which will be testing alternate versions of zig, and ultimately would just
18# fill up space on the hard drive for no reason.
19$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
20$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
21
22Write-Output "Building from source..."
23New-Item -Force -Path 'build-release' -ItemType Directory
24Set-Location -Path 'build-release'
25
26# CMake gives a syntax error when file paths with backward slashes are used.
27# Here, we use forward slashes only to work around this.
28cmake .. `
29 -GNinja `
30 -DCMAKE_INSTALL_PREFIX="stage3-release" `
31 -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" `
32 -DCMAKE_BUILD_TYPE=Release `
33 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `
34 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `
35 -DCMAKE_AR="$($ZIG -Replace "\\", "/")" `
36 -DZIG_AR_WORKAROUND=ON `
37 -DZIG_TARGET_TRIPLE="$TARGET" `
38 -DZIG_TARGET_MCPU="$MCPU" `
39 -DZIG_STATIC=ON `
40 -DZIG_NO_LIB=ON
41CheckLastExitCode
42
43ninja install
44CheckLastExitCode
45
46# Must be done after zig cc is finished.
47$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib"
48
49Write-Output "Main test suite..."
50stage3-release\bin\zig.exe build test docs `
51 --maxrss $ZSF_MAX_RSS `
52 --search-prefix "$PREFIX_PATH" `
53 -Dstatic-llvm `
54 -Dskip-non-native `
55 -Denable-symlinks-windows `
56 --test-timeout 30m
57CheckLastExitCode
58
59# Ensure that the fuzzer at least compiles.
60# https://codeberg.org/ziglang/zig/issues/31893
61# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe
62# CheckLastExitCode
63# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug
64# CheckLastExitCode
65
66# Ensure that stage3 and stage4 are byte-for-byte identical.
67Write-Output "Build and compare stage4..."
68stage3-release\bin\zig.exe build `
69 --prefix stage4-release `
70 -Denable-llvm `
71 -Dno-lib `
72 -Doptimize=ReleaseFast `
73 -Dstrip `
74 -Dtarget="$TARGET" `
75 -Dcpu="$MCPU" `
76 -Duse-zig-libcxx `
77 -Dversion-string="$(stage3-release\bin\zig.exe version)"
78CheckLastExitCode
79
80# Compare-Object returns an error code if the files differ.
81Write-Output "If the following command fails, it means nondeterminism has been"
82Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical."
83Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe)
84CheckLastExitCode
ci/aarch64-windows.ps1 deleted-85
......@@ -1,85 +0,0 @@
1$TARGET = "aarch64-windows-gnu"
2$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
3$MCPU = "baseline"
4$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
5$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
6$ZIG = "$PREFIX_PATH\bin\zig.exe"
7$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
8
9if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) {
10 Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
11 Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "..\$ZIG_LLVM_CLANG_LLD_NAME.zip"
12
13 Write-Output "Extracting..."
14 Add-Type -AssemblyName System.IO.Compression.FileSystem ;
15 [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD\..\$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD\..")
16}
17
18function CheckLastExitCode {
19 if (!$?) {
20 exit 1
21 }
22 return 0
23}
24
25# Override the cache directories because they won't actually help other CI runs
26# which will be testing alternate versions of zig, and ultimately would just
27# fill up space on the hard drive for no reason.
28$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
29$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
30
31Write-Output "Building from source..."
32New-Item -Path 'build-release' -ItemType Directory
33Set-Location -Path 'build-release'
34
35# CMake gives a syntax error when file paths with backward slashes are used.
36# Here, we use forward slashes only to work around this.
37& cmake .. `
38 -GNinja `
39 -DCMAKE_INSTALL_PREFIX="stage3-release" `
40 -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" `
41 -DCMAKE_BUILD_TYPE=Release `
42 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `
43 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `
44 -DCMAKE_AR="$ZIG" `
45 -DZIG_AR_WORKAROUND=ON `
46 -DZIG_TARGET_TRIPLE="$TARGET" `
47 -DZIG_TARGET_MCPU="$MCPU" `
48 -DZIG_STATIC=ON `
49 -DZIG_NO_LIB=ON
50CheckLastExitCode
51
52ninja install
53CheckLastExitCode
54
55# Must be done after zig cc is finished.
56$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib"
57
58Write-Output "Main test suite..."
59& "stage3-release\bin\zig.exe" build test docs `
60 --maxrss $ZSF_MAX_RSS `
61 --search-prefix "$PREFIX_PATH" `
62 -Dstatic-llvm `
63 -Dskip-non-native `
64 -Denable-symlinks-windows `
65 --test-timeout 30m
66CheckLastExitCode
67
68# Ensure that stage3 and stage4 are byte-for-byte identical.
69Write-Output "Build and compare stage4..."
70& "stage3-release\bin\zig.exe" build `
71 --prefix stage4-release `
72 -Denable-llvm `
73 -Dno-lib `
74 -Doptimize=ReleaseFast `
75 -Dstrip `
76 -Dtarget="$TARGET" `
77 -Duse-zig-libcxx `
78 -Dversion-string="$(stage3-release\bin\zig version)"
79CheckLastExitCode
80
81# Compare-Object returns an error code if the files differ.
82Write-Output "If the following command fails, it means nondeterminism has been"
83Write-Output "introduced, making stage3 and stage4 no longer byte-for-byte identical."
84Compare-Object (Get-Content stage3-release\bin\zig.exe) (Get-Content stage4-release\bin\zig.exe)
85CheckLastExitCode
ci/loongarch64-linux-debug.sh+6-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-debug/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
......@@ -57,6 +52,7 @@ stage3-debug/bin/zig build \
5752 -Denable-llvm \
5853 -Dno-lib \
5954 -Dtarget=$TARGET \
55 -Dcpu=$MCPU \
6056 -Duse-zig-libcxx \
6157 -Dversion-string="$(stage3-debug/bin/zig version)"
6258
ci/loongarch64-linux-release.sh+6-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-release/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
......@@ -60,6 +55,7 @@ stage3-release/bin/zig build \
6055 -Doptimize=ReleaseFast \
6156 -Dstrip \
6257 -Dtarget=$TARGET \
58 -Dcpu=$MCPU \
6359 -Duse-zig-libcxx \
6460 -Dversion-string="$(stage3-release/bin/zig version)"
6561
ci/powerpc64le-linux-debug.sh+5-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-debug/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
ci/powerpc64le-linux-release.sh+5-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-release/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
ci/riscv64-linux-debug.sh+6-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-debug/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
......@@ -57,6 +52,7 @@ stage3-debug/bin/zig build \
5752 -Denable-llvm \
5853 -Dno-lib \
5954 -Dtarget=$TARGET \
55 -Dcpu=$MCPU \
6056 -Duse-zig-libcxx \
6157 -Dversion-string="$(stage3-debug/bin/zig version)"
6258
ci/riscv64-linux-release.sh+6-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-release/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
......@@ -60,6 +55,7 @@ stage3-release/bin/zig build \
6055 -Doptimize=ReleaseFast \
6156 -Dstrip \
6257 -Dtarget=$TARGET \
58 -Dcpu=$MCPU \
6359 -Duse-zig-libcxx \
6460 -Dversion-string="$(stage3-release/bin/zig version)"
6561
ci/s390x-linux-debug.sh+5-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-debug/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
ci/s390x-linux-release.sh+5-10
......@@ -11,39 +11,34 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
4440export ZIG_LIB_DIR="$PWD/../lib"
4541
46# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
4742stage3-release/bin/zig build test docs \
4843 --maxrss ${ZSF_MAX_RSS:-0} \
4944 -Dstatic-llvm \
ci/x86_64-freebsd-debug.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -55,6 +51,7 @@ stage3-debug/bin/zig build \
5551 -Denable-llvm \
5652 -Dno-lib \
5753 -Dtarget=$TARGET \
54 -Dcpu=$MCPU \
5855 -Duse-zig-libcxx \
5956 -Dversion-string="$(stage3-debug/bin/zig version)"
6057
ci/x86_64-freebsd-release.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -62,6 +58,7 @@ stage3-release/bin/zig build \
6258 -Doptimize=ReleaseFast \
6359 -Dstrip \
6460 -Dtarget=$TARGET \
61 -Dcpu=$MCPU \
6562 -Duse-zig-libcxx \
6663 -Dversion-string="$(stage3-release/bin/zig version)"
6764
ci/x86_64-linux-debug-llvm.sh+4-9
......@@ -19,16 +19,15 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_
1919export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
2020export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
2121
22mkdir build-debug-llvm
22mkdir -p build-debug-llvm
2323cd build-debug-llvm
2424
25export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
26export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
27
2825cmake .. \
2926 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
3027 -DCMAKE_PREFIX_PATH="$PREFIX" \
3128 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3231 -DZIG_TARGET_TRIPLE="$TARGET" \
3332 -DZIG_TARGET_MCPU="$MCPU" \
3433 -DZIG_STATIC=ON \
......@@ -36,11 +35,6 @@ cmake .. \
3635 -DZIG_EXTRA_BUILD_ARGS="-Duse-llvm=true" \
3736 -GNinja
3837
39# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
40# so that installation and testing do not get affected by them.
41unset CC
42unset CXX
43
4438ninja install
4539
4640# Must be done after zig cc is finished.
......@@ -75,6 +69,7 @@ stage3-debug/bin/zig build \
7569 -Denable-llvm \
7670 -Dno-lib \
7771 -Dtarget=$TARGET \
72 -Dcpu=$MCPU \
7873 -Duse-zig-libcxx \
7974 -Dversion-string="$(stage3-debug/bin/zig version)"
8075
ci/x86_64-linux-debug.sh+4-9
......@@ -19,27 +19,21 @@ export PATH="$HOME/deps/wasmtime-v46.0.1-x86_64-linux:$HOME/deps/qemu-linux-x86_
1919export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
2020export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
2121
22mkdir build-debug
22mkdir -p build-debug
2323cd build-debug
2424
25export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
26export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
27
2825cmake .. \
2926 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
3027 -DCMAKE_PREFIX_PATH="$PREFIX" \
3128 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3231 -DZIG_TARGET_TRIPLE="$TARGET" \
3332 -DZIG_TARGET_MCPU="$MCPU" \
3433 -DZIG_STATIC=ON \
3534 -DZIG_NO_LIB=ON \
3635 -GNinja
3736
38# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
39# so that installation and testing do not get affected by them.
40unset CC
41unset CXX
42
4337ninja install
4438
4539# Must be done after zig cc is finished.
......@@ -74,6 +68,7 @@ stage3-debug/bin/zig build \
7468 -Denable-llvm \
7569 -Dno-lib \
7670 -Dtarget=$TARGET \
71 -Dcpu=$MCPU \
7772 -Duse-zig-libcxx \
7873 -Dversion-string="$(stage3-debug/bin/zig version)"
7974
ci/x86_64-linux-release.sh+8-19
......@@ -25,27 +25,21 @@ cc -o bootstrap bootstrap.c
2525./zig2 build -Dno-lib
2626./zig-out/bin/zig test test/behavior.zig
2727
28mkdir build-release
28mkdir -p build-release
2929cd build-release
3030
31export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
32export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
33
3431cmake .. \
3532 -DCMAKE_INSTALL_PREFIX="stage3-release" \
3633 -DCMAKE_PREFIX_PATH="$PREFIX" \
3734 -DCMAKE_BUILD_TYPE=Release \
35 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
36 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3837 -DZIG_TARGET_TRIPLE="$TARGET" \
3938 -DZIG_TARGET_MCPU="$MCPU" \
4039 -DZIG_STATIC=ON \
4140 -DZIG_NO_LIB=ON \
4241 -GNinja
4342
44# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
45# so that installation and testing do not get affected by them.
46unset CC
47unset CXX
48
4943ninja install
5044
5145# Must not be set while using the other `zig cc` which has its own zig lib dir.
......@@ -84,6 +78,7 @@ stage3-release/bin/zig build \
8478 -Doptimize=ReleaseFast \
8579 -Dstrip \
8680 -Dtarget=$TARGET \
81 -Dcpu=$MCPU \
8782 -Duse-zig-libcxx \
8883 -Dversion-string="$(stage3-release/bin/zig version)"
8984
......@@ -94,27 +89,21 @@ diff stage3-release/bin/zig stage4-release/bin/zig
9489# Ensure that updating the wasm binary from this commit will result in a viable build.
9590stage3-release/bin/zig build update-zig1
9691
97mkdir ../build-new
92mkdir -p ../build-new
9893cd ../build-new
9994
100export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
101export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
10295unset ZIG_LIB_DIR
10396
10497cmake .. \
10598 -DCMAKE_PREFIX_PATH="$PREFIX" \
10699 -DCMAKE_BUILD_TYPE=Release \
100 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
101 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
107102 -DZIG_TARGET_TRIPLE="$TARGET" \
108103 -DZIG_TARGET_MCPU="$MCPU" \
109104 -DZIG_STATIC=ON \
110105 -DZIG_NO_LIB=ON \
111 -GNinja \
112 -DCMAKE_C_LINKER_DEPFILE_SUPPORTED=FALSE \
113 -DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=FALSE
114# https://github.com/ziglang/zig/issues/22213
115
116unset CC
117unset CXX
106 -GNinja
118107
119108ninja install
120109
ci/x86_64-netbsd-debug.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -55,6 +51,7 @@ stage3-debug/bin/zig build \
5551 -Denable-llvm \
5652 -Dno-lib \
5753 -Dtarget=$TARGET \
54 -Dcpu=$MCPU \
5855 -Duse-zig-libcxx \
5956 -Dversion-string="$(stage3-debug/bin/zig version)"
6057
ci/x86_64-netbsd-release.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -62,6 +58,7 @@ stage3-release/bin/zig build \
6258 -Doptimize=ReleaseFast \
6359 -Dstrip \
6460 -Dtarget=$TARGET \
61 -Dcpu=$MCPU \
6562 -Duse-zig-libcxx \
6663 -Dversion-string="$(stage3-release/bin/zig version)"
6764
ci/x86_64-openbsd-debug.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-debug
22mkdir -p build-debug
2123cd build-debug
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Debug \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -55,6 +51,7 @@ stage3-debug/bin/zig build \
5551 -Denable-llvm \
5652 -Dno-lib \
5753 -Dtarget=$TARGET \
54 -Dcpu=$MCPU \
5855 -Duse-zig-libcxx \
5956 -Dversion-string="$(stage3-debug/bin/zig version)"
6057
ci/x86_64-openbsd-release.sh+6-9
......@@ -11,33 +11,29 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523"
1111PREFIX="$HOME/deps/$CACHE_BASENAME"
1212ZIG="$PREFIX/bin/zig"
1313
14export PATH="$HOME/local/bin:$PATH"
15
1416# Override the cache directories because they won't actually help other CI runs
1517# which will be testing alternate versions of zig, and ultimately would just
1618# fill up space on the hard drive for no reason.
1719export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
1820export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
1921
20mkdir build-release
22mkdir -p build-release
2123cd build-release
2224
23export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
24export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
25
2625cmake .. \
2726 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2827 -DCMAKE_PREFIX_PATH="$PREFIX" \
2928 -DCMAKE_BUILD_TYPE=Release \
29 -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \
30 -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \
3031 -DZIG_TARGET_TRIPLE="$TARGET" \
3132 -DZIG_TARGET_MCPU="$MCPU" \
3233 -DZIG_STATIC=ON \
3334 -DZIG_NO_LIB=ON \
3435 -GNinja
3536
36# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
37# so that installation and testing do not get affected by them.
38unset CC
39unset CXX
40
4137ninja install
4238
4339# Must be done after zig cc is finished.
......@@ -63,6 +59,7 @@ stage3-release/bin/zig build \
6359 -Doptimize=ReleaseFast \
6460 -Dstrip \
6561 -Dtarget=$TARGET \
62 -Dcpu=$MCPU \
6663 -Duse-zig-libcxx \
6764 -Dversion-string="$(stage3-release/bin/zig version)"
6865
ci/x86_64-windows-debug.ps1+21-5
......@@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2
44$ZIG = "$PREFIX_PATH\bin\zig.exe"
55$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
66
7$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH"
8
79function CheckLastExitCode {
810 if (!$?) {
911 exit 1
......@@ -18,7 +20,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
1820$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
1921
2022Write-Output "Building from source..."
21New-Item -Path 'build-debug' -ItemType Directory
23New-Item -Force -Path 'build-debug' -ItemType Directory
2224Set-Location -Path 'build-debug'
2325
2426# CMake gives a syntax error when file paths with backward slashes are used.
......@@ -45,18 +47,32 @@ CheckLastExitCode
4547$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib"
4648
4749Write-Output "Main test suite..."
48stage3-debug\bin\zig build test docs `
50stage3-debug\bin\zig.exe build test docs `
4951 --maxrss $ZSF_MAX_RSS `
5052 --search-prefix "$PREFIX_PATH" `
5153 -Dstatic-llvm `
5254 -Dskip-non-native `
53 -Dskip-test-incremental `
5455 -Denable-symlinks-windows `
5556 --test-timeout 30m
5657CheckLastExitCode
5758
59Write-Output "Build and test stage4..."
60stage3-debug\bin\zig.exe build `
61 --prefix stage4-debug `
62 -Denable-llvm `
63 -Dno-lib `
64 -Doptimize=Debug `
65 -Dtarget="$TARGET" `
66 -Dcpu="$MCPU" `
67 -Duse-zig-libcxx `
68 -Dversion-string="$(stage3-debug\bin\zig.exe version)"
69CheckLastExitCode
70
71stage4-debug\bin\zig.exe test ..\test\behavior.zig
72CheckLastExitCode
73
5874Write-Output "Build x86_64-windows-msvc behavior tests using the C backend..."
59stage3-debug\bin\zig build-obj `
75stage3-debug\bin\zig.exe build-obj `
6076 -ofmt=c `
6177 -OReleaseSmall `
6278 --name compiler_rt `
......@@ -66,7 +82,7 @@ stage3-debug\bin\zig build-obj `
6682 ..\lib\compiler_rt.zig
6783CheckLastExitCode
6884
69stage3-debug\bin\zig test `
85stage3-debug\bin\zig.exe test `
7086 -ofmt=c `
7187 -femit-bin="behavior-x86_64-windows-msvc.c" `
7288 --test-no-exec `
ci/x86_64-windows-release.ps1+5-3
......@@ -4,6 +4,8 @@ $PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.2
44$ZIG = "$PREFIX_PATH\bin\zig.exe"
55$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
66
7$Env:PATH = "$($Env:USERPROFILE)\local\bin;$Env:PATH"
8
79function CheckLastExitCode {
810 if (!$?) {
911 exit 1
......@@ -18,7 +20,7 @@ $Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
1820$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
1921
2022Write-Output "Building from source..."
21New-Item -Path 'build-release' -ItemType Directory
23New-Item -Force -Path 'build-release' -ItemType Directory
2224Set-Location -Path 'build-release'
2325
2426# CMake gives a syntax error when file paths with backward slashes are used.
......@@ -50,7 +52,6 @@ stage3-release\bin\zig.exe build test docs `
5052 --search-prefix "$PREFIX_PATH" `
5153 -Dstatic-llvm `
5254 -Dskip-non-native `
53 -Dskip-test-incremental `
5455 -Denable-symlinks-windows `
5556 --test-timeout 30m
5657CheckLastExitCode
......@@ -71,8 +72,9 @@ stage3-release\bin\zig.exe build `
7172 -Doptimize=ReleaseFast `
7273 -Dstrip `
7374 -Dtarget="$TARGET" `
75 -Dcpu="$MCPU" `
7476 -Duse-zig-libcxx `
75 -Dversion-string="$(stage3-release\bin\zig version)"
77 -Dversion-string="$(stage3-release\bin\zig.exe version)"
7678CheckLastExitCode
7779
7880# Compare-Object returns an error code if the files differ.