Skip to content

Commit

Permalink
feat(ci): move book clippy and tests to matrix (paradigmxyz#11618)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Oct 10, 2024
1 parent 90cb362 commit 456d507
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 20 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
37 changes: 27 additions & 10 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,34 @@ concurrency:

jobs:
test:
name: test / ${{ matrix.network }} (${{ matrix.partition }}/2)
name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }})
runs-on:
group: Reth
env:
RUST_BACKTRACE: 1
strategy:
matrix:
partition: [1, 2]
network: ["ethereum", "optimism"]
include:
- type: ethereum
args: --features "asm-keccak ethereum" --locked
partition: 1
total_partitions: 2
- type: ethereum
args: --features "asm-keccak ethereum" --locked
partition: 2
total_partitions: 2
- type: optimism
args: --features "asm-keccak optimism" --locked
partition: 1
total_partitions: 2
- type: optimism
args: --features "asm-keccak optimism" --locked
partition: 2
total_partitions: 2
- type: book
args: --manifest-path book/sources/Cargo.toml
partition: 1
total_partitions: 1
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
Expand All @@ -35,18 +54,16 @@ jobs:
with:
cache-on-failure: true
- uses: taiki-e/install-action@nextest
- if: "${{ matrix.type == 'book' }}"
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
cargo nextest run \
--locked --features "asm-keccak ${{ matrix.network }}" \
--workspace --exclude ef-tests \
${{ matrix.args }} --workspace --exclude ef-tests \
--partition hash:${{ matrix.partition }}/2 \
-E "!kind(test)"
- name: Run tests on book sources
run: |
cargo nextest run \
--manifest-path book/sources/Cargo.toml --workspace \
-E "!kind(test)"
state:
name: Ethereum state tests
Expand Down

0 comments on commit 456d507

Please sign in to comment.