From 761857e3f9dae52b474b38bd2800b72e181745ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 20 Jul 2025 11:21:34 +0200 Subject: [PATCH 1/6] ci: temporarily disable test-link on riscv64-linux https://github.com/ziglang/zig/issues/24663 --- ci/riscv64-linux-debug.sh | 2 +- ci/riscv64-linux-release.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 4076ec2268..14982d1451 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -49,7 +49,7 @@ unset CXX ninja install # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. -stage3-debug/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-link test-stack-traces test-asm-link test-llvm-ir \ +stage3-debug/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-stack-traces test-asm-link test-llvm-ir \ --maxrss 68719476736 \ -Dstatic-llvm \ -Dskip-non-native \ diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 78c398cab4..b36e9a3407 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -49,7 +49,7 @@ unset CXX ninja install # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. -stage3-release/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-link test-stack-traces test-asm-link test-llvm-ir \ +stage3-release/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-stack-traces test-asm-link test-llvm-ir \ --maxrss 68719476736 \ -Dstatic-llvm \ -Dskip-non-native \ From bcaae562d6f62b8cff829eab19417b8dfc4a8dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 23 Jul 2025 00:23:31 +0200 Subject: [PATCH 2/6] build: add -Dskip-compile-errors option Skips tests in test/cases/compile_errors. --- build.zig | 2 ++ test/src/Cases.zig | 3 +++ 2 files changed, 5 insertions(+) diff --git a/build.zig b/build.zig index 60c4e8f0e4..95c97f29b6 100644 --- a/build.zig +++ b/build.zig @@ -90,6 +90,7 @@ pub fn build(b: *std.Build) !void { const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false; const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false; const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false; + const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false; const skip_translate_c = b.option(bool, "skip-translate-c", "Main test suite skips translate-c tests") orelse false; const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false; const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false; @@ -418,6 +419,7 @@ pub fn build(b: *std.Build) !void { try tests.addCases(b, test_cases_step, target, .{ .test_filters = test_filters, .test_target_filters = test_target_filters, + .skip_compile_errors = skip_compile_errors, .skip_non_native = skip_non_native, .skip_freebsd = skip_freebsd, .skip_netbsd = skip_netbsd, diff --git a/test/src/Cases.zig b/test/src/Cases.zig index 60a564bc16..7632a15232 100644 --- a/test/src/Cases.zig +++ b/test/src/Cases.zig @@ -593,6 +593,7 @@ pub fn lowerToTranslateCSteps( pub const CaseTestOptions = struct { test_filters: []const []const u8, test_target_filters: []const []const u8, + skip_compile_errors: bool, skip_non_native: bool, skip_freebsd: bool, skip_netbsd: bool, @@ -618,6 +619,8 @@ pub fn lowerToBuildSteps( if (std.mem.indexOf(u8, case.name, test_filter)) |_| break; } else if (options.test_filters.len > 0) continue; + if (case.case.? == .Error and options.skip_compile_errors) continue; + if (options.skip_non_native and !case.target.query.isNative()) continue; From a0e58501affec246ec12b42f6ffee078d6e33b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 23 Jul 2025 00:25:03 +0200 Subject: [PATCH 3/6] ci: use -Dskip-compile-errors on riscv64-linux --- ci/riscv64-linux-debug.sh | 1 + ci/riscv64-linux-release.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 14982d1451..512b33dc79 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -54,6 +54,7 @@ stage3-debug/bin/zig build test-cases test-modules test-unit test-standalone tes -Dstatic-llvm \ -Dskip-non-native \ -Dskip-single-threaded \ + -Dskip-compile-errors \ -Dskip-translate-c \ -Dskip-run-translated-c \ -Dtarget=native-native-musl \ diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index b36e9a3407..f8a9bb0939 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -54,6 +54,7 @@ stage3-release/bin/zig build test-cases test-modules test-unit test-standalone t -Dstatic-llvm \ -Dskip-non-native \ -Dskip-single-threaded \ + -Dskip-compile-errors \ -Dskip-translate-c \ -Dskip-run-translated-c \ -Dtarget=native-native-musl \ From 930c6ca49d8a556d256c5064a63af928e7833ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 23 Jul 2025 00:25:26 +0200 Subject: [PATCH 4/6] ci: don't run test-standalone on riscv64-linux --- ci/riscv64-linux-debug.sh | 2 +- ci/riscv64-linux-release.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 512b33dc79..c68952356c 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -49,7 +49,7 @@ unset CXX ninja install # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. -stage3-debug/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-stack-traces test-asm-link test-llvm-ir \ +stage3-debug/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-asm-link test-llvm-ir \ --maxrss 68719476736 \ -Dstatic-llvm \ -Dskip-non-native \ diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index f8a9bb0939..757dace271 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -49,7 +49,7 @@ unset CXX ninja install # No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. -stage3-release/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-stack-traces test-asm-link test-llvm-ir \ +stage3-release/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-asm-link test-llvm-ir \ --maxrss 68719476736 \ -Dstatic-llvm \ -Dskip-non-native \ From 4ec232a3460b5daeefbf89ad197a78c6856fb1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 2 Aug 2025 09:37:53 +0200 Subject: [PATCH 5/6] ci: set riscv64-linux timeouts to 6 hours --- .github/workflows/riscv.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/riscv.yaml b/.github/workflows/riscv.yaml index b5baf43a6d..5d4cc91c55 100644 --- a/.github/workflows/riscv.yaml +++ b/.github/workflows/riscv.yaml @@ -5,7 +5,7 @@ permissions: contents: read jobs: riscv64-linux-debug: - timeout-minutes: 1020 + timeout-minutes: 360 runs-on: [self-hosted, Linux, riscv64] steps: - name: Checkout @@ -13,7 +13,7 @@ jobs: - name: Build and Test run: sh ci/riscv64-linux-debug.sh riscv64-linux-release: - timeout-minutes: 900 + timeout-minutes: 360 runs-on: [self-hosted, Linux, riscv64] steps: - name: Checkout From bab0de92b72b24a3d14d69ec633edeb91b9d0ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 2 Aug 2025 09:39:56 +0200 Subject: [PATCH 6/6] ci: re-renable riscv64-linux-debug and riscv64-linux-release for master --- .github/workflows/ci.yaml | 18 ++++++++++++++++++ .github/workflows/riscv.yaml | 22 ---------------------- 2 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/riscv.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fd07b9add4..667316d8b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,6 +50,24 @@ jobs: uses: actions/checkout@v4 - name: Build and Test run: sh ci/aarch64-linux-release.sh + riscv64-linux-debug: + if: github.event_name == 'push' + timeout-minutes: 360 + runs-on: [self-hosted, Linux, riscv64] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build and Test + run: sh ci/riscv64-linux-debug.sh + riscv64-linux-release: + if: github.event_name == 'push' + timeout-minutes: 360 + runs-on: [self-hosted, Linux, riscv64] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build and Test + run: sh ci/riscv64-linux-release.sh x86_64-macos-release: runs-on: "macos-13" env: diff --git a/.github/workflows/riscv.yaml b/.github/workflows/riscv.yaml deleted file mode 100644 index 5d4cc91c55..0000000000 --- a/.github/workflows/riscv.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: riscv -on: - workflow_dispatch: -permissions: - contents: read -jobs: - riscv64-linux-debug: - timeout-minutes: 360 - runs-on: [self-hosted, Linux, riscv64] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build and Test - run: sh ci/riscv64-linux-debug.sh - riscv64-linux-release: - timeout-minutes: 360 - runs-on: [self-hosted, Linux, riscv64] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build and Test - run: sh ci/riscv64-linux-release.sh