-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split style checks into separate workflow
- Loading branch information
Showing
2 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |