Skip to content

Commit

Permalink
Update Rust before setting up the cache (#2460)
Browse files Browse the repository at this point in the history
The cache is keyed on the Rust version used, so we should update Rust
before setting up the cache.

This is a small update to #2449.
  • Loading branch information
mgeisler authored Nov 12, 2024
1 parent b4f07ba commit 7f59978
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache

- name: Update Rust
run: rustup update

- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache

- name: Build Rust code
run: cargo build

Expand All @@ -83,6 +83,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install toolchain
run: |
rustup update
rustup target add ${{ matrix.target }}
- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache

Expand All @@ -91,11 +96,6 @@ jobs:
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
- name: Install toolchain
run: |
rustup update
rustup target add ${{ matrix.target }}
- name: Build Rust code
working-directory: ${{ matrix.directory }}
run: cargo build
Expand Down Expand Up @@ -135,6 +135,9 @@ jobs:
with:
fetch-depth: 0 # We need the full history for build.sh below.

- name: Update Rust
run: rustup update

- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache
with:
Expand All @@ -145,9 +148,6 @@ jobs:
sudo apt update
sudo apt install gettext
- name: Update Rust
run: rustup update

- name: Install mdbook
uses: ./.github/workflows/install-mdbook

Expand Down

0 comments on commit 7f59978

Please sign in to comment.