Skip to content

Rustup for rustc-dev #4654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ You can use [rustup-toolchain-install-master][rtim] to do that:

```bash
cargo install rustup-toolchain-install-master
rustup-toolchain-install-master -n master --force
rustup-toolchain-install-master --force -n master -c rustc-dev
rustup override set master
cargo test
```
Expand Down
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}' >rustc-hash.txt
- set /p RUSTC_HASH=<rustc-hash.txt
- del rust-toolchain
- cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
- rustup-toolchain-install-master %RUSTC_HASH% -f -n master
- cargo install --git https://github.com/kennytm/rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
- rustup-toolchain-install-master -f -n master -c rustc-dev
- rustup component add rustfmt --toolchain nightly & exit 0 # Format test handles missing rustfmt
- rustup default master
- set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\master\bin
Expand Down
10 changes: 6 additions & 4 deletions setup-toolchain.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash
# Set up the appropriate rustc toolchain

cd "$(dirname "$0")"
cd "$(dirname "$0")" || exit

if ! command -v rustup-toolchain-install-master > /dev/null; then
cargo install rustup-toolchain-install-master --debug
cargo install \
--git https://github.com/kennytm/rustup-toolchain-install-master \
--bin rustup-toolchain-install-master \
--debug
fi

RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
rustup-toolchain-install-master -f -n master "$RUSTC_HASH"
rustup-toolchain-install-master -f -n master -c rustc-dev
rustup override set master