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 b5baf43a6d..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: 1020 - 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: 900 - runs-on: [self-hosted, Linux, riscv64] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build and Test - run: sh ci/riscv64-linux-release.sh 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/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 4076ec2268..c68952356c 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -49,11 +49,12 @@ 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-c-abi test-stack-traces test-asm-link test-llvm-ir \ --maxrss 68719476736 \ -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 78c398cab4..757dace271 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -49,11 +49,12 @@ 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-c-abi test-stack-traces test-asm-link test-llvm-ir \ --maxrss 68719476736 \ -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/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;