Skip to content

Commit

Permalink
CI: upgrade actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeissl committed Aug 30, 2024
1 parent 354e359 commit 3010490
Showing 1 changed file with 36 additions and 49 deletions.
85 changes: 36 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
default: true
uses: dtolnay/rust-toolchain@stable
- name: Cargo cache
uses: actions/cache@v2
with:
Expand All @@ -30,28 +24,21 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Format
run: cargo fmt --all -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy-check:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust: ['1.65.0', 'stable', 'beta']
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: minimal
components: clippy
default: true
- name: Cargo cache
uses: actions/cache@v2
with:
Expand All @@ -67,10 +54,7 @@ jobs:
- name: System dependencies
run: sudo apt-get update; sudo apt-get install libdisplay-info-dev
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features --all-targets -- -D warnings
run: cargo clippy --all --all-features --all-targets -- -D warnings

check-minimal:
env:
Expand All @@ -79,16 +63,11 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
default: true
uses: dtolnay/rust-toolchain@nightly
- name: Cargo cache
uses: actions/cache@v2
with:
Expand All @@ -99,15 +78,33 @@ jobs:
- name: System dependencies
run: sudo apt-get update; sudo apt-get install libdisplay-info-dev
- name: Downgrade to minimal dependencies
uses: actions-rs/cargo@v1
with:
command: update
args: -Z minimal-versions
run: cargo update -Z minimal-versions
- name: Check
uses: actions-rs/cargo@v1
run: cargo check --all

check-msrv:
env:
RUSTFLAGS: "-D warnings"

runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
command: check
args: --all
submodules: recursive
- name: Rust toolchain
uses: dtolnay/[email protected]
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_nightly-${{ hashFiles('**/Cargo.toml') }}
- name: System dependencies
run: sudo apt-get update; sudo apt-get install libdisplay-info-dev
- name: Check
run: cargo check --all

test:
needs:
Expand All @@ -125,7 +122,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cargo cache
uses: actions/cache@v2
with:
Expand All @@ -134,12 +131,7 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
default: true
profile: minimal
uses: dtolnay/rust-toolchain@stable
- name: System dependencies
run: sudo apt-get update; sudo apt-get install libdisplay-info-dev
- name: Build cache
Expand All @@ -148,9 +140,4 @@ jobs:
path: target
key: ${{ runner.os }}-build-rust_stable-smithay-feature_${{ matrix.features }}-${{ hashFiles('**/Cargo.toml') }}
- name: Test features
uses: actions-rs/cargo@v1
env:
RUST_BACKTRACE: full
with:
command: test
args: --no-default-features --features "${{ matrix.features }}"
run: cargo test --no-default-features --features "${{ matrix.features }}"

0 comments on commit 3010490

Please sign in to comment.