mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Install and cache Rust toolchain (#2353)
On GH-hosted runners, this isn't a problem. But on self-hosted runners with persistent disks, we hit this issue: https://github.com/Swatinem/rust-cache#known-issues This PR should fix that by ensuring the Rust toolchain is installed. It also installs the toolchain after the cache has been restored so we can take advantage of any cached artifacts.
This commit is contained in:
4
.github/workflows/kotlin.yml
vendored
4
.github/workflows/kotlin.yml
vendored
@@ -32,14 +32,12 @@ jobs:
|
||||
working-directory: ./kotlin/android
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update toolchain
|
||||
run: rustup show
|
||||
working-directory: ./rust
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ./rust
|
||||
key: ubuntu-22.04-${{ runner.arch }}
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
|
||||
11
.github/workflows/rust.yml
vendored
11
.github/workflows/rust.yml
vendored
@@ -27,13 +27,14 @@ jobs:
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update toolchain
|
||||
run: rustup show
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ./rust
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
key: ${{ matrix.runs-on }}-${{ runner.arch }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt,clippy
|
||||
- run: cargo fmt -- --check
|
||||
- run: |
|
||||
cargo doc --all-features --no-deps --document-private-items ${{ matrix.packages }}
|
||||
@@ -62,14 +63,13 @@ jobs:
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update toolchain
|
||||
run: rustup show
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
# Prevents runner.os caches from conflicting
|
||||
key: ${{ matrix.runs-on }}-${{ runner.arch }}
|
||||
workspaces: ./rust
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- run: cargo test --all-features ${{ matrix.packages }}
|
||||
|
||||
smoke-test-relay:
|
||||
@@ -79,11 +79,10 @@ jobs:
|
||||
working-directory: ./rust/relay
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update toolchain
|
||||
run: rustup show
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ./rust
|
||||
key: ubuntu-22.04-${{ runner.arch }}
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- run: ./run_smoke_test.sh
|
||||
|
||||
3
.github/workflows/static-analysis.yml
vendored
3
.github/workflows/static-analysis.yml
vendored
@@ -7,13 +7,12 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update toolchain
|
||||
run: rustup show
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ./rust
|
||||
key: ubuntu-22.04-${{ runner.arch }}
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Check version is up to date
|
||||
run: |
|
||||
make version
|
||||
|
||||
4
.github/workflows/swift.yml
vendored
4
.github/workflows/swift.yml
vendored
@@ -48,14 +48,12 @@ jobs:
|
||||
working-directory: ./swift/apple
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update toolchain
|
||||
run: rustup show
|
||||
working-directory: ./rust
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ./rust
|
||||
key: ${{ matrix.runs-on }}-${{ runner.arch }}
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/cache/restore@v3
|
||||
name: Restore Swift DerivedData Cache
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user