Skip to content

Commit

Permalink
Promote "alternative" rustc builds to Nightly archives
Browse files Browse the repository at this point in the history
Nightly builds are archived under `https://static.rust-lang.org/dist/{date}/`.
This adds a new `alt/` subdirectory containing:

* `rustc-nightly-x86_64-apple-darwin.tar.gz`
* `rustc-nightly-x86_64-unknown-linux-gnu.tar.gz`
* `rustc-nightly-x86_64-pc-windows-msvc.tar.gz`

copied from `s3://rust-lang-ci2/rustc-builds-alt/`.
These are alternative builds of rustc with LLVM assertions disabled,
which reduces testing coverage but improves compiler performance.

This adds these resources to those that are considered “stable and public”
per https://internals.rust-lang.org/t/public-stable-rust-services/6072.
For the latest Nightly they take up 143 MiB.
At current S3 pricing, this increases the cost of storing 10 years worth
of Nightlies by 14 USD per month.

This fixes rust-lang/rust#45334
and will enable Servo’s build system to stop relying
on private and ephemeral resources.
  • Loading branch information
SimonSapin committed Oct 28, 2017
1 parent 0203cf8 commit 20bb517
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions promote-release/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl Context {
let file = t!(file);
t!(fs::copy(file.path(), self.dl_dir().join(file.file_name())));
}
self.publish_archive();
self.publish_archive(rev);
self.publish_docs();
self.publish_release();

Expand Down Expand Up @@ -311,7 +311,7 @@ upload-addr = \"{}/{}\"
.arg(&dst));
}

fn publish_archive(&mut self) {
fn publish_archive(&mut self, rev: &str) {
let bucket = self.secrets["dist"]["upload-bucket"].as_str().unwrap();
let dir = self.secrets["dist"]["upload-dir"].as_str().unwrap();
let dst = format!("s3://{}/{}/{}/", bucket, dir, self.date);
Expand All @@ -321,6 +321,19 @@ upload-addr = \"{}/{}\"
.arg("--only-show-errors")
.arg(format!("{}/", self.dl_dir().display()))
.arg(&dst));
if self.release == "nightly" {
let src = format!("s3://rust-lang-ci2/rustc-builds-alt/{}/", rev);
let dst = format!("s3://{}/{}/{}/alt/", bucket, dir, self.date);
run(self.aws_s3()
.arg("cp")
.arg("--recursive")
.arg("--only-show-errors")
.arg("--exclude").arg("*")
.arg("--include").arg("rustc-*.tar.gz")
.arg("--exclude").arg("rustc-*src.tar.gz")
.arg(src)
.arg(dst));
}
}

fn publish_docs(&mut self) {
Expand Down

0 comments on commit 20bb517

Please sign in to comment.