mirror of
https://github.com/ziglang/zig.git
synced 2025-12-11 00:33:08 +00:00
ci: azure: stop when exe exits with an error
This commit is contained in:
parent
e67a43a673
commit
bcc6cdc4fb
@ -41,6 +41,13 @@ jobs:
|
|||||||
Set-Variable -Name ZIGINSTALLDIR -Value "${ZIGBUILDDIR}\dist"
|
Set-Variable -Name ZIGINSTALLDIR -Value "${ZIGBUILDDIR}\dist"
|
||||||
Set-Variable -Name ZIGPREFIXPATH -Value "$(Get-Location)\$(ZIG_LLVM_CLANG_LLD_NAME)"
|
Set-Variable -Name ZIGPREFIXPATH -Value "$(Get-Location)\$(ZIG_LLVM_CLANG_LLD_NAME)"
|
||||||
|
|
||||||
|
function CheckLastExitCode {
|
||||||
|
if (!$?) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Make the `zig version` number consistent.
|
# Make the `zig version` number consistent.
|
||||||
# This will affect the `zig build` command below which uses `git describe`.
|
# This will affect the `zig build` command below which uses `git describe`.
|
||||||
git config core.abbrev 9
|
git config core.abbrev 9
|
||||||
@ -69,6 +76,7 @@ jobs:
|
|||||||
-Dstrip `
|
-Dstrip `
|
||||||
-Duse-zig-libcxx `
|
-Duse-zig-libcxx `
|
||||||
-Dtarget=$(TARGET)
|
-Dtarget=$(TARGET)
|
||||||
|
CheckLastExitCode
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
@ -83,19 +91,37 @@ jobs:
|
|||||||
- pwsh: |
|
- pwsh: |
|
||||||
Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
|
Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
|
||||||
|
|
||||||
|
function CheckLastExitCode {
|
||||||
|
if (!$?) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Sadly, stage2 is omitted from this build to save memory on the CI server. Once self-hosted is
|
# Sadly, stage2 is omitted from this build to save memory on the CI server. Once self-hosted is
|
||||||
# built with itself and does not gobble as much memory, we can enable these tests.
|
# built with itself and does not gobble as much memory, we can enable these tests.
|
||||||
#& "$ZIGINSTALLDIR\bin\zig.exe" test "..\test\behavior.zig" -fno-stage1 -fLLVM -I "..\test" 2>&1
|
#& "$ZIGINSTALLDIR\bin\zig.exe" test "..\test\behavior.zig" -fno-stage1 -fLLVM -I "..\test" 2>&1
|
||||||
|
#CheckLastExitCode
|
||||||
|
|
||||||
& "$ZIGINSTALLDIR\bin\zig.exe" build test-toolchain -Dskip-non-native -Dskip-stage2-tests 2>&1
|
& "$ZIGINSTALLDIR\bin\zig.exe" build test-toolchain -Dskip-non-native -Dskip-stage2-tests 2>&1
|
||||||
|
CheckLastExitCode
|
||||||
& "$ZIGINSTALLDIR\bin\zig.exe" build test-std -Dskip-non-native 2>&1
|
& "$ZIGINSTALLDIR\bin\zig.exe" build test-std -Dskip-non-native 2>&1
|
||||||
|
CheckLastExitCode
|
||||||
name: test
|
name: test
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
|
|
||||||
- pwsh: |
|
- pwsh: |
|
||||||
Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
|
Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
|
||||||
|
|
||||||
|
function CheckLastExitCode {
|
||||||
|
if (!$?) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
& "$ZIGINSTALLDIR\bin\zig.exe" build docs
|
& "$ZIGINSTALLDIR\bin\zig.exe" build docs
|
||||||
|
CheckLastExitCode
|
||||||
timeoutInMinutes: 60
|
timeoutInMinutes: 60
|
||||||
name: doc
|
name: doc
|
||||||
displayName: 'Documentation'
|
displayName: 'Documentation'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user