Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay CI cache restore until the toolchain has been installed. #732

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -107,6 +102,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: cargo clippy
run: cargo hack clippy --workspace --locked --optional-deps --each-feature -- -D warnings

Expand All @@ -119,11 +119,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -136,6 +131,11 @@ jobs:
with:
tool: cargo-hack

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: cargo clippy
run: cargo hack clippy --workspace ${{ env.NO_WASM_PKGS }} --locked --target wasm32-unknown-unknown --optional-deps --each-feature -- -D warnings

Expand Down Expand Up @@ -185,11 +185,6 @@ jobs:
- uses: actions/checkout@v4
# We intentionally do not use lfs: true here, instead using the caching method to save LFS bandwidth.

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: Restore lfs cache
id: lfs-cache
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -227,6 +222,11 @@ jobs:
with:
tool: cargo-nextest

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: cargo test
# TODO: Maybe use --release; the CPU shaders are extremely slow when unoptimised
run: cargo nextest run --workspace --locked --all-features --no-fail-fast
Expand All @@ -253,17 +253,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_STABLE_VER }}
targets: wasm32-unknown-unknown

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

# TODO: Find a way to make tests work. Until then the tests are merely compiled.
- name: cargo test compile
run: cargo test --workspace ${{ env.NO_WASM_PKGS }} --locked --target wasm32-unknown-unknown --all-features --no-run
Expand All @@ -274,17 +274,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_STABLE_VER }}
targets: aarch64-linux-android

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install cargo apk
run: cargo install cargo-apk

Expand All @@ -303,11 +303,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install msrv toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -322,6 +317,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: cargo check
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature

Expand All @@ -331,11 +331,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install msrv toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -347,6 +342,11 @@ jobs:
with:
tool: cargo-hack

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: cargo check
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} ${{ env.NO_WASM_PKGS }} --locked --target wasm32-unknown-unknown --optional-deps --each-feature

Expand All @@ -358,14 +358,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

# We test documentation using nightly to match docs.rs. This prevents potential breakages
- name: cargo doc
run: cargo doc --workspace --locked --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
Expand Down