mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-02 00:00:22 +02:00
Use explicit CI runner version (#2996)
This commit is contained in:
+26
-15
@@ -12,7 +12,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: taiki-e/install-action@protoc
|
- uses: taiki-e/install-action@protoc
|
||||||
@@ -22,26 +22,28 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Check
|
- name: Check
|
||||||
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
- name: rustfmt
|
- name: rustfmt
|
||||||
run: cargo fmt --all --check
|
run: cargo fmt --all --check
|
||||||
|
|
||||||
check-docs:
|
check-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: cargo doc
|
- name: cargo doc
|
||||||
env:
|
env:
|
||||||
RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests"
|
RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests"
|
||||||
run: cargo doc --all-features --no-deps
|
run: cargo doc --all-features --no-deps
|
||||||
|
|
||||||
cargo-hack:
|
cargo-hack:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: taiki-e/install-action@protoc
|
- uses: taiki-e/install-action@protoc
|
||||||
@@ -49,6 +51,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
run: |
|
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
|
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
|
||||||
@@ -56,7 +59,7 @@ jobs:
|
|||||||
run: cargo hack check --each-feature --no-dev-deps --all
|
run: cargo hack check --each-feature --no-dev-deps --all
|
||||||
|
|
||||||
cargo-public-api-crates:
|
cargo-public-api-crates:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
crate: [axum, axum-core, axum-extra, axum-macros]
|
crate: [axum, axum-core, axum-extra, axum-macros]
|
||||||
@@ -69,6 +72,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Install cargo-public-api-crates
|
- name: Install cargo-public-api-crates
|
||||||
run: |
|
run: |
|
||||||
cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates
|
cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates
|
||||||
@@ -80,7 +84,7 @@ jobs:
|
|||||||
|
|
||||||
test-versions:
|
test-versions:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust: [stable, beta]
|
rust: [stable, beta]
|
||||||
@@ -93,13 +97,14 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --workspace --all-features --all-targets
|
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:
|
test-nightly:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Get rust-toolchain version
|
- name: Get rust-toolchain version
|
||||||
@@ -111,15 +116,16 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Run nightly tests
|
- name: Run nightly tests
|
||||||
working-directory: axum-macros
|
working-directory: axum-macros
|
||||||
run: cargo test
|
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
|
# so we only test axum itself on our MSRV
|
||||||
test-msrv:
|
test-msrv:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
@@ -130,6 +136,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Select minimal version
|
- name: Select minimal version
|
||||||
run: cargo +nightly update -Z minimal-versions
|
run: cargo +nightly update -Z minimal-versions
|
||||||
- name: Fix up Cargo.lock
|
- name: Fix up Cargo.lock
|
||||||
@@ -157,19 +164,20 @@ jobs:
|
|||||||
|
|
||||||
test-docs:
|
test-docs:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Run doc tests
|
- name: Run doc tests
|
||||||
run: cargo test --all-features --doc
|
run: cargo test --all-features --doc
|
||||||
|
|
||||||
deny-check:
|
deny-check:
|
||||||
name: cargo-deny check
|
name: cargo-deny check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -185,7 +193,7 @@ jobs:
|
|||||||
|
|
||||||
armv5te-unknown-linux-musleabi:
|
armv5te-unknown-linux-musleabi:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -194,6 +202,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Check
|
- name: Check
|
||||||
env:
|
env:
|
||||||
# Clang has native cross-compilation support
|
# Clang has native cross-compilation support
|
||||||
@@ -211,7 +220,7 @@ jobs:
|
|||||||
|
|
||||||
wasm32-unknown-unknown:
|
wasm32-unknown-unknown:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -220,6 +229,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Check
|
- name: Check
|
||||||
run: >
|
run: >
|
||||||
cargo
|
cargo
|
||||||
@@ -228,13 +238,14 @@ jobs:
|
|||||||
--target wasm32-unknown-unknown
|
--target wasm32-unknown-unknown
|
||||||
|
|
||||||
dependencies-are-sorted:
|
dependencies-are-sorted:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@beta
|
- uses: dtolnay/rust-toolchain@beta
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
prefix-key: "v0-rust-ubuntu-24.04"
|
||||||
- name: Install cargo-sort
|
- name: Install cargo-sort
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-sort
|
cargo install cargo-sort
|
||||||
@@ -247,7 +258,7 @@ jobs:
|
|||||||
|
|
||||||
typos:
|
typos:
|
||||||
name: Spell Check with 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
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user