Skip to content

Commit 7bca112

Browse files
committed
Auto merge of #159628 - Mark-Simulacrum:ci-experiments, r=<try>
CI experiments try-job: dist-x86_64-linux
2 parents 87e5904 + a997059 commit 7bca112

11 files changed

Lines changed: 105 additions & 36 deletions

File tree

Cargo.lock

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ version = "3.1.1"
871871
source = "registry+https://github.com/rust-lang/crates.io-index"
872872
checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"
873873
dependencies = [
874-
"windows-sys 0.59.0",
874+
"windows-sys 0.61.2",
875875
]
876876

877877
[[package]]
@@ -1284,7 +1284,7 @@ dependencies = [
12841284
"libc",
12851285
"option-ext",
12861286
"redox_users",
1287-
"windows-sys 0.59.0",
1287+
"windows-sys 0.61.2",
12881288
]
12891289

12901290
[[package]]
@@ -1411,7 +1411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
14111411
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
14121412
dependencies = [
14131413
"libc",
1414-
"windows-sys 0.59.0",
1414+
"windows-sys 0.61.2",
14151415
]
14161416

14171417
[[package]]
@@ -2068,6 +2068,7 @@ dependencies = [
20682068
"tar",
20692069
"walkdir",
20702070
"xz2",
2071+
"zstd",
20712072
]
20722073

20732074
[[package]]
@@ -2198,7 +2199,7 @@ dependencies = [
21982199
"portable-atomic",
21992200
"portable-atomic-util",
22002201
"serde_core",
2201-
"windows-sys 0.59.0",
2202+
"windows-sys 0.61.2",
22022203
]
22032204

22042205
[[package]]
@@ -2685,7 +2686,7 @@ version = "0.50.3"
26852686
source = "registry+https://github.com/rust-lang/crates.io-index"
26862687
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
26872688
dependencies = [
2688-
"windows-sys 0.59.0",
2689+
"windows-sys 0.61.2",
26892690
]
26902691

26912692
[[package]]
@@ -2905,6 +2906,7 @@ dependencies = [
29052906
"tar",
29062907
"tempfile",
29072908
"xz2",
2909+
"zstd",
29082910
]
29092911

29102912
[[package]]
@@ -5113,7 +5115,7 @@ dependencies = [
51135115
"errno",
51145116
"libc",
51155117
"linux-raw-sys",
5116-
"windows-sys 0.59.0",
5118+
"windows-sys 0.61.2",
51175119
]
51185120

51195121
[[package]]
@@ -5545,7 +5547,7 @@ dependencies = [
55455547
"getrandom 0.3.3",
55465548
"once_cell",
55475549
"rustix",
5548-
"windows-sys 0.59.0",
5550+
"windows-sys 0.61.2",
55495551
]
55505552

55515553
[[package]]
@@ -5564,7 +5566,7 @@ version = "1.2.1"
55645566
source = "registry+https://github.com/rust-lang/crates.io-index"
55655567
checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1"
55665568
dependencies = [
5567-
"windows-sys 0.59.0",
5569+
"windows-sys 0.61.2",
55685570
]
55695571

55705572
[[package]]
@@ -6542,7 +6544,7 @@ version = "0.1.11"
65426544
source = "registry+https://github.com/rust-lang/crates.io-index"
65436545
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
65446546
dependencies = [
6545-
"windows-sys 0.59.0",
6547+
"windows-sys 0.61.2",
65466548
]
65476549

65486550
[[package]]
@@ -7144,3 +7146,31 @@ name = "zlib-rs"
71447146
version = "0.6.3"
71457147
source = "registry+https://github.com/rust-lang/crates.io-index"
71467148
checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513"
7149+
7150+
[[package]]
7151+
name = "zstd"
7152+
version = "0.13.3"
7153+
source = "registry+https://github.com/rust-lang/crates.io-index"
7154+
checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
7155+
dependencies = [
7156+
"zstd-safe",
7157+
]
7158+
7159+
[[package]]
7160+
name = "zstd-safe"
7161+
version = "7.2.4"
7162+
source = "registry+https://github.com/rust-lang/crates.io-index"
7163+
checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
7164+
dependencies = [
7165+
"zstd-sys",
7166+
]
7167+
7168+
[[package]]
7169+
name = "zstd-sys"
7170+
version = "2.0.16+zstd.1.5.7"
7171+
source = "registry+https://github.com/rust-lang/crates.io-index"
7172+
checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
7173+
dependencies = [
7174+
"cc",
7175+
"pkg-config",
7176+
]

src/ci/citool/Cargo.lock

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
6666

