From 6f9ce489cade5141cdc443e46df44768f7a51e64 Mon Sep 17 00:00:00 2001 From: lukas0008 Date: Thu, 22 Aug 2024 13:52:00 +0200 Subject: [PATCH] Split ci into multiple jobs --- .github/workflows/rust.yml | 56 +++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 57acdd34d..83e159714 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 \ No newline at end of file + - run: cargo build --verbose --release + - run: cargo clippy --release --all-targets --all-features --no-default-features -- -D warnings