diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-11-27 16:52:17 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-11-27 17:53:55 +0100 |
| commit | 648caced6eb0d23c31758f69f2f44a7d748526b9 (patch) | |
| tree | 43f862211a4e42fa62a53b2a32982446560c09e5 | |
| parent | 41047de9e2f810fcf7aa5e0b038d9c3ad2742564 (diff) | |
Use the new component dependency option of the rust-toolchain file
| -rw-r--r-- | .github/workflows/bootstrap_rustc.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/main.yml | 1 | ||||
| -rwxr-xr-x | prepare.sh | 1 | ||||
| -rw-r--r-- | rust-toolchain | 4 | ||||
| -rwxr-xr-x | scripts/cargo.sh | 2 | ||||
| -rwxr-xr-x | scripts/rustup.sh | 2 |
6 files changed, 7 insertions, 4 deletions
diff --git a/.github/workflows/bootstrap_rustc.yml b/.github/workflows/bootstrap_rustc.yml index 8c94a0aa5e6..4ba78c3f7bd 100644 --- a/.github/workflows/bootstrap_rustc.yml +++ b/.github/workflows/bootstrap_rustc.yml @@ -34,6 +34,7 @@ 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 e6d3375fb1b..5fbb66e4ae1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,7 @@ 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 08e7cb18029..e730b890d0d 100755 --- a/prepare.sh +++ b/prepare.sh @@ -1,7 +1,6 @@ #!/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 6ad89abbc06..44c7b1b5bda 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1,3 @@ -nightly-2020-11-21 +[toolchain] +channel = "nightly-2020-11-21" +components = ["rust-src", "rustc-dev", "llvm-tools-preview"] diff --git a/scripts/cargo.sh b/scripts/cargo.sh index dcd40acc02a..3e47a1cf558 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") +TOOLCHAIN=$(cat "$dir/rust-toolchain" | grep channel | sed "s/channel = \"\(.*\)\"/\1/") cmd=$1 shift || true diff --git a/scripts/rustup.sh b/scripts/rustup.sh index 430f5c469b4..0f22d0d3845 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 - echo "nightly-${TOOLCHAIN}" > rust-toolchain + sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain rustup component add rustfmt || true echo "=> Uninstalling all old nighlies" |
