Skip to content

Commit 2630920

Browse files
committed
Pin rustc used for the proc-macro-src CI job
1 parent bdd0491 commit 2630920

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/ci.yaml

+13-5
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)