zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit c641af3cba8f0e8e6bba0ba26dce18bd225a832e (tree)
parent cb094700631ea1ae238ea678c192ce4f85fbecc0
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sun, 19 Feb 2023 16:23:59 -0700

CI: use -j1 like a coward

Zig's build script has several race conditions preventing proper
concurrent builds from working. By using -j1 for now, finishing this
branch (concurrent zig builds) is untangled from the separate problem of
correcting concurrency issues with zig's own build script.

In other words, let's solve one problem at a time.

Diffstat:
Mci/aarch64-linux-debug.sh | 1+
Mci/aarch64-linux-release.sh | 1+
Mci/aarch64-macos.sh | 1+
Mci/x86_64-linux-debug.sh | 1+
Mci/x86_64-linux-release.sh | 1+
Mci/x86_64-macos-debug.sh | 1+
Mci/x86_64-macos-release.sh | 1+
Mtest/tests.zig | 4++++
8 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh @@ -60,6 +60,7 @@ stage3-debug/bin/zig build -Dtarget=arm-linux-musleabihf # TODO: add -fqemu back to this line stage3-debug/bin/zig build test docs \ + -j1 \ -fwasmtime \ -Dstatic-llvm \ -Dtarget=native-native-musl \ diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh @@ -60,6 +60,7 @@ stage3-release/bin/zig build -Dtarget=arm-linux-musleabihf # TODO: add -fqemu back to this line stage3-release/bin/zig build test docs \ + -j1 \ -fwasmtime \ -Dstatic-llvm \ -Dtarget=native-native-musl \ diff --git a/ci/aarch64-macos.sh b/ci/aarch64-macos.sh @@ -44,6 +44,7 @@ PATH="$HOME/local/bin:$PATH" cmake .. \ $HOME/local/bin/ninja install stage3-release/bin/zig build test docs \ + -j1 \ --zig-lib-dir "$(pwd)/../lib" \ -Denable-macos-sdk \ -Dstatic-llvm \ diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh @@ -58,6 +58,7 @@ stage3-debug/bin/zig fmt --check .. \ stage3-debug/bin/zig build -Dtarget=arm-linux-musleabihf stage3-debug/bin/zig build test docs \ + -j1 \ -fqemu \ -fwasmtime \ -Dstatic-llvm \ diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh @@ -59,6 +59,7 @@ stage3-release/bin/zig fmt --check .. \ stage3-release/bin/zig build -Dtarget=arm-linux-musleabihf stage3-release/bin/zig build test docs \ + -j1 \ -fqemu \ -fwasmtime \ -Dstatic-llvm \ diff --git a/ci/x86_64-macos-debug.sh b/ci/x86_64-macos-debug.sh @@ -48,6 +48,7 @@ cmake .. \ make $JOBS install stage3/bin/zig build test docs \ + -j1 \ --zig-lib-dir "$(pwd)/../lib" \ -Denable-macos-sdk \ -Dstatic-llvm \ diff --git a/ci/x86_64-macos-release.sh b/ci/x86_64-macos-release.sh @@ -48,6 +48,7 @@ cmake .. \ make $JOBS install stage3/bin/zig build test docs \ + -j1 \ --zig-lib-dir "$(pwd)/../lib" \ -Denable-macos-sdk \ -Dstatic-llvm \ diff --git a/test/tests.zig b/test/tests.zig @@ -1067,6 +1067,10 @@ pub const StandaloneContext = struct { zig_args.append(rel_zig_exe) catch unreachable; zig_args.append("build") catch unreachable; + // TODO: fix the various non-concurrency-safe issues in zig's standalone tests, + // and then remove this! + zig_args.append("-j1") catch @panic("OOM"); + zig_args.append("--build-file") catch unreachable; zig_args.append(b.pathFromRoot(build_file)) catch unreachable;