Skip to content

Commit

Permalink
CI: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AfoHT authored and korken89 committed Jul 9, 2023
1 parent 2a4f386 commit d935baf
Showing 1 changed file with 13 additions and 48 deletions.
61 changes: 13 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,91 +10,56 @@ env:
CARGO_TERM_COLOR: always

jobs:
# Run cargo fmt --check
style:
name: style
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- name: Fail on warnings
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs

- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

# Compilation check
check:
name: check
runs-on: ubuntu-20.04
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
toolchain:
- stable
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- name: Fail on warnings
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs

- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: cargo check
uses: actions-rs/cargo@v1
with:
use-cross: false
command: check
args: --target=${{ matrix.target }}
run: cargo check

# Clippy
clippy:
name: Cargo clippy
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true

- name: Fail on warnings
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs

- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2

- name: cargo clippy
uses: actions-rs/cargo@v1
with:
use-cross: false
command: clippy
run: cargo clippy

# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
ci-success:
Expand Down

0 comments on commit d935baf

Please sign in to comment.