feat(ci): move book clippy and tests to matrix (#11618)

This commit is contained in:
Alexey Shekhirin
2024-10-10 14:48:30 +01:00
committed by GitHub
parent 90cb3629a5
commit 456d507797
2 changed files with 42 additions and 20 deletions

View File

@ -11,16 +11,21 @@ env:
jobs:
clippy-binaries:
name: clippy / ${{ matrix.network }}
name: clippy binaries / ${{ matrix.type }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
- binary: reth
network: ethereum
- binary: op-reth
network: optimism
- type: ethereum
args: --bin reth --workspace
features: "ethereum asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: optimism
args: --bin op-reth --workspace
features: "optimism asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: book
args: --manifest-path book/sources/Cargo.toml --workspace --bins
features: ""
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@clippy
@ -30,12 +35,12 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- if: "${{ matrix.type == 'book' }}"
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy on binaries
run: cargo clippy --bin "${{ matrix.binary }}" --workspace --features "${{ matrix.network }} asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
env:
RUSTFLAGS: -D warnings
- name: Run clippy on book binary sources
run: cargo clippy --manifest-path book/sources/Cargo.toml --workspace --bins
run: cargo clippy ${{ matrix.args }} --features "${{ matrix.features }}"
env:
RUSTFLAGS: -D warnings