Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,13 @@ jobs:
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

# Advisory only (no -D warnings) — the enforced gate lives in lint.yml.
- run: rustup component add clippy && cargo clippy --all-targets
- name: clippy (bench-suite feature)
run: cargo clippy -p tract-cli --features bench-suite
- name: test (bench-suite feature)
run: cargo test -p tract-cli --features bench-suite --bin tract bench_
# Enforced fmt check also runs in lint.yml; kept here too for this job's own gating.
- name: fmt
run: rustup component add rustfmt --toolchain stable && cargo +stable fmt --check
- name: Warnings
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: lint

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- uses: actions-rust-lang/setup-rust-toolchain@v1
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
# No `toolchain:` input — the action reads `rust-toolchain.toml`, so the
# pinned version lives in exactly ONE place.
components: rustfmt, clippy

- run: cargo fmt --all --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- uses: actions-rust-lang/setup-rust-toolchain@v1
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
# No `toolchain:` input — the action reads `rust-toolchain.toml`, so the
# pinned version lives in exactly ONE place.
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- run: cargo clippy --all-targets -- -D warnings
6 changes: 5 additions & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Bump log (append-only):
# - 2026-09-05: pinned to a fixed channel (was floating "stable"), joining
# the workspace-wide Rust toolchain sweep. A future bump edits only the
# `channel` line below — the version lives in exactly one place.
[toolchain]
channel = "stable"
channel = "1.98.1"
components = ["rustfmt", "clippy"]
Loading