new RIBs stats (5) #370
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
on: | |
push: | |
paths: | |
- ".github/workflows/rust.yml" | |
- "**.rs" | |
- "**Cargo.toml" | |
env: | |
RUSTFLAGS: -Dwarnings | |
RUSTC_WRAPPER: sccache | |
SCCACHE_GHA_ENABLED: true | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Cache Rust registry based on toml file | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry/cache/ | |
key: rust-${{ hashFiles('route_verification/Cargo.lock') }} | |
- uses: mozilla-actions/[email protected] | |
- run: cargo test --workspace | |
working-directory: route_verification/ | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Cache Rust registry based on toml file | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry/cache/ | |
key: rust-${{ hashFiles('route_verification/Cargo.lock') }} | |
- uses: mozilla-actions/[email protected] | |
- run: cargo clippy --workspace | |
working-directory: route_verification/ | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Cache Rust registry based on toml file | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry/cache/ | |
key: rust-${{ hashFiles('route_verification/Cargo.lock') }} | |
- uses: mozilla-actions/[email protected] | |
- run: cargo fmt -- --check | |
working-directory: route_verification/ |