6767
[[package]]
6868
name = "askama"
69-
version = "0.15.4"
69+
version = "0.16.0"
7070
source = "registry+https://github.com/rust-lang/crates.io-index"
71-
checksum = "08e1676b346cadfec169374f949d7490fd80a24193d37d2afce0c047cf695e57"
71+
checksum = "f1bf825125edd887a019d0a3a837dcc5499a68b0d034cc3eb594070c3e18addc"
7272
dependencies = [
7373
"askama_macros",
7474
"itoa",
@@ -79,12 +79,13 @@ dependencies = [
7979

8080
[[package]]
8181
name = "askama_derive"
82-
version = "0.15.4"
82+
version = "0.16.0"
8383
source = "registry+https://github.com/rust-lang/crates.io-index"
84-
checksum = "7661ff56517787343f376f75db037426facd7c8d3049cef8911f1e75016f3a37"
84+
checksum = "e1c7065972a130eafa84215f21352ae15b4a7393da48c1f5e103904490736738"
8585
dependencies = [
8686
"askama_parser",
8787
"basic-toml",
88+
"glob",
8889
"memchr",
8990
"proc-macro2",
9091
"quote",
@@ -96,18 +97,18 @@ dependencies = [
9697

9798
[[package]]
9899
name = "askama_macros"
99-
version = "0.15.4"
100+
version = "0.16.0"
100101
source = "registry+https://github.com/rust-lang/crates.io-index"
101-
checksum = "713ee4dbfd1eb719c2dab859465b01fa1d21cb566684614a713a6b7a99a4e47b"
102+
checksum = "0e23b1d2c4bd39a41971f6124cef4cc6fd0540913ecb90919b69ab3bbe44ae1a"
102103
dependencies = [
103104
"askama_derive",
104105
]
105106

106107
[[package]]
107108
name = "askama_parser"
108-
version = "0.15.4"
109+
version = "0.16.0"
109110
source = "registry+https://github.com/rust-lang/crates.io-index"
110-
checksum = "1d62d674238a526418b30c0def480d5beadb9d8964e7f38d635b03bf639c704c"
111+
checksum = "7db09fde9143e7ac4513358fb32ee32847125b63b18ea715afd487956da715da"
111112
dependencies = [
112113
"rustc-hash",
113114
"serde",
@@ -380,6 +381,12 @@ dependencies = [
380381
"wasi",
381382
]
382383

384+
[[package]]
385+
name = "glob"
386+
version = "0.3.3"
387+
source = "registry+https://github.com/rust-lang/crates.io-index"
388+
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
389+
383390
[[package]]
384391
name = "glob-match"
385392
version = "0.2.1"
@@ -1105,9 +1112,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
11051112

11061113
[[package]]
11071114
name = "winnow"
1108-
version = "0.7.6"
1115+
version = "1.0.4"
11091116
source = "registry+https://github.com/rust-lang/crates.io-index"
1110-
checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10"
1117+
checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
11111118
dependencies = [
11121119
"memchr",
11131120
]

src/ci/citool/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ fn run_workflow_locally(db: JobDatabase, job_type: JobType, name: String) -> any
9797
let jobs = match job_type {
9898
JobType::Auto => &db.auto_jobs,
9999
JobType::PR => &db.pr_jobs,
100+
JobType::Try => &db.try_jobs,
100101
};
101102
let job =
102103
jobs::find_linux_job(jobs, &name).with_context(|| format!("Cannot find job {name}"))?;
@@ -111,6 +112,9 @@ fn run_workflow_locally(db: JobDatabase, job_type: JobType, name: String) -> any
111112
custom_env.insert("DEPLOY".to_string(), "1".to_string());
112113
}
113114
}
115+
if name == "dist-x86_64-linux-quick" {
116+
custom_env.insert("DIST_TRY_BUILD".to_string(), "1".to_owned());
117+
}
114118
custom_env.extend(job.env.iter().map(|(key, value)| {
115119
let value = match value {
116120
Value::Bool(value) => value.to_string(),
@@ -269,6 +273,8 @@ pub enum JobType {
269273
Auto,
270274
/// Pull request job
271275
PR,
276+
/// Try jobs.
277+
Try,
272278
}
273279

274280
fn main() -> anyhow::Result<()> {

src/ci/github-actions/jobs.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,7 @@ runners:
6262
- &job-linux-36c-codebuild
6363
free_disk: true
6464
codebuild: true
65-
os: codebuild-ubuntu-22-36c-$github.run_id-$github.run_attempt
66-
<<: *base-job
67-
68-
- &job-linux-8c-codebuild
69-
free_disk: true
70-
codebuild: true
71-
os: codebuild-ubuntu-22-8c-$github.run_id-$github.run_attempt
65+
os: simulacrum-aws-test-runner-3a47918cf60f4d36fb1c526a04753e0e
7266
<<: *base-job
7367

7468
envs:

src/ci/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-units-std=1"
7878
# generally implies single-threaded compression which results in wasting most
7979
# of our CPU resources.
8080
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set dist.compression-profile=balanced"
81+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --dist-compression-formats=zstd"
8182

82-
# Only produce xz tarballs on CI. gz tarballs will be generated by the release
83-
# process by recompressing the existing xz ones. This decreases the storage
84-
# space required for CI artifacts.
85-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --dist-compression-formats=xz"
83+
# Enable parallel rustc for CI compilation. We trust this enough to not
84+
# miscompile and it makes CI builds faster.
85+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.parallel-frontend-threads=6"
8686

8787
# Enable the `c` feature for compiler_builtins, but only when the `compiler-rt` source is available
8888
# (to avoid spending a lot of time cloning llvm)

src/tools/opt-dist/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ fs_extra = "1"
1515
camino = "1"
1616
tar = "0.4.45"
1717
xz = { version = "0.1", package = "xz2" }
18+
zstd = "0.13.3"
1819
serde_json = "1"
1920
glob = "0.3"
2021
tempfile = "3.5"

src/tools/opt-dist/src/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
1919
std::fs::create_dir_all(&unpacked_dist_dir)?;
2020

2121
let extract_dist_dir = |name: &str| -> anyhow::Result<Utf8PathBuf> {
22-
unpack_archive(&dist_dir.join(format!("{name}.tar.xz")), &unpacked_dist_dir)?;
22+
unpack_archive(&dist_dir.join(format!("{name}.tar.zstd")), &unpacked_dist_dir)?;
2323
let extracted_path = unpacked_dist_dir.join(name);
2424
assert!(extracted_path.is_dir());
2525
Ok(extracted_path)
@@ -37,7 +37,7 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
3737
let extracted_src_dir = extract_dist_dir(&format!("rust-src-{version}"))?.join("rust-src");
3838

3939
// If we have a Cranelift archive, copy it to the rustc sysroot
40-
if let Ok(_) = find_file_in_dir(&dist_dir, "rustc-codegen-cranelift-", ".tar.xz") {
40+
if let Ok(_) = find_file_in_dir(&dist_dir, "rustc-codegen-cranelift-", ".tar.zstd") {
4141
let extracted_codegen_dir =
4242
extract_dist_dir(&format!("rustc-codegen-cranelift-{version}-{host_triple}"))?
4343
.join("rustc-codegen-cranelift-preview");
@@ -160,7 +160,7 @@ where
160160
/// Tries to find the version of the dist artifacts (either nightly, beta, or 1.XY.Z).
161161
fn find_dist_version(directory: &Utf8Path) -> anyhow::Result<String> {
162162
// Lookup a known file with a unique prefix and extract the version from its filename
163-
let archive = find_file_in_dir(directory, "reproducible-artifacts-", ".tar.xz")?
163+
let archive = find_file_in_dir(directory, "reproducible-artifacts-", ".tar.zstd")?
164164
.file_name()
165165
.unwrap()
166166
.to_string();

src/tools/opt-dist/src/training.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn init_compiler_benchmarks(
3939
"--exact-match",
4040
crates.join(",").as_str(),
4141
"--jobs",
42-
"4",
42+
"16",
4343
])
4444
.env("RUSTC", env.rustc_stage_0().as_str())
4545
.env("RUSTC_BOOTSTRAP", "1")

src/tools/opt-dist/src/utils/io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ pub fn delete_directory(path: &Utf8Path) -> anyhow::Result<()> {
4747
pub fn unpack_archive(path: &Utf8Path, dest_dir: &Utf8Path) -> anyhow::Result<()> {
4848
log::info!("Unpacking directory `{path}` into `{dest_dir}`");
4949

50-
assert!(path.as_str().ends_with(".tar.xz"));
50+
assert!(path.as_str().ends_with(".tar.zstd"));
5151
let file = File::open(path.as_std_path())?;
52-
let file = xz::read::XzDecoder::new(file);
52+
let file = zstd::Decoder::new(file)?;
5353
let mut archive = tar::Archive::new(file);
5454
archive.unpack(dest_dir.as_std_path())?;
5555
Ok(())

src/tools/rust-installer/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rayon = "1.0"
1616
tar = "0.4.45"
1717
walkdir = "2"
1818
xz2 = "0.1.4"
19+
zstd = { version = "0.13.3", features = ["zstdmt"] }
1920

2021
[dependencies.clap]
2122
features = ["derive"]

0 commit comments

Comments
 (0)