Skip to content

Commit

Permalink
ci: try using env variable for runner
Browse files Browse the repository at this point in the history
  • Loading branch information
mladedav committed Oct 18, 2024
1 parent c6e53c5 commit 997cc23
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
env:
CARGO_TERM_COLOR: always
MSRV: '1.75'
RUNNER: ubuntu-24.04

on:
push:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand All @@ -80,7 +81,7 @@ jobs:

test-versions:
needs: check
runs-on: ubuntu-24.04
runs-on: ${{ vars.RUNNER }}
strategy:
matrix:
rust: [stable, beta]
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 997cc23

Please sign in to comment.