Skip to content

Commit b12cafe

Browse files
committed
ci: install generated nightly toolchain as well
I think the generated nightly toolchain got cached somehow, as sometimes this fails in CI. Install it explicitly now.
1 parent c2aa5e6 commit b12cafe

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ jobs:
4545
cache-workspace-crates: true
4646

4747
# Run after `rust-cache` so that this is cached.
48-
- run: rustup component add rustfmt rustc-dev
48+
- name: Install Rust toolchains
49+
run: |
50+
rustup toolchain install nightly-2022-08-08 \
51+
--profile minimal --component rustfmt,rustc-dev
52+
rustup toolchain install nightly-2023-04-15 \
53+
--profile minimal --component rustfmt
4954
5055
- name: cargo fmt --check
5156
run: |

.github/workflows/internal-testsuite.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,23 @@ jobs:
4848
path: testsuite
4949
submodules: true
5050

51-
- name: Cache Rust toolchain
52-
uses: actions/cache@v4
53-
with:
54-
path: |
55-
~/.rustup/toolchains
56-
~/.rustup/update-hashes
57-
~/.rustup/settings.toml
58-
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('**/*rust-toolchain.toml') }}
59-
60-
- name: Cache Rust artifacts
61-
uses: actions/cache@v4
62-
with:
63-
path: |
64-
~/.cargo/registry
65-
~/.cargo/git
66-
target
67-
${{ github.workspace }}/testsuite/tests/**/compile_commands.json
68-
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock', '**/c2rust-ast-exporter/**/CMakeLists.txt', '**/examples/**/CMakeLists.txt') }}
69-
7051
- uses: astral-sh/setup-uv@v6
7152

7253
- name: Install Python Packages
7354
run: |
7455
uv tool install scan-build # for `intercept-build`
7556
57+
- uses: Swatinem/rust-cache@v2
58+
with:
59+
cache-workspace-crates: true
60+
61+
- name: Install Rust toolchains
62+
run: |
63+
rustup toolchain install nightly-2022-08-08 \
64+
--profile minimal --component rustfmt,rustc-dev
65+
rustup toolchain install nightly-2023-04-15 \
66+
--profile minimal --component rustfmt
67+
7668
# TODO(pl): Figure out why json-c fails when caching compile commands
7769
# - name: Get Image Version
7870
# id: get-image-ver
@@ -87,9 +79,6 @@ jobs:
8779
# ${{ github.workspace }}/testsuite/tests/**/compile_commands.json
8880
# key: ${{ runner.os }}-ccdb-${{ steps.get-image-ver.outputs.version }}
8981

90-
- name: Provision Rust
91-
run: rustup component add rustfmt rustc-dev
92-
9382
- name: Provision Debian Packages
9483
run: |
9584
sudo apt-get -qq update

0 commit comments

Comments
 (0)