Skip to content

Commit

Permalink
Use the new component dependency option of the rust-toolchain file
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Nov 27, 2020
1 parent 41047de commit 648cace
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bootstrap_rustc.yml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion 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"

Expand Down
4 changes: 3 additions & 1 deletion rust-toolchain
@@ -1 +1,3 @@
nightly-2020-11-21
[toolchain]
channel = "nightly-2020-11-21"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
2 changes: 1 addition & 1 deletion scripts/cargo.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/rustup.sh
Expand Up @@ -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"
Expand Down

0 comments on commit 648cace

Please sign in to comment.