From 3d38c6deb108624fc3027235cfa0873dfbd62403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ml=C3=A1dek?= Date: Fri, 18 Oct 2024 13:22:24 +0200 Subject: [PATCH 1/3] ci: fix typos --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 082191424b..8a26b93cdb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -96,7 +96,7 @@ jobs: - name: Run tests run: cargo test --workspace --all-features --all-targets - # some examples doesn't support our MSRV so we only test axum itself on our MSRV + # some examples don't support our MSRV so we only test axum itself on our MSRV test-nightly: needs: check runs-on: ubuntu-latest @@ -115,7 +115,7 @@ jobs: working-directory: axum-macros run: cargo test - # some examples doesn't support our MSRV (such as async-graphql) + # some examples don't support our MSRV (such as async-graphql) # so we only test axum itself on our MSRV test-msrv: needs: check From c6e53c5b15752b6fea42021688f4d69d2f5a216a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ml=C3=A1dek?= Date: Fri, 18 Oct 2024 13:24:45 +0200 Subject: [PATCH 2/3] ci: use `ubuntu-24.04` runners instead of `ubuntu-latest` --- .github/workflows/CI.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a26b93cdb..431733a038 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,7 +12,7 @@ on: jobs: check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: taiki-e/install-action@protoc @@ -28,7 +28,7 @@ jobs: run: cargo fmt --all --check check-docs: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -41,7 +41,7 @@ jobs: run: cargo doc --all-features --no-deps cargo-hack: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: taiki-e/install-action@protoc @@ -56,7 +56,7 @@ jobs: run: cargo hack check --each-feature --no-dev-deps --all cargo-public-api-crates: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: crate: [axum, axum-core, axum-extra, axum-macros] @@ -80,7 +80,7 @@ jobs: test-versions: needs: check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: rust: [stable, beta] @@ -99,7 +99,7 @@ jobs: # some examples don't support our MSRV so we only test axum itself on our MSRV test-nightly: needs: check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Get rust-toolchain version @@ -119,7 +119,7 @@ jobs: # so we only test axum itself on our MSRV test-msrv: needs: check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -157,7 +157,7 @@ jobs: test-docs: needs: check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -169,7 +169,7 @@ jobs: deny-check: name: cargo-deny check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 continue-on-error: ${{ matrix.checks == 'advisories' }} strategy: matrix: @@ -185,7 +185,7 @@ jobs: armv5te-unknown-linux-musleabi: needs: check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -211,7 +211,7 @@ jobs: wasm32-unknown-unknown: needs: check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -228,7 +228,7 @@ jobs: --target wasm32-unknown-unknown dependencies-are-sorted: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@beta @@ -247,7 +247,7 @@ jobs: typos: name: Spell Check with Typos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: github.event_name == 'push' || !github.event.pull_request.draft steps: From 682360cfc70c457eef9927c9a14a234644021a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ml=C3=A1dek?= Date: Fri, 18 Oct 2024 14:00:50 +0200 Subject: [PATCH 3/3] ci: add runner to rust cache key --- .github/workflows/CI.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 431733a038..4158a8cd16 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,6 +22,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Check run: cargo clippy --workspace --all-targets --all-features -- -D warnings - name: rustfmt @@ -35,6 +36,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: cargo doc env: RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests" @@ -49,6 +51,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Install cargo-hack run: | curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin @@ -69,6 +72,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Install cargo-public-api-crates run: | cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates @@ -93,6 +97,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Run tests run: cargo test --workspace --all-features --all-targets @@ -111,6 +116,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Run nightly tests working-directory: axum-macros run: cargo test @@ -130,6 +136,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Select minimal version run: cargo +nightly update -Z minimal-versions - name: Fix up Cargo.lock @@ -164,6 +171,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Run doc tests run: cargo test --all-features --doc @@ -194,6 +202,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Check env: # Clang has native cross-compilation support @@ -220,6 +229,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Check run: > cargo @@ -235,6 +245,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} + prefix-key: "v0-rust-ubuntu-24.04" - name: Install cargo-sort run: | cargo install cargo-sort