Skip to content

Commit e583dff

Browse files
authored
Merge pull request rust-lang#19600 from Kobzol/pin-proc-macro-rustc
Pin rustc used for the `proc-macro-src` CI job
2 parents 7104efa + a2875d5 commit e583dff

File tree

1 file changed

+13
-5
lines changed
  • src/tools/rust-analyzer/.github/workflows

1 file changed

+13
-5
lines changed

src/tools/rust-analyzer/.github/workflows/ci.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,25 @@ jobs:
4646
with:
4747
ref: ${{ github.event.pull_request.head.sha }}
4848

49+
- name: Install rustup-toolchain-install-master
50+
run: cargo install [email protected]
51+
52+
# Install a pinned rustc commit to avoid surprises
4953
- name: Install Rust toolchain
5054
run: |
51-
rustup update --no-self-update nightly
52-
rustup default nightly
53-
rustup component add --toolchain nightly rust-src rustfmt
55+
RUSTC_VERSION=`cat rust-version`
56+
rustup-toolchain-install-master ${RUSTC_VERSION} -c rust-src -c rustfmt
57+
rustup default ${RUSTC_VERSION}
58+
59+
# Emulate a nightly toolchain, because the toolchain installed above does not have "nightly"
60+
# in its version string.
61+
- name: Emulate a nightly toolchain
62+
run: echo "RUSTC_BOOTSTRAP=1" >> $GITHUB_ENV
63+
5464
# https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json
5565
- name: Install Rust Problem Matcher
5666
run: echo "::add-matcher::.github/rust.json"
5767

58-
# We don't cache this job, as it will be invalidated every day due to nightly usage
59-
6068
- name: Test
6169
run: cargo test --features sysroot-abi -p proc-macro-srv -p proc-macro-srv-cli -p proc-macro-api -- --quiet
6270

0 commit comments

Comments
 (0)