Skip to content

Commit 239efa7

Browse files
committed
Merge branch 'riscv-ci'
2 parents abf1795 + bab0de9 commit 239efa7

File tree

6 files changed

+27
-24
lines changed

6 files changed

+27
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ jobs:
5050
uses: actions/checkout@v4
5151
- name: Build and Test
5252
run: sh ci/aarch64-linux-release.sh
53+
riscv64-linux-debug:
54+
if: github.event_name == 'push'
55+
timeout-minutes: 360
56+
runs-on: [self-hosted, Linux, riscv64]
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
- name: Build and Test
61+
run: sh ci/riscv64-linux-debug.sh
62+
riscv64-linux-release:
63+
if: github.event_name == 'push'
64+
timeout-minutes: 360
65+
runs-on: [self-hosted, Linux, riscv64]
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
69+
- name: Build and Test
70+
run: sh ci/riscv64-linux-release.sh
5371
x86_64-macos-release:
5472
runs-on: "macos-13"
5573
env:

.github/workflows/riscv.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

build.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub fn build(b: *std.Build) !void {
9090
const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false;
9191
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
9292
const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false;
93+
const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false;
9394
const skip_translate_c = b.option(bool, "skip-translate-c", "Main test suite skips translate-c tests") orelse false;
9495
const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false;
9596
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 {
418419
try tests.addCases(b, test_cases_step, target, .{
419420
.test_filters = test_filters,
420421
.test_target_filters = test_target_filters,
422+
.skip_compile_errors = skip_compile_errors,
421423
.skip_non_native = skip_non_native,
422424
.skip_freebsd = skip_freebsd,
423425
.skip_netbsd = skip_netbsd,

ci/riscv64-linux-debug.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ unset CXX
4949
ninja install
5050

5151
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
52-
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 \
52+
stage3-debug/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-asm-link test-llvm-ir \
5353
--maxrss 68719476736 \
5454
-Dstatic-llvm \
5555
-Dskip-non-native \
5656
-Dskip-single-threaded \
57+
-Dskip-compile-errors \
5758
-Dskip-translate-c \
5859
-Dskip-run-translated-c \
5960
-Dtarget=native-native-musl \

ci/riscv64-linux-release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ unset CXX
4949
ninja install
5050

5151
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
52-
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 \
52+
stage3-release/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-asm-link test-llvm-ir \
5353
--maxrss 68719476736 \
5454
-Dstatic-llvm \
5555
-Dskip-non-native \
5656
-Dskip-single-threaded \
57+
-Dskip-compile-errors \
5758
-Dskip-translate-c \
5859
-Dskip-run-translated-c \
5960
-Dtarget=native-native-musl \

test/src/Cases.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ pub fn lowerToTranslateCSteps(
593593
pub const CaseTestOptions = struct {
594594
test_filters: []const []const u8,
595595
test_target_filters: []const []const u8,
596+
skip_compile_errors: bool,
596597
skip_non_native: bool,
597598
skip_freebsd: bool,
598599
skip_netbsd: bool,
@@ -618,6 +619,8 @@ pub fn lowerToBuildSteps(
618619
if (std.mem.indexOf(u8, case.name, test_filter)) |_| break;
619620
} else if (options.test_filters.len > 0) continue;
620621

622+
if (case.case.? == .Error and options.skip_compile_errors) continue;
623+
621624
if (options.skip_non_native and !case.target.query.isNative())
622625
continue;
623626

0 commit comments

Comments
 (0)