diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09e72ce..5dedcfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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: @@ -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 @@ -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: @@ -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 @@ -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