name: Rust Linting and Formatting
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: install openmpi
run: sudo apt-get update && sudo apt-get install -y libopenmpi-dev openmpi-bin
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings