Move many env vars from CI configuration to the build system
This commit is contained in:
parent
e082eebb5f
commit
cc3ac006a2
6 changed files with 15 additions and 57 deletions
|
@ -15,9 +15,4 @@ task:
|
||||||
- ./y.rs prepare
|
- ./y.rs prepare
|
||||||
test_script:
|
test_script:
|
||||||
- . $HOME/.cargo/env
|
- . $HOME/.cargo/env
|
||||||
- # Enable backtraces for easier debugging
|
|
||||||
- export RUST_BACKTRACE=1
|
|
||||||
- # Reduce amount of benchmark runs as they are slow
|
|
||||||
- export COMPILE_RUNS=2
|
|
||||||
- export RUN_RUNS=2
|
|
||||||
- ./y.rs test
|
- ./y.rs test
|
||||||
|
|
23
.github/workflows/main.yml
vendored
23
.github/workflows/main.yml
vendored
|
@ -104,18 +104,7 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
env:
|
env:
|
||||||
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
|
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
|
||||||
run: |
|
run: ./y.rs test
|
||||||
# Enable backtraces for easier debugging
|
|
||||||
export RUST_BACKTRACE=1
|
|
||||||
|
|
||||||
# Reduce amount of benchmark runs as they are slow
|
|
||||||
export COMPILE_RUNS=2
|
|
||||||
export RUN_RUNS=2
|
|
||||||
|
|
||||||
# Enable extra checks
|
|
||||||
export CG_CLIF_ENABLE_VERIFIER=1
|
|
||||||
|
|
||||||
./y.rs test
|
|
||||||
|
|
||||||
- name: Package prebuilt cg_clif
|
- name: Package prebuilt cg_clif
|
||||||
run: tar cvfJ cg_clif.tar.xz dist
|
run: tar cvfJ cg_clif.tar.xz dist
|
||||||
|
@ -195,16 +184,6 @@ jobs:
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
# Enable backtraces for easier debugging
|
|
||||||
$Env:RUST_BACKTRACE=1
|
|
||||||
|
|
||||||
# Reduce amount of benchmark runs as they are slow
|
|
||||||
$Env:COMPILE_RUNS=2
|
|
||||||
$Env:RUN_RUNS=2
|
|
||||||
|
|
||||||
# Enable extra checks
|
|
||||||
$Env:CG_CLIF_ENABLE_VERIFIER=1
|
|
||||||
|
|
||||||
# WIP Disable some tests
|
# WIP Disable some tests
|
||||||
|
|
||||||
# This fails due to some weird argument handling by hyperfine, not an actual regression
|
# This fails due to some weird argument handling by hyperfine, not an actual regression
|
||||||
|
|
13
.github/workflows/nightly-cranelift.yml
vendored
13
.github/workflows/nightly-cranelift.yml
vendored
|
@ -45,15 +45,4 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./y.rs build --sysroot none
|
run: ./y.rs build --sysroot none
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: ./test.sh
|
||||||
# Enable backtraces for easier debugging
|
|
||||||
export RUST_BACKTRACE=1
|
|
||||||
|
|
||||||
# Reduce amount of benchmark runs as they are slow
|
|
||||||
export COMPILE_RUNS=2
|
|
||||||
export RUN_RUNS=2
|
|
||||||
|
|
||||||
# Enable extra checks
|
|
||||||
export CG_CLIF_ENABLE_VERIFIER=1
|
|
||||||
|
|
||||||
./test.sh
|
|
||||||
|
|
18
.github/workflows/rustc.yml
vendored
18
.github/workflows/rustc.yml
vendored
|
@ -37,14 +37,7 @@ jobs:
|
||||||
./y.rs prepare
|
./y.rs prepare
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: ./scripts/test_bootstrap.sh
|
||||||
# Enable backtraces for easier debugging
|
|
||||||
export RUST_BACKTRACE=1
|
|
||||||
|
|
||||||
# Enable extra checks
|
|
||||||
export CG_CLIF_ENABLE_VERIFIER=1
|
|
||||||
|
|
||||||
./scripts/test_bootstrap.sh
|
|
||||||
rustc_test_suite:
|
rustc_test_suite:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
@ -78,11 +71,4 @@ jobs:
|
||||||
./y.rs prepare
|
./y.rs prepare
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: ./scripts/test_rustc_tests.sh
|
||||||
# Enable backtraces for easier debugging
|
|
||||||
export RUST_BACKTRACE=1
|
|
||||||
|
|
||||||
# Enable extra checks
|
|
||||||
export CG_CLIF_ENABLE_VERIFIER=1
|
|
||||||
|
|
||||||
./scripts/test_rustc_tests.sh
|
|
||||||
|
|
|
@ -64,12 +64,18 @@ pub(crate) enum SysrootKind {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
if env::var("RUST_BACKTRACE").is_err() {
|
||||||
|
env::set_var("RUST_BACKTRACE", "1");
|
||||||
|
}
|
||||||
env::set_var("CG_CLIF_DISPLAY_CG_TIME", "1");
|
env::set_var("CG_CLIF_DISPLAY_CG_TIME", "1");
|
||||||
env::set_var("CG_CLIF_DISABLE_INCR_CACHE", "1");
|
env::set_var("CG_CLIF_DISABLE_INCR_CACHE", "1");
|
||||||
|
|
||||||
if is_ci() {
|
if is_ci() {
|
||||||
// Disabling incr comp reduces cache size and incr comp doesn't save as much on CI anyway
|
// Disabling incr comp reduces cache size and incr comp doesn't save as much on CI anyway
|
||||||
env::set_var("CARGO_BUILD_INCREMENTAL", "false");
|
env::set_var("CARGO_BUILD_INCREMENTAL", "false");
|
||||||
|
|
||||||
|
// Enable the Cranelift verifier
|
||||||
|
env::set_var("CG_CLIF_ENABLE_VERIFIER", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut args = env::args().skip(1);
|
let mut args = env::args().skip(1);
|
||||||
|
|
|
@ -4,7 +4,7 @@ use super::path::{Dirs, RelPath};
|
||||||
use super::prepare::GitRepo;
|
use super::prepare::GitRepo;
|
||||||
use super::rustc_info::get_wrapper_file_name;
|
use super::rustc_info::get_wrapper_file_name;
|
||||||
use super::utils::{
|
use super::utils::{
|
||||||
hyperfine_command, spawn_and_wait, spawn_and_wait_with_input, CargoProject, Compiler,
|
hyperfine_command, is_ci, spawn_and_wait, spawn_and_wait_with_input, CargoProject, Compiler,
|
||||||
};
|
};
|
||||||
use super::SysrootKind;
|
use super::SysrootKind;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
@ -281,7 +281,10 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
TestCase::new("bench.simple-raytracer", &|runner| {
|
TestCase::new("bench.simple-raytracer", &|runner| {
|
||||||
let run_runs = env::var("RUN_RUNS").unwrap_or("10".to_string()).parse().unwrap();
|
let run_runs = env::var("RUN_RUNS")
|
||||||
|
.unwrap_or(if is_ci() { "2" } else { "10" }.to_string())
|
||||||
|
.parse()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
if runner.is_native {
|
if runner.is_native {
|
||||||
eprintln!("[BENCH COMPILE] ebobby/simple-raytracer");
|
eprintln!("[BENCH COMPILE] ebobby/simple-raytracer");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue