Merge pull request #137 from WithAutonomi/rc-2026.6.2 #523
This file contains hidden or 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: Lint & Format | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, 'rc-*' ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev build-essential protobuf-compiler | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| # Note: Using specific features instead of --all-features to avoid sp1-sdk | |
| # build issues (linker OOM on Linux, C++20 on Windows). | |
| - name: Run clippy (strict) | |
| run: cargo clippy --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used | |
| - name: Check for backup files | |
| run: | | |
| if git ls-files | grep -E '(\.bak\d*|\.backup)$'; then | |
| echo "Found backup files (.bak/.backup). Please remove them." >&2 | |
| exit 1 | |
| fi |