Skip to content

Commit

Permalink
Only run abi-cafe on cg_clif's CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jan 16, 2023
1 parent 611c518 commit 7095783
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ jobs:
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
run: ./y.rs test

- name: Test abi-cafe
env:
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
run: |
if [[ "$(rustc -vV | grep host | cut -d' ' -f2)" == "$TARGET_TRIPLE" ]]; then
./y.rs abi-cafe
fi
- name: Package prebuilt cg_clif
run: tar cvfJ cg_clif.tar.xz dist

Expand Down
6 changes: 0 additions & 6 deletions build_system/abi_cafe.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::path::Path;

use super::build_sysroot;
use super::config;
use super::path::Dirs;
use super::prepare::GitRepo;
use super::utils::{spawn_and_wait, CargoProject, Compiler};
Expand All @@ -20,11 +19,6 @@ pub(crate) fn run(
cg_clif_dylib: &Path,
bootstrap_host_compiler: &Compiler,
) {
if !config::get_bool("testsuite.abi-cafe") {
eprintln!("[RUN] abi-cafe (skipped)");
return;
}

eprintln!("Building sysroot for abi-cafe");
build_sysroot::build_sysroot(
dirs,
Expand Down
20 changes: 8 additions & 12 deletions build_system/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum Command {
Prepare,
Build,
Test,
AbiCafe,
Bench,
}

Expand Down Expand Up @@ -61,6 +62,7 @@ pub fn main() {
Some("prepare") => Command::Prepare,
Some("build") => Command::Build,
Some("test") => Command::Test,
Some("abi-cafe") => Command::AbiCafe,
Some("bench") => Command::Bench,
Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag),
Some(command) => arg_error!("Unknown command {}", command),
Expand Down Expand Up @@ -156,19 +158,13 @@ pub fn main() {
&bootstrap_host_compiler,
target_triple.clone(),
);

if bootstrap_host_compiler.triple == target_triple {
abi_cafe::run(
channel,
sysroot_kind,
&dirs,
&cg_clif_dylib,
&bootstrap_host_compiler,
);
} else {
eprintln!("[RUN] abi-cafe (skipped, cross-compilation not supported)");
return;
}
Command::AbiCafe => {
if bootstrap_host_compiler.triple != target_triple {
eprintln!("Abi-cafe doesn't support cross-compilation");
process::exit(1);
}
abi_cafe::run(channel, sysroot_kind, &dirs, &cg_clif_dylib, &bootstrap_host_compiler);
}
Command::Build => {
build_sysroot::build_sysroot(
Expand Down
1 change: 1 addition & 0 deletions build_system/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ USAGE:
./y.rs prepare [--out-dir DIR]
./y.rs build [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
./y.rs test [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
./y.rs abi-cafe [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]
./y.rs bench [--debug] [--sysroot none|clif|llvm] [--out-dir DIR] [--no-unstable-features]

OPTIONS:
Expand Down
2 changes: 0 additions & 2 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ test.libcore
test.regex-shootout-regex-dna
test.regex
test.portable-simd

testsuite.abi-cafe

0 comments on commit 7095783

Please sign in to comment.