mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
Merge pull request #12381 from hdorio/12380-fix-reporting-success
ci: windows: stop when exe exits with an error
This commit is contained in:
commit
fa50e179f7
@ -27,7 +27,7 @@ jobs:
|
||||
vmImage: 'windows-2019'
|
||||
variables:
|
||||
TARGET: 'x86_64-windows-gnu'
|
||||
ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.10.0-dev.2931+bdf3fa12f'
|
||||
ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.10.0-dev.3524+74673b7f6'
|
||||
ZIG_LLVM_CLANG_LLD_URL: 'https://ziglang.org/deps/${{ variables.ZIG_LLVM_CLANG_LLD_NAME }}.zip'
|
||||
steps:
|
||||
- pwsh: |
|
||||
@ -41,6 +41,13 @@ jobs:
|
||||
Set-Variable -Name ZIGINSTALLDIR -Value "${ZIGBUILDDIR}\dist"
|
||||
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.
|
||||
# This will affect the `zig build` command below which uses `git describe`.
|
||||
git config core.abbrev 9
|
||||
@ -69,6 +76,7 @@ jobs:
|
||||
-Dstrip `
|
||||
-Duse-zig-libcxx `
|
||||
-Dtarget=$(TARGET)
|
||||
CheckLastExitCode
|
||||
|
||||
cd -
|
||||
|
||||
@ -83,19 +91,37 @@ jobs:
|
||||
- pwsh: |
|
||||
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
|
||||
# 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
|
||||
#CheckLastExitCode
|
||||
|
||||
& "$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
|
||||
CheckLastExitCode
|
||||
name: test
|
||||
displayName: 'Test'
|
||||
|
||||
- pwsh: |
|
||||
Set-Variable -Name ZIGINSTALLDIR -Value "$(Get-Location)\build\dist"
|
||||
|
||||
function CheckLastExitCode {
|
||||
if (!$?) {
|
||||
exit 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
& "$ZIGINSTALLDIR\bin\zig.exe" build docs
|
||||
CheckLastExitCode
|
||||
timeoutInMinutes: 60
|
||||
name: doc
|
||||
displayName: 'Documentation'
|
||||
|
||||
@ -3,6 +3,11 @@ const builtin = @import("builtin");
|
||||
const tests = @import("tests.zig");
|
||||
|
||||
pub fn addCases(cases: *tests.StandaloneContext) void {
|
||||
if (builtin.os.tag == .windows) {
|
||||
// https://github.com/ziglang/zig/issues/12421
|
||||
return;
|
||||
}
|
||||
|
||||
cases.addBuildFile("test/link/bss/build.zig", .{
|
||||
.build_modes = false, // we only guarantee zerofill for undefined in Debug
|
||||
});
|
||||
|
||||
@ -3,6 +3,11 @@ const os = std.os;
|
||||
const tests = @import("tests.zig");
|
||||
|
||||
pub fn addCases(cases: *tests.StackTracesContext) void {
|
||||
if (@import("builtin").os.tag == .windows) {
|
||||
// https://github.com/ziglang/zig/issues/12422
|
||||
return;
|
||||
}
|
||||
|
||||
cases.addCase(.{
|
||||
.name = "return",
|
||||
.source =
|
||||
|
||||
@ -34,7 +34,10 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
|
||||
if (builtin.zig_backend == .stage1) { // https://github.com/ziglang/zig/issues/12194
|
||||
cases.addBuildFile("test/standalone/issue_9812/build.zig", .{});
|
||||
}
|
||||
cases.addBuildFile("test/standalone/issue_11595/build.zig", .{});
|
||||
if (builtin.os.tag != .windows) {
|
||||
// https://github.com/ziglang/zig/issues/12419
|
||||
cases.addBuildFile("test/standalone/issue_11595/build.zig", .{});
|
||||
}
|
||||
if (builtin.os.tag != .wasi) {
|
||||
cases.addBuildFile("test/standalone/load_dynamic_library/build.zig", .{});
|
||||
}
|
||||
|
||||
@ -641,6 +641,13 @@ pub fn addPkgTests(
|
||||
} else false;
|
||||
if (!want_this_mode) continue;
|
||||
|
||||
if (test_target.backend) |backend| {
|
||||
if (backend == .stage2_c and builtin.os.tag == .windows) {
|
||||
// https://github.com/ziglang/zig/issues/12415
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
const libc_prefix = if (test_target.target.getOs().requiresLibC())
|
||||
""
|
||||
else if (test_target.link_libc)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user