╭ aarch64-windows-debug.ps1 ────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
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 9 function 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 22 Write-Output "Building from source..." 23 New-Item -Force -Path 'build-debug' -ItemType Directory 24 Set-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. 28 cmake .. ` 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 41 CheckLastExitCode 42 43 ninja install 44 CheckLastExitCode 45 46 # Must be done after zig cc is finished. 47 $Env:ZIG_LIB_DIR="$(Get-Location)\..\lib" 48 49 Write-Output "Main test suite..." 50 stage3-debug\bin\zig.exe build install test docs ` 51 --maxrss "$ZSF_MAX_RSS" ` 52 --prefix stage4-debug ` 53 --search-prefix "$PREFIX_PATH" ` 54 --test-timeout 30m ` 55 -Dversion-string="$(stage3-debug\bin\zig.exe version)" ` 56 -Dtarget="$TARGET" ` 57 -Dcpu="$MCPU" ` 58 -Duse-zig-libcxx ` 59 -Denable-llvm ` 60 -Dno-lib ` 61 -Denable-symlinks-windows ` 62 -Dskip-non-native 63 CheckLastExitCode 64 65 stage4-debug\bin\zig.exe test ..\test\behavior.zig 66 CheckLastExitCode 67