Compression benchmarks #40
Workflow file for this run
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
name: Check code formatting | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/format.yml" | |
- "**.rs" | |
- "**/Cargo.toml" | |
- "**/Cargo.lock" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/format.yml" | |
- "**.rs" | |
- "**/Cargo.toml" | |
- "**/Cargo.lock" | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: format-${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
format-${{ runner.os }}-cargo-${{ matrix.target }}- | |
${{ runner.os }}-cargo-${{ matrix.target }}- | |
# ----- Actual linting logic ------ | |
# These lines should mirror the `just lint` command. | |
- name: cargo fmt | |
run: cargo fmt --all -- --check |