Skip to content

Commit 7095783

Browse files
committed
Only run abi-cafe on cg_clif's CI
1 parent 611c518 commit 7095783

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

.github/workflows/main.yml

+8
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ jobs:
114114
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
115115
run: ./y.rs test
116116

117+
- name: Test abi-cafe
118+
env:
119+
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
120+
run: |
121+
if [[ "$(rustc -vV | grep host | cut -d' ' -f2)" == "$TARGET_TRIPLE" ]]; then
122+
./y.rs abi-cafe
123+
fi
124+
117125
- name: Package prebuilt cg_clif
118126
run: tar cvfJ cg_clif.tar.xz dist
119127

build_system/abi_cafe.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::path::Path;
22

33
use super::build_sysroot;
4-
use super::config;
54
use super::path::Dirs;
65
use super::prepare::GitRepo;
76
use super::utils::{spawn_and_wait, CargoProject, Compiler};
@@ -20,11 +19,6 @@ pub(crate) fn run(
2019
cg_clif_dylib: &Path,
2120
bootstrap_host_compiler: &Compiler,
2221
) {
23-
if !config::get_bool("testsuite.abi-cafe") {
24-
eprintln!("[RUN] abi-cafe (skipped)");
25-
return;
26-
}
27-
2822
eprintln!("Building sysroot for abi-cafe");
2923
build_sysroot::build_sysroot(
3024
dirs,

build_system/mod.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ enum Command {
3232
Prepare,
3333
Build,
3434
Test,
35+
AbiCafe,
3536
Bench,
3637
}
3738

@@ -61,6 +62,7 @@ pub fn main() {
6162
Some("prepare") => Command::Prepare,
6263
Some("build") => Command::Build,
6364
Some("test") => Command::Test,
65+
Some("abi-cafe") => Command::AbiCafe,
6466
Some("bench") => Command::Bench,
6567
Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag),
6668
Some(command) => arg_error!("Unknown command {}", command),
@@ -156,19 +158,13 @@ pub fn main() {
156158
&bootstrap_host_compiler,
157159
target_triple.clone(),
158160
);
159-
160-
if bootstrap_host_compiler.triple == target_triple {
161-
abi_cafe::run(
162-
channel,
163-
sysroot_kind,
164-
&dirs,
165-
&cg_clif_dylib,
166-
&bootstrap_host_compiler,
167-
);
168-
} else {
169-
eprintln!("[RUN] abi-cafe (skipped, cross-compilation not supported)");
170-
return;
161+
}
162+
Command::AbiCafe => {
163+
if bootstrap_host_compiler.triple != target_triple {
164+
eprintln!("Abi-cafe doesn't support cross-compilation");
165+
process::exit(1);
171166
}
167+
abi_cafe::run(channel, sysroot_kind, &dirs, &cg_clif_dylib, &bootstrap_host_compiler);
172168
}
173169
Command::Build => {
174170
build_sysroot::build_sysroot(

build_system/usage.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ USAGE:
44
./y.rs prepare [--out-dir DIR]
55
./y.rs build [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
66
./y.rs test [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
7+
./y.rs abi-cafe [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
78
./y.rs bench [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
89

910
OPTIONS:

config.txt

-2
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,3 @@ test.libcore
4949
test.regex-shootout-regex-dna
5050
test.regex
5151
test.portable-simd
52-
53-
testsuite.abi-cafe

0 commit comments

Comments
 (0)