authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-09 13:46:43+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-09 18:22:16+02:00
log2782acad0253d8bfe81be0cee33a4f56b7185db2
tree88dce0dfaa6c962b9b8476218b1b48f7a59b5155
parent480f6a47adbb4293ec827c537052613649da137c
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

ci: add aarch64-windows-debug script


1 files changed, 56 insertions(+), 0 deletions(-)

ci/aarch64-windows-debug.ps1 created+56
...@@ -0,0 +1,56 @@
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
7function CheckLastExitCode {
8 if (!$?) {
9 exit 1
10 }
11 return 0
12}
13
14# Override the cache directories because they won't actually help other CI runs
15# which will be testing alternate versions of zig, and ultimately would just
16# fill up space on the hard drive for no reason.
17$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
18$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
19
20Write-Output "Building from source..."
21New-Item -Force -Path 'build-debug' -ItemType Directory
22Set-Location -Path 'build-debug'
23
24# CMake gives a syntax error when file paths with backward slashes are used.
25# Here, we use forward slashes only to work around this.
26cmake .. `
27 -GNinja `
28 -DCMAKE_INSTALL_PREFIX="stage3-debug" `
29 -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" `
30 -DCMAKE_BUILD_TYPE=Debug `
31 -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" `
32 -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" `
33 -DCMAKE_AR="$($ZIG -Replace "\\", "/")" `
34 -DZIG_AR_WORKAROUND=ON `
35 -DZIG_TARGET_TRIPLE="$TARGET" `
36 -DZIG_TARGET_MCPU="$MCPU" `
37 -DZIG_STATIC=ON `
38 -DZIG_NO_LIB=ON
39CheckLastExitCode
40
41ninja install
42CheckLastExitCode
43
44# Must be done after zig cc is finished.
45$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib"
46
47Write-Output "Main test suite..."
48stage3-debug\bin\zig build test docs `
49 --maxrss $ZSF_MAX_RSS `
50 --search-prefix "$PREFIX_PATH" `
51 -Dstatic-llvm `
52 -Dskip-non-native `
53 -Dskip-test-incremental `
54 -Denable-symlinks-windows `
55 --test-timeout 30m
56CheckLastExitCode