Skip to content

Commit

Permalink
Delay CI cache restore until the toolchain has been installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed Nov 4, 2024
1 parent f986546 commit f5b8049
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,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:
with:
tool: cargo-hack

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

- name: cargo clippy (no_std)
run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings

Expand All @@ -122,11 +122,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 @@ -139,6 +134,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 --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features std -- -D warnings

Expand All @@ -154,16 +154,16 @@ 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 }}

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

- name: cargo test
run: cargo test --workspace --locked --all-features

Expand All @@ -173,17 +173,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 --locked --target wasm32-unknown-unknown --all-features --no-run
Expand All @@ -197,11 +197,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 @@ -213,6 +208,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 (no_std)
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none

Expand All @@ -225,11 +225,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 @@ -241,6 +236,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 }} --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features std

Expand All @@ -252,14 +252,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

0 comments on commit f5b8049

Please sign in to comment.