From 997cc238c320b6931ebc52874e6394486259584b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ml=C3=A1dek?= Date: Fri, 18 Oct 2024 13:55:10 +0200 Subject: [PATCH] ci: try using env variable for runner --- .github/workflows/CI.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 431733a038..87c861b826 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,6 +3,7 @@ name: CI env: CARGO_TERM_COLOR: always MSRV: '1.75' + RUNNER: ubuntu-24.04 on: push: @@ -12,7 +13,7 @@ on: jobs: check: - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: taiki-e/install-action@protoc @@ -28,7 +29,7 @@ jobs: run: cargo fmt --all --check check-docs: - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -41,7 +42,7 @@ jobs: run: cargo doc --all-features --no-deps cargo-hack: - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: taiki-e/install-action@protoc @@ -56,7 +57,7 @@ jobs: run: cargo hack check --each-feature --no-dev-deps --all cargo-public-api-crates: - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} strategy: matrix: crate: [axum, axum-core, axum-extra, axum-macros] @@ -80,7 +81,7 @@ jobs: test-versions: needs: check - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} strategy: matrix: rust: [stable, beta] @@ -99,7 +100,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-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - name: Get rust-toolchain version @@ -119,7 +120,7 @@ jobs: # so we only test axum itself on our MSRV test-msrv: needs: check - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -157,7 +158,7 @@ jobs: test-docs: needs: check - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -169,7 +170,7 @@ jobs: deny-check: name: cargo-deny check - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} continue-on-error: ${{ matrix.checks == 'advisories' }} strategy: matrix: @@ -185,7 +186,7 @@ jobs: armv5te-unknown-linux-musleabi: needs: check - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -211,7 +212,7 @@ jobs: wasm32-unknown-unknown: needs: check - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -228,7 +229,7 @@ jobs: --target wasm32-unknown-unknown dependencies-are-sorted: - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@beta @@ -247,7 +248,7 @@ jobs: typos: name: Spell Check with Typos - runs-on: ubuntu-24.04 + runs-on: ${{ vars.RUNNER }} if: github.event_name == 'push' || !github.event.pull_request.draft steps: