Download "non-alt" rustc builds from more permanent URLs

The `rust-lang-ci` S3 bucket is ephemeral:

https://internals.rust-lang.org/t/updates-on-rusts-ci-uploads/6062
https://internals.rust-lang.org/t/public-stable-rust-services/6072

We’ll still need to find a solution for "alt" rustc builds.
In the meantime, this is a step.
This commit is contained in:
Simon Sapin 2017-10-18 18:24:45 +02:00
parent 421baa854e
commit efdaa0d00a

View file

@ -88,15 +88,14 @@ class MachCommands(CommandBase):
# in that directory).
if stable:
base_url = static_s3
else:
elif not self.config["build"]["llvm-assertions"]:
import toml
channel = "%s/%s/channel-rust-nightly.toml" % (static_s3, self.rust_nightly_date())
nightly_commit_hash = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["git_commit_hash"]
base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds"
if not self.config["build"]["llvm-assertions"]:
base_url += "-alt"
base_url += "/" + nightly_commit_hash
base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds-alt/" + nightly_commit_hash
else:
base_url = "%s/%s" % (static_s3, self.rust_nightly_date())
rustc_url = base_url + "/rustc-%s-%s.tar.gz" % (version, host_triple())
tgz_file = rust_dir + '-rustc.tar.gz'