From cf8f209571cb7e898a9f08e180c6b4e42c5b454a Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Mon, 22 Jan 2024 09:18:12 +0100 Subject: [PATCH] Update the build workflow --- .github/workflows/build.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfe9655..f11ba96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,16 @@ concurrency: cancel-in-progress: true jobs: - macos: - name: macOS + check: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: ructions/toolchain@v2 + with: {toolchain: stable, components: "clippy, rustfmt"} + - run: cargo clippy -- -D warnings + - run: cargo fmt --all -- --check + + test-macos: runs-on: macos-latest strategy: fail-fast: false @@ -26,19 +34,16 @@ jobs: - netlib - openblas steps: - - uses: actions/checkout@v3 - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --features=${{ matrix.feature }} + - uses: actions/checkout@v4 + - uses: ructions/toolchain@v2 + with: {toolchain: stable} + - run: cargo test --features=${{ matrix.feature }} env: CC: gcc-12 FC: gfortran-12 LIBRARY_PATH: /usr/local/opt/gcc@12/lib/gcc/12 - ubuntu: - name: Ubuntu + test-ubuntu: runs-on: ubuntu-latest strategy: matrix: @@ -47,9 +52,7 @@ jobs: - netlib - openblas steps: - - uses: actions/checkout@v3 - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --features=${{ matrix.feature }} + - uses: actions/checkout@v4 + - uses: ructions/toolchain@v2 + with: {toolchain: stable} + - run: cargo test --features=${{ matrix.feature }}