authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-04-13 23:12:52-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-04-14 21:26:09-04:00
log71ccdb5a66da500f8447018553ff0ac32e55face
treeb1f883c456f4fc38b59cb2bea188ea5dad777030
parent425e38b6e0601e12329f93b2e94c76c1da300b8e

ci: add self-hosted x86_64 windows


10 files changed, 48 insertions(+), 62 deletions(-)

.github/workflows/ci.yaml+2-2
...@@ -69,7 +69,7 @@ jobs:...@@ -69,7 +69,7 @@ jobs:
69 - name: Build and Test69 - name: Build and Test
70 run: ci/aarch64-macos-release.sh70 run: ci/aarch64-macos-release.sh
71 x86_64-windows-debug:71 x86_64-windows-debug:
72 runs-on: windows-latest72 runs-on: [self-hosted, Windows, x86_64]
73 env:73 env:
74 ARCH: "x86_64"74 ARCH: "x86_64"
75 steps:75 steps:
...@@ -78,7 +78,7 @@ jobs:...@@ -78,7 +78,7 @@ jobs:
78 - name: Build and Test78 - name: Build and Test
79 run: ci/x86_64-windows-debug.ps179 run: ci/x86_64-windows-debug.ps1
80 x86_64-windows-release:80 x86_64-windows-release:
81 runs-on: windows-latest81 runs-on: [self-hosted, Windows, x86_64]
82 env:82 env:
83 ARCH: "x86_64"83 ARCH: "x86_64"
84 steps:84 steps:
ci/aarch64-linux-debug.sh+6-6
...@@ -29,8 +29,8 @@ cd build-debug...@@ -29,8 +29,8 @@ cd build-debug
29# Override the cache directories because they won't actually help other CI runs29# Override the cache directories because they won't actually help other CI runs
30# which will be testing alternate versions of zig, and ultimately would just30# which will be testing alternate versions of zig, and ultimately would just
31# fill up space on the hard drive for no reason.31# fill up space on the hard drive for no reason.
32export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"32export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
33export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"33export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
3434
35cmake .. \35cmake .. \
36 -DCMAKE_INSTALL_PREFIX="stage3-debug" \36 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
...@@ -67,7 +67,7 @@ stage3-debug/bin/zig build test docs \...@@ -67,7 +67,7 @@ stage3-debug/bin/zig build test docs \
67 -Dstatic-llvm \67 -Dstatic-llvm \
68 -Dtarget=native-native-musl \68 -Dtarget=native-native-musl \
69 --search-prefix "$PREFIX" \69 --search-prefix "$PREFIX" \
70 --zig-lib-dir "$(pwd)/../lib"70 --zig-lib-dir "$PWD/../lib"
7171
72# Look for HTML errors.72# Look for HTML errors.
73# TODO: move this to a build.zig flag (-Denable-tidy)73# TODO: move this to a build.zig flag (-Denable-tidy)
...@@ -80,8 +80,8 @@ rm -rf ../build-new...@@ -80,8 +80,8 @@ rm -rf ../build-new
80mkdir ../build-new80mkdir ../build-new
81cd ../build-new81cd ../build-new
8282
83export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"83export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
84export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"84export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
85export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"85export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
86export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"86export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
8787
...@@ -105,5 +105,5 @@ stage3/bin/zig build -p stage4 \...@@ -105,5 +105,5 @@ stage3/bin/zig build -p stage4 \
105 -Dtarget=native-native-musl \105 -Dtarget=native-native-musl \
106 -Dno-lib \106 -Dno-lib \
107 --search-prefix "$PREFIX" \107 --search-prefix "$PREFIX" \
108 --zig-lib-dir "$(pwd)/../lib"108 --zig-lib-dir "$PWD/../lib"
109stage4/bin/zig test ../test/behavior.zig109stage4/bin/zig test ../test/behavior.zig
ci/aarch64-linux-release.sh+6-6
...@@ -29,8 +29,8 @@ cd build-release...@@ -29,8 +29,8 @@ cd build-release
29# Override the cache directories because they won't actually help other CI runs29# Override the cache directories because they won't actually help other CI runs
30# which will be testing alternate versions of zig, and ultimately would just30# which will be testing alternate versions of zig, and ultimately would just
31# fill up space on the hard drive for no reason.31# fill up space on the hard drive for no reason.
32export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"32export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
33export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"33export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
3434
35cmake .. \35cmake .. \
36 -DCMAKE_INSTALL_PREFIX="stage3-release" \36 -DCMAKE_INSTALL_PREFIX="stage3-release" \
...@@ -67,7 +67,7 @@ stage3-release/bin/zig build test docs \...@@ -67,7 +67,7 @@ stage3-release/bin/zig build test docs \
67 -Dstatic-llvm \67 -Dstatic-llvm \
68 -Dtarget=native-native-musl \68 -Dtarget=native-native-musl \
69 --search-prefix "$PREFIX" \69 --search-prefix "$PREFIX" \
70 --zig-lib-dir "$(pwd)/../lib"70 --zig-lib-dir "$PWD/../lib"
7171
72# Look for HTML errors.72# Look for HTML errors.
73# TODO: move this to a build.zig flag (-Denable-tidy)73# TODO: move this to a build.zig flag (-Denable-tidy)
...@@ -80,8 +80,8 @@ rm -rf ../build-new...@@ -80,8 +80,8 @@ rm -rf ../build-new
80mkdir ../build-new80mkdir ../build-new
81cd ../build-new81cd ../build-new
8282
83export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"83export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
84export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"84export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
85export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"85export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
86export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"86export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
8787
...@@ -105,5 +105,5 @@ stage3/bin/zig build -p stage4 \...@@ -105,5 +105,5 @@ stage3/bin/zig build -p stage4 \
105 -Dtarget=native-native-musl \105 -Dtarget=native-native-musl \
106 -Dno-lib \106 -Dno-lib \
107 --search-prefix "$PREFIX" \107 --search-prefix "$PREFIX" \
108 --zig-lib-dir "$(pwd)/../lib"108 --zig-lib-dir "$PWD/../lib"
109stage4/bin/zig test ../test/behavior.zig109stage4/bin/zig test ../test/behavior.zig
ci/aarch64-macos-debug.sh+4-4
...@@ -6,7 +6,7 @@ set -e...@@ -6,7 +6,7 @@ set -e
6# Script assumes the presence of the following:6# Script assumes the presence of the following:
7# s3cmd7# s3cmd
88
9ZIGDIR="$(pwd)"9ZIGDIR="$PWD"
10TARGET="$ARCH-macos-none"10TARGET="$ARCH-macos-none"
11MCPU="baseline"11MCPU="baseline"
12CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"12CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
...@@ -26,8 +26,8 @@ cd build...@@ -26,8 +26,8 @@ cd build
26# Override the cache directories because they won't actually help other CI runs26# Override the cache directories because they won't actually help other CI runs
27# which will be testing alternate versions of zig, and ultimately would just27# which will be testing alternate versions of zig, and ultimately would just
28# fill up space on the hard drive for no reason.28# fill up space on the hard drive for no reason.
29export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"29export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
30export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"30export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
3131
32PATH="$HOME/local/bin:$PATH" cmake .. \32PATH="$HOME/local/bin:$PATH" cmake .. \
33 -DCMAKE_INSTALL_PREFIX="stage3-debug" \33 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
...@@ -44,7 +44,7 @@ PATH="$HOME/local/bin:$PATH" cmake .. \...@@ -44,7 +44,7 @@ PATH="$HOME/local/bin:$PATH" cmake .. \
44$HOME/local/bin/ninja install44$HOME/local/bin/ninja install
4545
46stage3-debug/bin/zig build test docs \46stage3-debug/bin/zig build test docs \
47 --zig-lib-dir "$(pwd)/../lib" \47 --zig-lib-dir "$PWD/../lib" \
48 -Denable-macos-sdk \48 -Denable-macos-sdk \
49 -Dstatic-llvm \49 -Dstatic-llvm \
50 -Dskip-non-native \50 -Dskip-non-native \
ci/aarch64-macos-release.sh+4-4
...@@ -6,7 +6,7 @@ set -e...@@ -6,7 +6,7 @@ set -e
6# Script assumes the presence of the following:6# Script assumes the presence of the following:
7# s3cmd7# s3cmd
88
9ZIGDIR="$(pwd)"9ZIGDIR="$PWD"
10TARGET="$ARCH-macos-none"10TARGET="$ARCH-macos-none"
11MCPU="baseline"11MCPU="baseline"
12CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"12CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
...@@ -26,8 +26,8 @@ cd build...@@ -26,8 +26,8 @@ cd build
26# Override the cache directories because they won't actually help other CI runs26# Override the cache directories because they won't actually help other CI runs
27# which will be testing alternate versions of zig, and ultimately would just27# which will be testing alternate versions of zig, and ultimately would just
28# fill up space on the hard drive for no reason.28# fill up space on the hard drive for no reason.
29export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"29export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
30export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"30export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
3131
32PATH="$HOME/local/bin:$PATH" cmake .. \32PATH="$HOME/local/bin:$PATH" cmake .. \
33 -DCMAKE_INSTALL_PREFIX="stage3-release" \33 -DCMAKE_INSTALL_PREFIX="stage3-release" \
...@@ -44,7 +44,7 @@ PATH="$HOME/local/bin:$PATH" cmake .. \...@@ -44,7 +44,7 @@ PATH="$HOME/local/bin:$PATH" cmake .. \
44$HOME/local/bin/ninja install44$HOME/local/bin/ninja install
4545
46stage3-release/bin/zig build test docs \46stage3-release/bin/zig build test docs \
47 --zig-lib-dir "$(pwd)/../lib" \47 --zig-lib-dir "$PWD/../lib" \
48 -Denable-macos-sdk \48 -Denable-macos-sdk \
49 -Dstatic-llvm \49 -Dstatic-llvm \
50 -Dskip-non-native \50 -Dskip-non-native \
ci/x86_64-linux-debug.sh+6-6
...@@ -37,8 +37,8 @@ cd build-debug...@@ -37,8 +37,8 @@ cd build-debug
37# Override the cache directories because they won't actually help other CI runs37# Override the cache directories because they won't actually help other CI runs
38# which will be testing alternate versions of zig, and ultimately would just38# which will be testing alternate versions of zig, and ultimately would just
39# fill up space on the hard drive for no reason.39# fill up space on the hard drive for no reason.
40export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"40export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
41export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"41export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
4242
43cmake .. \43cmake .. \
44 -DCMAKE_INSTALL_PREFIX="stage3-debug" \44 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
...@@ -75,7 +75,7 @@ stage3-debug/bin/zig build test docs \...@@ -75,7 +75,7 @@ stage3-debug/bin/zig build test docs \
75 -Dstatic-llvm \75 -Dstatic-llvm \
76 -Dtarget=native-native-musl \76 -Dtarget=native-native-musl \
77 --search-prefix "$PREFIX" \77 --search-prefix "$PREFIX" \
78 --zig-lib-dir "$(pwd)/../lib"78 --zig-lib-dir "$PWD/../lib"
7979
80# Look for HTML errors.80# Look for HTML errors.
81# TODO: move this to a build.zig flag (-Denable-tidy)81# TODO: move this to a build.zig flag (-Denable-tidy)
...@@ -88,8 +88,8 @@ rm -rf ../build-new...@@ -88,8 +88,8 @@ rm -rf ../build-new
88mkdir ../build-new88mkdir ../build-new
89cd ../build-new89cd ../build-new
9090
91export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"91export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
92export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"92export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
93export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"93export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
94export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"94export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
9595
...@@ -113,5 +113,5 @@ stage3/bin/zig build -p stage4 \...@@ -113,5 +113,5 @@ stage3/bin/zig build -p stage4 \
113 -Dtarget=native-native-musl \113 -Dtarget=native-native-musl \
114 -Dno-lib \114 -Dno-lib \
115 --search-prefix "$PREFIX" \115 --search-prefix "$PREFIX" \
116 --zig-lib-dir "$(pwd)/../lib"116 --zig-lib-dir "$PWD/../lib"
117stage4/bin/zig test ../test/behavior.zig117stage4/bin/zig test ../test/behavior.zig
ci/x86_64-linux-release.sh+6-6
...@@ -37,8 +37,8 @@ cd build-release...@@ -37,8 +37,8 @@ cd build-release
37# Override the cache directories because they won't actually help other CI runs37# Override the cache directories because they won't actually help other CI runs
38# which will be testing alternate versions of zig, and ultimately would just38# which will be testing alternate versions of zig, and ultimately would just
39# fill up space on the hard drive for no reason.39# fill up space on the hard drive for no reason.
40export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"40export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
41export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"41export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
4242
43cmake .. \43cmake .. \
44 -DCMAKE_INSTALL_PREFIX="stage3-release" \44 -DCMAKE_INSTALL_PREFIX="stage3-release" \
...@@ -76,7 +76,7 @@ stage3-release/bin/zig build test docs \...@@ -76,7 +76,7 @@ stage3-release/bin/zig build test docs \
76 -Dstatic-llvm \76 -Dstatic-llvm \
77 -Dtarget=native-native-musl \77 -Dtarget=native-native-musl \
78 --search-prefix "$PREFIX" \78 --search-prefix "$PREFIX" \
79 --zig-lib-dir "$(pwd)/../lib"79 --zig-lib-dir "$PWD/../lib"
8080
81# Look for HTML errors.81# Look for HTML errors.
82# TODO: move this to a build.zig flag (-Denable-tidy)82# TODO: move this to a build.zig flag (-Denable-tidy)
...@@ -105,8 +105,8 @@ rm -rf ../build-new...@@ -105,8 +105,8 @@ rm -rf ../build-new
105mkdir ../build-new105mkdir ../build-new
106cd ../build-new106cd ../build-new
107107
108export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"108export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
109export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"109export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
110export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"110export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
111export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"111export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
112112
...@@ -130,5 +130,5 @@ stage3/bin/zig build -p stage4 \...@@ -130,5 +130,5 @@ stage3/bin/zig build -p stage4 \
130 -Dtarget=native-native-musl \130 -Dtarget=native-native-musl \
131 -Dno-lib \131 -Dno-lib \
132 --search-prefix "$PREFIX" \132 --search-prefix "$PREFIX" \
133 --zig-lib-dir "$(pwd)/../lib"133 --zig-lib-dir "$PWD/../lib"
134stage4/bin/zig test ../test/behavior.zig134stage4/bin/zig test ../test/behavior.zig
ci/x86_64-macos-release.sh+4-4
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3set -x3set -x
4set -e4set -e
55
6ZIGDIR="$(pwd)"6ZIGDIR="$PWD"
7TARGET="$ARCH-macos-none"7TARGET="$ARCH-macos-none"
8MCPU="baseline"8MCPU="baseline"
9CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"9CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.12.0-dev.467+0345d7866"
...@@ -40,8 +40,8 @@ cd build...@@ -40,8 +40,8 @@ cd build
40# Override the cache directories because they won't actually help other CI runs40# Override the cache directories because they won't actually help other CI runs
41# which will be testing alternate versions of zig, and ultimately would just41# which will be testing alternate versions of zig, and ultimately would just
42# fill up space on the hard drive for no reason.42# fill up space on the hard drive for no reason.
43export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"43export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache"
44export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"44export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache"
4545
46cmake .. \46cmake .. \
47 -DCMAKE_PREFIX_PATH="$PREFIX" \47 -DCMAKE_PREFIX_PATH="$PREFIX" \
...@@ -56,7 +56,7 @@ cmake .. \...@@ -56,7 +56,7 @@ cmake .. \
56make $JOBS install56make $JOBS install
5757
58stage3/bin/zig build test docs \58stage3/bin/zig build test docs \
59 --zig-lib-dir "$(pwd)/../lib" \59 --zig-lib-dir "$PWD/../lib" \
60 -Denable-macos-sdk \60 -Denable-macos-sdk \
61 -Dstatic-llvm \61 -Dstatic-llvm \
62 -Dskip-non-native \62 -Dskip-non-native \
ci/x86_64-windows-debug.ps1+5-12
...@@ -1,19 +1,10 @@...@@ -1,19 +1,10 @@
1$TARGET = "$($Env:ARCH)-windows-gnu"1$TARGET = "$($Env:ARCH)-windows-gnu"
2$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2073+402fe565a"2$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2073+402fe565a"
3$MCPU = "baseline"3$MCPU = "baseline"
4$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"4$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
5$PREFIX_PATH = "$(Get-Location)\$ZIG_LLVM_CLANG_LLD_NAME"
6$ZIG = "$PREFIX_PATH\bin\zig.exe"5$ZIG = "$PREFIX_PATH\bin\zig.exe"
7$ZIG_LIB_DIR = "$(Get-Location)\lib"6$ZIG_LIB_DIR = "$(Get-Location)\lib"
87
9choco install ninja
10Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
11Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "$ZIG_LLVM_CLANG_LLD_NAME.zip"
12
13Write-Output "Extracting..."
14Add-Type -AssemblyName System.IO.Compression.FileSystem ;
15[System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD")
16
17function CheckLastExitCode {8function CheckLastExitCode {
18 if (!$?) {9 if (!$?) {
19 exit 110 exit 1
...@@ -43,6 +34,8 @@ Set-Location -Path 'build-debug'...@@ -43,6 +34,8 @@ Set-Location -Path 'build-debug'
43 -DCMAKE_BUILD_TYPE=Debug `34 -DCMAKE_BUILD_TYPE=Debug `
44 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `35 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `
45 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `36 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `
37 -DCMAKE_AR="$($ZIG -Replace "\\", "/")" `
38 -DZIG_AR_WORKAROUND=ON `
46 -DZIG_TARGET_TRIPLE="$TARGET" `39 -DZIG_TARGET_TRIPLE="$TARGET" `
47 -DZIG_TARGET_MCPU="$MCPU" `40 -DZIG_TARGET_MCPU="$MCPU" `
48 -DZIG_STATIC=ON `41 -DZIG_STATIC=ON `
...@@ -85,10 +78,10 @@ CheckLastExitCode...@@ -85,10 +78,10 @@ CheckLastExitCode
85 --mod build_options config.zig78 --mod build_options config.zig
86CheckLastExitCode79CheckLastExitCode
8780
88Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"81Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
89CheckLastExitCode82CheckLastExitCode
9083
91Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" `84Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" `
92 -DevCmdArguments '-arch=x64 -no_logo' `85 -DevCmdArguments '-arch=x64 -no_logo' `
93 -StartInPath $(Get-Location)86 -StartInPath $(Get-Location)
94CheckLastExitCode87CheckLastExitCode
ci/x86_64-windows-release.ps1+5-12
...@@ -1,19 +1,10 @@...@@ -1,19 +1,10 @@
1$TARGET = "$($Env:ARCH)-windows-gnu"1$TARGET = "$($Env:ARCH)-windows-gnu"
2$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2073+402fe565a"2$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.12.0-dev.2073+402fe565a"
3$MCPU = "baseline"3$MCPU = "baseline"
4$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"4$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
5$PREFIX_PATH = "$(Get-Location)\$ZIG_LLVM_CLANG_LLD_NAME"
6$ZIG = "$PREFIX_PATH\bin\zig.exe"5$ZIG = "$PREFIX_PATH\bin\zig.exe"
7$ZIG_LIB_DIR = "$(Get-Location)\lib"6$ZIG_LIB_DIR = "$(Get-Location)\lib"
87
9choco install ninja
10Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
11Invoke-WebRequest -Uri "$ZIG_LLVM_CLANG_LLD_URL" -OutFile "$ZIG_LLVM_CLANG_LLD_NAME.zip"
12
13Write-Output "Extracting..."
14Add-Type -AssemblyName System.IO.Compression.FileSystem ;
15[System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/$ZIG_LLVM_CLANG_LLD_NAME.zip", "$PWD")
16
17function CheckLastExitCode {8function CheckLastExitCode {
18 if (!$?) {9 if (!$?) {
19 exit 110 exit 1
...@@ -43,6 +34,8 @@ Set-Location -Path 'build-release'...@@ -43,6 +34,8 @@ Set-Location -Path 'build-release'
43 -DCMAKE_BUILD_TYPE=Release `34 -DCMAKE_BUILD_TYPE=Release `
44 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `35 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `
45 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `36 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `
37 -DCMAKE_AR="$($ZIG -Replace "\\", "/")" `
38 -DZIG_AR_WORKAROUND=ON `
46 -DZIG_TARGET_TRIPLE="$TARGET" `39 -DZIG_TARGET_TRIPLE="$TARGET" `
47 -DZIG_TARGET_MCPU="$MCPU" `40 -DZIG_TARGET_MCPU="$MCPU" `
48 -DZIG_STATIC=ON `41 -DZIG_STATIC=ON `
...@@ -84,10 +77,10 @@ CheckLastExitCode...@@ -84,10 +77,10 @@ CheckLastExitCode
84 --mod build_options config.zig77 --mod build_options config.zig
85CheckLastExitCode78CheckLastExitCode
8679
87Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"80Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
88CheckLastExitCode81CheckLastExitCode
8982
90Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" `83Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" `
91 -DevCmdArguments '-arch=x64 -no_logo' `84 -DevCmdArguments '-arch=x64 -no_logo' `
92 -StartInPath $(Get-Location)85 -StartInPath $(Get-Location)
93CheckLastExitCode86CheckLastExitCode