authorgravatar for hadrien.dorio@gmail.comHadrien Dorio <hadrien.dorio@gmail.com> 2022-08-09 04:16:54+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-08-11 12:48:11-07:00
logbcc6cdc4fb7784895bd3f508a8a642f3dae5d81e
treec19e0a69d43142559759a2c256df897f731e6487
parente67a43a673269edf477245931c70806f4b1abae1

ci: azure: stop when exe exits with an error


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

ci/azure/pipelines.yml+26
......@@ -41,6 +41,13 @@ jobs:
4141 Set-Variable -Name ZIGINSTALLDIR -Value "${ZIGBUILDDIR}\dist"
4242 Set-Variable -Name ZIGPREFIXPATH -Value "$(Get-Location)\$(ZIG_LLVM_CLANG_LLD_NAME)"
4343
44 function CheckLastExitCode {
45 if (!$?) {
46 exit 1
47 }
48 return 0
49 }
50
4451 # Make the `zig version` number consistent.
4552 # This will affect the `zig build` command below which uses `git describe`.
4653 git config core.abbrev 9
......@@ -69,6 +76,7 @@ jobs:
6976 -Dstrip `
7077 -Duse-zig-libcxx `
7178 -Dtarget=$(TARGET)
79 CheckLastExitCode
7280
7381 cd -
7482
......@@ -83,19 +91,37 @@ jobs:
8391 - pwsh: |
8492 Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
8593
94 function CheckLastExitCode {
95 if (!$?) {
96 exit 1
97 }
98 return 0
99 }
100
86101 # Sadly, stage2 is omitted from this build to save memory on the CI server. Once self-hosted is
87102 # built with itself and does not gobble as much memory, we can enable these tests.
88103 #& "$ZIGINSTALLDIR\bin\zig.exe" test "..\test\behavior.zig" -fno-stage1 -fLLVM -I "..\test" 2>&1
104 #CheckLastExitCode
89105
90106 & "$ZIGINSTALLDIR\bin\zig.exe" build test-toolchain -Dskip-non-native -Dskip-stage2-tests 2>&1
107 CheckLastExitCode
91108 & "$ZIGINSTALLDIR\bin\zig.exe" build test-std -Dskip-non-native 2>&1
109 CheckLastExitCode
92110 name: test
93111 displayName: 'Test'
94112
95113 - pwsh: |
96114 Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
97115
116 function CheckLastExitCode {
117 if (!$?) {
118 exit 1
119 }
120 return 0
121 }
122
98123 & "$ZIGINSTALLDIR\bin\zig.exe" build docs
124 CheckLastExitCode
99125 timeoutInMinutes: 60
100126 name: doc
101127 displayName: 'Documentation'