disable windows tests on github
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 3m5s
All checks were successful
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 3m5s
This commit is contained in:
parent
52a5865caa
commit
c825ef72fe
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
|
@ -26,6 +26,6 @@ jobs:
|
|||
sudo tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz
|
||||
sudo ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig
|
||||
- name: Run tests
|
||||
run: zig build test --verbose
|
||||
run: zig build test -Dbroken-windows --verbose # Github runners try to run the windows tests despite disabling foreign checks
|
||||
- name: Build example
|
||||
run: ( cd example && zig build ) # Make sure example builds
|
||||
|
|
2
.github/workflows/zig-mach.yaml
vendored
2
.github/workflows/zig-mach.yaml
vendored
|
@ -33,6 +33,6 @@ jobs:
|
|||
sudo ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig
|
||||
zig version
|
||||
- name: Run tests
|
||||
run: zig build test --verbose
|
||||
run: zig build test -Dbroken-windows --verbose
|
||||
- name: Build example
|
||||
run: ( cd example && zig build ) # Make sure example builds
|
||||
|
|
2
.github/workflows/zig-nightly.yaml
vendored
2
.github/workflows/zig-nightly.yaml
vendored
|
@ -31,6 +31,6 @@ jobs:
|
|||
sudo ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig
|
||||
zig version
|
||||
- name: Run tests
|
||||
run: zig build test --verbose
|
||||
run: zig build test -Dbroken-windows --verbose
|
||||
- name: Build example
|
||||
run: ( cd example && zig build ) # Make sure example builds
|
||||
|
|
|
@ -53,6 +53,11 @@ pub fn build(b: *Builder) !void {
|
|||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const broken_windows = b.option(
|
||||
bool,
|
||||
"broken-windows",
|
||||
"Windows is broken in this environment (do not run Windows tests)",
|
||||
) orelse false;
|
||||
// TODO: Embed the current git version in the code. We can do this
|
||||
// by looking for .git/HEAD (if it exists, follow the ref to /ref/heads/whatevs,
|
||||
// grab that commit, and use b.addOptions/exe.addOptions to generate the
|
||||
|
@ -188,6 +193,7 @@ pub fn build(b: *Builder) !void {
|
|||
|
||||
// test_step.dependOn(&run_unit_tests.step);
|
||||
for (test_targets) |t| {
|
||||
if (broken_windows and t.os_tag == .windows) continue;
|
||||
// Creates a step for unit testing. This only builds the test executable
|
||||
// but does not run it.
|
||||
const unit_tests = b.addTest(.{
|
||||
|
|
Loading…
Reference in New Issue
Block a user