authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-08-12 03:51:09-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-08-12 03:51:09-04:00
logfa50e179f7f8d523ff00be4cac90bf7659394140
treebf67fc0f5bbe30bbfd8ba84a48594ae587ef1b90
parent645c396d02b7570d10d4d6b80653e7f9db42234e
parent5e42b0821a5aa6af2327b4380fd796be274cb024
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #12381 from hdorio/12380-fix-reporting-success

ci: windows: stop when exe exits with an error

5 files changed, 48 insertions(+), 2 deletions(-)

ci/azure/pipelines.yml+27-1
......@@ -27,7 +27,7 @@ jobs:
2727 vmImage: 'windows-2019'
2828 variables:
2929 TARGET: 'x86_64-windows-gnu'
30 ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.10.0-dev.2931+bdf3fa12f'
30 ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.10.0-dev.3524+74673b7f6'
3131 ZIG_LLVM_CLANG_LLD_URL: 'https://ziglang.org/deps/${{ variables.ZIG_LLVM_CLANG_LLD_NAME }}.zip'
3232 steps:
3333 - pwsh: |
......@@ -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'
test/link.zig+5
......@@ -3,6 +3,11 @@ const builtin = @import("builtin");
33const tests = @import("tests.zig");
44
55pub fn addCases(cases: *tests.StandaloneContext) void {
6 if (builtin.os.tag == .windows) {
7 // https://github.com/ziglang/zig/issues/12421
8 return;
9 }
10
611 cases.addBuildFile("test/link/bss/build.zig", .{
712 .build_modes = false, // we only guarantee zerofill for undefined in Debug
813 });
test/stack_traces.zig+5
......@@ -3,6 +3,11 @@ const os = std.os;
33const tests = @import("tests.zig");
44
55pub fn addCases(cases: *tests.StackTracesContext) void {
6 if (@import("builtin").os.tag == .windows) {
7 // https://github.com/ziglang/zig/issues/12422
8 return;
9 }
10
611 cases.addCase(.{
712 .name = "return",
813 .source =
test/standalone.zig+4-1
......@@ -34,7 +34,10 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
3434 if (builtin.zig_backend == .stage1) { // https://github.com/ziglang/zig/issues/12194
3535 cases.addBuildFile("test/standalone/issue_9812/build.zig", .{});
3636 }
37 cases.addBuildFile("test/standalone/issue_11595/build.zig", .{});
37 if (builtin.os.tag != .windows) {
38 // https://github.com/ziglang/zig/issues/12419
39 cases.addBuildFile("test/standalone/issue_11595/build.zig", .{});
40 }
3841 if (builtin.os.tag != .wasi) {
3942 cases.addBuildFile("test/standalone/load_dynamic_library/build.zig", .{});
4043 }
test/tests.zig+7
......@@ -641,6 +641,13 @@ pub fn addPkgTests(
641641 } else false;
642642 if (!want_this_mode) continue;
643643
644 if (test_target.backend) |backend| {
645 if (backend == .stage2_c and builtin.os.tag == .windows) {
646 // https://github.com/ziglang/zig/issues/12415
647 continue;
648 }
649 }
650
644651 const libc_prefix = if (test_target.target.getOs().requiresLibC())
645652 ""
646653 else if (test_target.link_libc)