Don't download abi-cafe and simple-raytracer in ./y.rs prepare
Instead download them on the fly
This commit is contained in:
parent
e24fa2f915
commit
3ba9b13490
6 changed files with 32 additions and 25 deletions
|
@ -6,11 +6,10 @@ use super::prepare::GitRepo;
|
||||||
use super::utils::{spawn_and_wait, CargoProject, Compiler};
|
use super::utils::{spawn_and_wait, CargoProject, Compiler};
|
||||||
use super::SysrootKind;
|
use super::SysrootKind;
|
||||||
|
|
||||||
pub(crate) static ABI_CAFE_REPO: GitRepo =
|
static ABI_CAFE_REPO: GitRepo =
|
||||||
GitRepo::github("Gankra", "abi-cafe", "4c6dc8c9c687e2b3a760ff2176ce236872b37212", "abi-cafe");
|
GitRepo::github("Gankra", "abi-cafe", "4c6dc8c9c687e2b3a760ff2176ce236872b37212", "abi-cafe");
|
||||||
|
|
||||||
pub(crate) static ABI_CAFE: CargoProject =
|
static ABI_CAFE: CargoProject = CargoProject::new(&ABI_CAFE_REPO.source_dir(), "abi_cafe");
|
||||||
CargoProject::new(&ABI_CAFE_REPO.source_dir(), "abi_cafe");
|
|
||||||
|
|
||||||
pub(crate) fn run(
|
pub(crate) fn run(
|
||||||
channel: &str,
|
channel: &str,
|
||||||
|
@ -19,6 +18,9 @@ pub(crate) fn run(
|
||||||
cg_clif_dylib: &Path,
|
cg_clif_dylib: &Path,
|
||||||
bootstrap_host_compiler: &Compiler,
|
bootstrap_host_compiler: &Compiler,
|
||||||
) {
|
) {
|
||||||
|
ABI_CAFE_REPO.fetch(dirs);
|
||||||
|
spawn_and_wait(ABI_CAFE.fetch("cargo", &bootstrap_host_compiler.rustc, dirs));
|
||||||
|
|
||||||
eprintln!("Building sysroot for abi-cafe");
|
eprintln!("Building sysroot for abi-cafe");
|
||||||
build_sysroot::build_sysroot(
|
build_sysroot::build_sysroot(
|
||||||
dirs,
|
dirs,
|
||||||
|
|
|
@ -7,7 +7,7 @@ use super::prepare::GitRepo;
|
||||||
use super::rustc_info::get_file_name;
|
use super::rustc_info::get_file_name;
|
||||||
use super::utils::{hyperfine_command, is_ci, spawn_and_wait, CargoProject, Compiler};
|
use super::utils::{hyperfine_command, is_ci, spawn_and_wait, CargoProject, Compiler};
|
||||||
|
|
||||||
pub(crate) static SIMPLE_RAYTRACER_REPO: GitRepo = GitRepo::github(
|
static SIMPLE_RAYTRACER_REPO: GitRepo = GitRepo::github(
|
||||||
"ebobby",
|
"ebobby",
|
||||||
"simple-raytracer",
|
"simple-raytracer",
|
||||||
"804a7a21b9e673a482797aa289a18ed480e4d813",
|
"804a7a21b9e673a482797aa289a18ed480e4d813",
|
||||||
|
@ -15,10 +15,10 @@ pub(crate) static SIMPLE_RAYTRACER_REPO: GitRepo = GitRepo::github(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Use a separate target dir for the initial LLVM build to reduce unnecessary recompiles
|
// Use a separate target dir for the initial LLVM build to reduce unnecessary recompiles
|
||||||
pub(crate) static SIMPLE_RAYTRACER_LLVM: CargoProject =
|
static SIMPLE_RAYTRACER_LLVM: CargoProject =
|
||||||
CargoProject::new(&SIMPLE_RAYTRACER_REPO.source_dir(), "simple_raytracer_llvm");
|
CargoProject::new(&SIMPLE_RAYTRACER_REPO.source_dir(), "simple_raytracer_llvm");
|
||||||
|
|
||||||
pub(crate) static SIMPLE_RAYTRACER: CargoProject =
|
static SIMPLE_RAYTRACER: CargoProject =
|
||||||
CargoProject::new(&SIMPLE_RAYTRACER_REPO.source_dir(), "simple_raytracer");
|
CargoProject::new(&SIMPLE_RAYTRACER_REPO.source_dir(), "simple_raytracer");
|
||||||
|
|
||||||
pub(crate) fn benchmark(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
|
pub(crate) fn benchmark(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
|
||||||
|
@ -32,6 +32,13 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SIMPLE_RAYTRACER_REPO.fetch(dirs);
|
||||||
|
spawn_and_wait(SIMPLE_RAYTRACER.fetch(
|
||||||
|
&bootstrap_host_compiler.cargo,
|
||||||
|
&bootstrap_host_compiler.rustc,
|
||||||
|
dirs,
|
||||||
|
));
|
||||||
|
|
||||||
eprintln!("[LLVM BUILD] simple-raytracer");
|
eprintln!("[LLVM BUILD] simple-raytracer");
|
||||||
let build_cmd = SIMPLE_RAYTRACER_LLVM.build(bootstrap_host_compiler, dirs);
|
let build_cmd = SIMPLE_RAYTRACER_LLVM.build(bootstrap_host_compiler, dirs);
|
||||||
spawn_and_wait(build_cmd);
|
spawn_and_wait(build_cmd);
|
||||||
|
|
|
@ -11,22 +11,18 @@ use super::utils::{copy_dir_recursively, git_command, retry_spawn_and_wait, spaw
|
||||||
pub(crate) fn prepare(dirs: &Dirs) {
|
pub(crate) fn prepare(dirs: &Dirs) {
|
||||||
RelPath::DOWNLOAD.ensure_fresh(dirs);
|
RelPath::DOWNLOAD.ensure_fresh(dirs);
|
||||||
|
|
||||||
spawn_and_wait(super::build_backend::CG_CLIF.fetch("cargo", dirs));
|
spawn_and_wait(super::build_backend::CG_CLIF.fetch("cargo", "rustc", dirs));
|
||||||
|
|
||||||
prepare_sysroot(dirs);
|
prepare_sysroot(dirs);
|
||||||
spawn_and_wait(super::build_sysroot::STANDARD_LIBRARY.fetch("cargo", dirs));
|
spawn_and_wait(super::build_sysroot::STANDARD_LIBRARY.fetch("cargo", "rustc", dirs));
|
||||||
spawn_and_wait(super::tests::LIBCORE_TESTS.fetch("cargo", dirs));
|
spawn_and_wait(super::tests::LIBCORE_TESTS.fetch("cargo", "rustc", dirs));
|
||||||
|
|
||||||
super::abi_cafe::ABI_CAFE_REPO.fetch(dirs);
|
|
||||||
spawn_and_wait(super::abi_cafe::ABI_CAFE.fetch("cargo", dirs));
|
|
||||||
super::tests::RAND_REPO.fetch(dirs);
|
super::tests::RAND_REPO.fetch(dirs);
|
||||||
spawn_and_wait(super::tests::RAND.fetch("cargo", dirs));
|
spawn_and_wait(super::tests::RAND.fetch("cargo", "rustc", dirs));
|
||||||
super::tests::REGEX_REPO.fetch(dirs);
|
super::tests::REGEX_REPO.fetch(dirs);
|
||||||
spawn_and_wait(super::tests::REGEX.fetch("cargo", dirs));
|
spawn_and_wait(super::tests::REGEX.fetch("cargo", "rustc", dirs));
|
||||||
super::tests::PORTABLE_SIMD_REPO.fetch(dirs);
|
super::tests::PORTABLE_SIMD_REPO.fetch(dirs);
|
||||||
spawn_and_wait(super::tests::PORTABLE_SIMD.fetch("cargo", dirs));
|
spawn_and_wait(super::tests::PORTABLE_SIMD.fetch("cargo", "rustc", dirs));
|
||||||
super::bench::SIMPLE_RAYTRACER_REPO.fetch(dirs);
|
|
||||||
spawn_and_wait(super::bench::SIMPLE_RAYTRACER.fetch("cargo", dirs));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prepare_sysroot(dirs: &Dirs) {
|
fn prepare_sysroot(dirs: &Dirs) {
|
||||||
|
@ -80,7 +76,7 @@ impl GitRepo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fetch(&self, dirs: &Dirs) {
|
pub(crate) fn fetch(&self, dirs: &Dirs) {
|
||||||
match self.url {
|
match self.url {
|
||||||
GitRepoUrl::Github { user, repo } => {
|
GitRepoUrl::Github { user, repo } => {
|
||||||
clone_repo_shallow_github(
|
clone_repo_shallow_github(
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use super::bench::SIMPLE_RAYTRACER;
|
|
||||||
use super::build_sysroot::{self, SYSROOT_SRC};
|
use super::build_sysroot::{self, SYSROOT_SRC};
|
||||||
use super::config;
|
use super::config;
|
||||||
use super::path::{Dirs, RelPath};
|
use super::path::{Dirs, RelPath};
|
||||||
|
@ -134,10 +133,6 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
|
||||||
spawn_and_wait(build_cmd);
|
spawn_and_wait(build_cmd);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
TestCase::custom("test.simple-raytracer", &|runner| {
|
|
||||||
SIMPLE_RAYTRACER.clean(&runner.dirs);
|
|
||||||
spawn_and_wait(SIMPLE_RAYTRACER.build(&runner.target_compiler, &runner.dirs));
|
|
||||||
}),
|
|
||||||
TestCase::custom("test.libcore", &|runner| {
|
TestCase::custom("test.libcore", &|runner| {
|
||||||
LIBCORE_TESTS.clean(&runner.dirs);
|
LIBCORE_TESTS.clean(&runner.dirs);
|
||||||
|
|
||||||
|
|
|
@ -121,10 +121,18 @@ impl CargoProject {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub(crate) fn fetch(&self, cargo: impl AsRef<Path>, dirs: &Dirs) -> Command {
|
pub(crate) fn fetch(
|
||||||
|
&self,
|
||||||
|
cargo: impl AsRef<Path>,
|
||||||
|
rustc: impl AsRef<Path>,
|
||||||
|
dirs: &Dirs,
|
||||||
|
) -> Command {
|
||||||
let mut cmd = Command::new(cargo.as_ref());
|
let mut cmd = Command::new(cargo.as_ref());
|
||||||
|
|
||||||
cmd.arg("fetch").arg("--manifest-path").arg(self.manifest_path(dirs));
|
cmd.env("RUSTC", rustc.as_ref())
|
||||||
|
.arg("fetch")
|
||||||
|
.arg("--manifest-path")
|
||||||
|
.arg(self.manifest_path(dirs));
|
||||||
|
|
||||||
cmd
|
cmd
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ aot.issue-72793
|
||||||
|
|
||||||
testsuite.extended_sysroot
|
testsuite.extended_sysroot
|
||||||
test.rust-random/rand
|
test.rust-random/rand
|
||||||
test.simple-raytracer
|
|
||||||
test.libcore
|
test.libcore
|
||||||
test.regex-shootout-regex-dna
|
test.regex-shootout-regex-dna
|
||||||
test.regex
|
test.regex
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue