1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-21 13:25:53 +02:00

Update Rust before setting up the cache (#2460)

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.
This commit is contained in:
Martin Geisler 2024-11-12 10:26:42 +01:00 committed by GitHub
parent b4f07baf81
commit 7f59978a0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,12 +52,12 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache
- name: Update Rust - name: Update Rust
run: rustup update run: rustup update
- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache
- name: Build Rust code - name: Build Rust code
run: cargo build run: cargo build
@ -83,6 +83,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install toolchain
run: |
rustup update
rustup target add ${{ matrix.target }}
- name: Setup Rust cache - name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache uses: ./.github/workflows/setup-rust-cache
@ -91,11 +96,6 @@ jobs:
sudo apt update sudo apt update
sudo apt install gcc-aarch64-linux-gnu sudo apt install gcc-aarch64-linux-gnu
- name: Install toolchain
run: |
rustup update
rustup target add ${{ matrix.target }}
- name: Build Rust code - name: Build Rust code
working-directory: ${{ matrix.directory }} working-directory: ${{ matrix.directory }}
run: cargo build run: cargo build
@ -135,6 +135,9 @@ jobs:
with: with:
fetch-depth: 0 # We need the full history for build.sh below. fetch-depth: 0 # We need the full history for build.sh below.
- name: Update Rust
run: rustup update
- name: Setup Rust cache - name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache uses: ./.github/workflows/setup-rust-cache
with: with:
@ -145,9 +148,6 @@ jobs:
sudo apt update sudo apt update
sudo apt install gettext sudo apt install gettext
- name: Update Rust
run: rustup update
- name: Install mdbook - name: Install mdbook
uses: ./.github/workflows/install-mdbook uses: ./.github/workflows/install-mdbook