зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #17780 - Update to cargo 0.21.0-nightly (eb6cf012a 2017-07-02) (from servo:cargoup); r=nox,SimonSapin
Cargo binaries are now produced on Rust’s CI, not Cargo’s. Remove cargo-commit-hash and find Cargo based on rust-commit-hash. Unfortunately, Cargo binaries are not available for every Cargo PR anymore: https://github.com/rust-lang/cargo/pull/4123#issuecomment-316201869 Source-Repo: https://github.com/servo/servo Source-Revision: d403f404382c66485d9744787ce021556be59d6c --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 5adb79e9d2a0446949f4ca8211496d96b41e648f
This commit is contained in:
Родитель
475ad603da
Коммит
1d9a118a36
|
@ -1620,12 +1620,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.0.13"
|
||||
version = "1.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1750,7 +1751,7 @@ version = "0.0.0"
|
|||
source = "git+https://github.com/servo/mozjs#834ce35c3f008010213351107b68f397989d2ffd"
|
||||
dependencies = [
|
||||
"libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3362,6 +3363,11 @@ dependencies = [
|
|||
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.6.0"
|
||||
|
@ -3718,7 +3724,7 @@ dependencies = [
|
|||
"checksum len-trait 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "723558ab8acaa07cb831b424cd164b587ddc1648b34748a30953c404e9a4a65b"
|
||||
"checksum libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)" = "e7eb6b826bfc1fdea7935d46556250d1799b7fe2d9f7951071f4291710665e3e"
|
||||
"checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194"
|
||||
"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
|
||||
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
|
||||
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
|
||||
"checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084"
|
||||
"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
|
@ -3857,6 +3863,7 @@ dependencies = [
|
|||
"checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56"
|
||||
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
|
||||
"checksum uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d0f5103675a280a926ec2f9b7bcc2ef49367df54e8c570c3311fec919f9a8b"
|
||||
"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
|
||||
"checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
|
||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
|
||||
|
|
|
@ -36,8 +36,8 @@ branches:
|
|||
- master
|
||||
|
||||
cache:
|
||||
- .servo -> rust-commit-hash, cargo-commit-hash
|
||||
- .cargo -> rust-commit-hash, cargo-commit-hash
|
||||
- .servo -> rust-commit-hash
|
||||
- .cargo -> rust-commit-hash
|
||||
- .ccache
|
||||
|
||||
# Uncomment these lines to expose RDP access information to the build machine in the build log.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
2233f515b1e8281841ceaed802f74fe2f9e54701
|
|
@ -207,8 +207,8 @@ class MachCommands(CommandBase):
|
|||
os.makedirs(cargo_dir)
|
||||
|
||||
tgz_file = "cargo-nightly-%s.tar.gz" % host_triple()
|
||||
nightly_url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/%s/%s" % \
|
||||
(self.cargo_build_id(), tgz_file)
|
||||
nightly_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds/%s/%s" % \
|
||||
(self.cargo_build_id()[len("rust-"):], tgz_file)
|
||||
|
||||
download_file("Cargo nightly", nightly_url, tgz_file)
|
||||
|
||||
|
@ -295,34 +295,24 @@ class MachCommands(CommandBase):
|
|||
rust_current_nightly = self.rust_version()
|
||||
self.set_use_stable_rust(True)
|
||||
rust_current_stable = self.rust_version()
|
||||
cargo_current = self.cargo_build_id()
|
||||
print("Current Rust nightly version: {}".format(rust_current_nightly))
|
||||
print("Current Rust stable version: {}".format(rust_current_stable))
|
||||
print("Current Cargo version: {}".format(cargo_current))
|
||||
to_keep = {
|
||||
'rust': set(),
|
||||
'cargo': set(),
|
||||
}
|
||||
to_keep = set()
|
||||
if int(keep) == 1:
|
||||
# Optimize keep=1 case to not invoke git
|
||||
to_keep['rust'].add(rust_current_nightly)
|
||||
to_keep['rust'].add(rust_current_stable)
|
||||
to_keep['cargo'].add(cargo_current)
|
||||
to_keep.add(rust_current_nightly)
|
||||
to_keep.add(rust_current_stable)
|
||||
else:
|
||||
for tool, version_files in {
|
||||
'rust': ['rust-commit-hash', 'rust-stable-version'],
|
||||
'cargo': ['cargo-commit-hash'],
|
||||
}.items():
|
||||
for version_file in version_files:
|
||||
cmd = subprocess.Popen(
|
||||
['git', 'log', '--oneline', '--no-color', '-n', keep, '--patch', version_file],
|
||||
stdout=subprocess.PIPE,
|
||||
universal_newlines=True
|
||||
)
|
||||
stdout, _ = cmd.communicate()
|
||||
for line in stdout.splitlines():
|
||||
if line.startswith(b"+") and not line.startswith(b"+++"):
|
||||
to_keep[tool].add(line[1:])
|
||||
for version_file in ['rust-commit-hash', 'rust-stable-version']:
|
||||
cmd = subprocess.Popen(
|
||||
['git', 'log', '--oneline', '--no-color', '-n', keep, '--patch', version_file],
|
||||
stdout=subprocess.PIPE,
|
||||
universal_newlines=True
|
||||
)
|
||||
stdout, _ = cmd.communicate()
|
||||
for line in stdout.splitlines():
|
||||
if line.startswith(b"+") and not line.startswith(b"+++"):
|
||||
to_keep.add(line[1:])
|
||||
|
||||
removing_anything = False
|
||||
for tool in ["rust", "cargo"]:
|
||||
|
@ -330,11 +320,13 @@ class MachCommands(CommandBase):
|
|||
if not path.isdir(base):
|
||||
continue
|
||||
for name in os.listdir(base):
|
||||
if name.startswith("rust-"):
|
||||
name = name[len("rust-"):]
|
||||
# We append `-alt` if LLVM assertions aren't enabled,
|
||||
# so use just the commit hash itself.
|
||||
# This may occasionally leave an extra nightly behind
|
||||
# but won't remove too many nightlies.
|
||||
if name.partition('-')[0] not in to_keep[tool]:
|
||||
if name.partition('-')[0] not in to_keep:
|
||||
removing_anything = True
|
||||
full_path = path.join(base, name)
|
||||
if force:
|
||||
|
|
|
@ -326,9 +326,9 @@ class CommandBase(object):
|
|||
|
||||
def cargo_build_id(self):
|
||||
if self._cargo_build_id is None:
|
||||
filename = path.join(self.context.topdir, "cargo-commit-hash")
|
||||
filename = path.join(self.context.topdir, "rust-commit-hash")
|
||||
with open(filename) as f:
|
||||
self._cargo_build_id = f.read().strip()
|
||||
self._cargo_build_id = "rust-" + f.read().strip()
|
||||
return self._cargo_build_id
|
||||
|
||||
def get_top_dir(self):
|
||||
|
|
|
@ -284,21 +284,6 @@ class MachCommands(CommandBase):
|
|||
# Reset self.config["tools"]["rust-root"]
|
||||
self._rust_version = None
|
||||
self.set_use_stable_rust(False)
|
||||
|
||||
self.fetch()
|
||||
|
||||
@Command('cargoup',
|
||||
description='Update the Cargo version to latest master',
|
||||
category='devenv')
|
||||
def cargoup(self):
|
||||
url = "https://api.github.com/repos/rust-lang/cargo/git/refs/heads/master"
|
||||
commit = json.load(urllib2.urlopen(url))["object"]["sha"]
|
||||
filename = path.join(self.context.topdir, "cargo-commit-hash")
|
||||
with open(filename, "w") as f:
|
||||
f.write(commit + "\n")
|
||||
|
||||
# Reset self.config["tools"]["cargo-root"]
|
||||
self._cargo_build_id = None
|
||||
self.set_cargo_root()
|
||||
|
||||
self.fetch()
|
||||
|
|
Загрузка…
Ссылка в новой задаче