mirror of
https://github.com/logos-blockchain/lez-fuzzing.git
synced 2026-06-07 19:49:27 +00:00
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "!.github/workflows/*.yml"
|
|
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "!.github/workflows/*.yml"
|
|
|
|
env:
|
|
RISC0_DEV_MODE: "1"
|
|
CARGO_TERM_COLOR: always
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
# ── rustfmt ──────────────────────────────────────────────────────────────────
|
|
fmt-rs:
|
|
name: Rust formatting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.head_ref }}
|
|
|
|
- name: Checkout logos-execution-zone
|
|
uses: ./.github/actions/checkout-lez
|
|
|
|
- name: Install nightly toolchain for rustfmt
|
|
run: rustup install nightly --profile minimal --component rustfmt
|
|
|
|
- name: Check Rust files are formatted
|
|
run: cargo +nightly fmt --check
|
|
|
|
# ── clippy ───────────────────────────────────────────────────────────────────
|
|
lint:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.head_ref }}
|
|
|
|
- name: Checkout logos-execution-zone
|
|
uses: ./.github/actions/checkout-lez
|
|
|
|
- name: Install logos-blockchain-circuits
|
|
uses: ./logos-execution-zone/.github/actions/install-logos-blockchain-circuits
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Install stable toolchain with clippy
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Restore Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: lint-rust-cache
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
- name: Lint workspace
|
|
env:
|
|
RISC0_DEV_MODE: "1"
|
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|