From 2782acad0253d8bfe81be0cee33a4f56b7185db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 9 Sep 2026 13:46:43 +0200 Subject: [PATCH] ci: add aarch64-windows-debug script --- ci/aarch64-windows-debug.ps1 | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ci/aarch64-windows-debug.ps1 diff --git a/ci/aarch64-windows-debug.ps1 b/ci/aarch64-windows-debug.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..92f415bde1eeaf4d1e3978ecf057caf52f9d9010 --- /dev/null +++ b/ci/aarch64-windows-debug.ps1 @@ -0,0 +1,56 @@ +$TARGET = "aarch64-windows-gnu" +$MCPU = "baseline" +$PREFIX_PATH = "$($Env:USERPROFILE)\deps\zig+llvm+lld+clang-$TARGET-0.17.0-dev.203+073889523" +$ZIG = "$PREFIX_PATH\bin\zig.exe" +$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 } + +function CheckLastExitCode { + if (!$?) { + exit 1 + } + return 0 +} + +# Override the cache directories because they won't actually help other CI runs +# which will be testing alternate versions of zig, and ultimately would just +# fill up space on the hard drive for no reason. +$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache" +$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache" + +Write-Output "Building from source..." +New-Item -Force -Path 'build-debug' -ItemType Directory +Set-Location -Path 'build-debug' + +# CMake gives a syntax error when file paths with backward slashes are used. +# Here, we use forward slashes only to work around this. +cmake .. ` + -GNinja ` + -DCMAKE_INSTALL_PREFIX="stage3-debug" ` + -DCMAKE_PREFIX_PATH="$($PREFIX_PATH -Replace "\\", "/")" ` + -DCMAKE_BUILD_TYPE=Debug ` + -DCMAKE_C_COMPILER="$($ZIG -Replace "\\", "/");cc;-target;$TARGET;-mcpu=$MCPU" ` + -DCMAKE_CXX_COMPILER="$($ZIG -Replace "\\", "/");c++;-target;$TARGET;-mcpu=$MCPU" ` + -DCMAKE_AR="$($ZIG -Replace "\\", "/")" ` + -DZIG_AR_WORKAROUND=ON ` + -DZIG_TARGET_TRIPLE="$TARGET" ` + -DZIG_TARGET_MCPU="$MCPU" ` + -DZIG_STATIC=ON ` + -DZIG_NO_LIB=ON +CheckLastExitCode + +ninja install +CheckLastExitCode + +# Must be done after zig cc is finished. +$Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" + +Write-Output "Main test suite..." +stage3-debug\bin\zig build test docs ` + --maxrss $ZSF_MAX_RSS ` + --search-prefix "$PREFIX_PATH" ` + -Dstatic-llvm ` + -Dskip-non-native ` + -Dskip-test-incremental ` + -Denable-symlinks-windows ` + --test-timeout 30m +CheckLastExitCode -- 2.54.0