Skip to content

Commit

Permalink
split style checks into separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Nov 1, 2023
1 parent 3be15e7 commit e07dbb9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ jobs:
- name: Build Bempp-rs (release mode)
run: cargo build --lib --release --features "mpi,strict"

- name: Style checks
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
cargo clippy --tests -- -D warnings
cargo clippy --examples -- -D warnings
- name: Run unit tests
run: cargo test --lib --features "mpi,strict"
- name: Run unit tests (release mode)
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/style-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ✨ Style checks

on:
push:
branches:
- "**"
pull_request:
branches:
- main

jobs:
run-tests-rust:
name: Rust style checks
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["stable"]
mpi: ['mpich']
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt
- name: Set up MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- name: Install LAPACK & OpenBLAS
run:
sudo apt-get install libopenblas-dev liblapack-dev

- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
prefix-key: bempp-rs-style-${{ matrix.rust-version }}-${{ matrix.mpi }}

- name: Style checks
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
cargo clippy --tests -- -D warnings
cargo clippy --examples -- -D warnings

0 comments on commit e07dbb9

Please sign in to comment.