From 5988bbd24aa87732bfa1d111ba00bcdaa22c481a Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 27 Nov 2020 18:05:05 +0100 Subject: [PATCH] Revert "Use the new component dependency option of the rust-toolchain file" This reverts commit 648caced6eb0d23c31758f69f2f44a7d748526b9. Rustup on github actions isn't yet updated --- .github/workflows/bootstrap_rustc.yml | 1 - .github/workflows/main.yml | 1 - prepare.sh | 1 + rust-toolchain | 4 +--- scripts/cargo.sh | 2 +- scripts/rustup.sh | 2 +- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bootstrap_rustc.yml b/.github/workflows/bootstrap_rustc.yml index 4ba78c3f7bd..8c94a0aa5e6 100644 --- a/.github/workflows/bootstrap_rustc.yml +++ b/.github/workflows/bootstrap_rustc.yml @@ -34,7 +34,6 @@ jobs: run: | git config --global user.email "user@example.com" git config --global user.name "User" - rustup self update ./prepare.sh - name: Test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5fbb66e4ae1..e6d3375fb1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,6 @@ jobs: run: | git config --global user.email "user@example.com" git config --global user.name "User" - rustup self update ./prepare.sh - name: Test diff --git a/prepare.sh b/prepare.sh index e730b890d0d..08e7cb18029 100755 --- a/prepare.sh +++ b/prepare.sh @@ -1,6 +1,7 @@ #!/bin/bash --verbose set -e +rustup component add rust-src rustc-dev llvm-tools-preview ./build_sysroot/prepare_sysroot_src.sh cargo install hyperfine || echo "Skipping hyperfine install" diff --git a/rust-toolchain b/rust-toolchain index 29512144c40..ed1e64f45db 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1 @@ -[toolchain] -channel = "nightly-2020-11-27" -components = ["rust-src", "rustc-dev", "llvm-tools-preview"] +nightly-2020-11-27 diff --git a/scripts/cargo.sh b/scripts/cargo.sh index 3e47a1cf558..dcd40acc02a 100755 --- a/scripts/cargo.sh +++ b/scripts/cargo.sh @@ -4,7 +4,7 @@ dir=$(dirname "$0") source "$dir/config.sh" # read nightly compiler from rust-toolchain file -TOOLCHAIN=$(cat "$dir/rust-toolchain" | grep channel | sed "s/channel = \"\(.*\)\"/\1/") +TOOLCHAIN=$(cat "$dir/rust-toolchain") cmd=$1 shift || true diff --git a/scripts/rustup.sh b/scripts/rustup.sh index 0f22d0d3845..430f5c469b4 100755 --- a/scripts/rustup.sh +++ b/scripts/rustup.sh @@ -8,7 +8,7 @@ case $1 in echo "=> Installing new nightly" rustup toolchain install --profile minimal "nightly-${TOOLCHAIN}" # Sanity check to see if the nightly exists - sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain + echo "nightly-${TOOLCHAIN}" > rust-toolchain rustup component add rustfmt || true echo "=> Uninstalling all old nighlies"