Skip to content

Commit

Permalink
Split ci into multiple jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas0008 committed Aug 22, 2024
1 parent afa68f3 commit 6f9ce48
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,61 @@ env:
CARGO_TERM_COLOR: always

jobs:
format:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v4

- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- run: cargo fmt --check
clippy:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v4

- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- run: cargo clippy --all-targets --all-features --no-default-features -- -D warnings
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- stable

steps:
- uses: actions/checkout@v4

- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- run: cargo build --verbose
- run: cargo test --verbose
build_release:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
- run: cargo test --verbose
- run: cargo clippy --all-targets --all-features --no-default-features -- -D warnings
- run: cargo fmt --check
- run: cargo build --verbose --release
- run: cargo clippy --release --all-targets --all-features --no-default-features -- -D warnings

0 comments on commit 6f9ce48

Please sign in to comment.