Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

chore: Fix tests with all feature flags enabled #415

chore: Fix tests with all feature flags enabled

chore: Fix tests with all feature flags enabled #415

Workflow file for this run

on:
pull_request:
merge_group:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: bench
jobs:
iai:
runs-on:
group: Reth
# Only run benchmarks in merge groups
if: github.event_name != 'pull_request'
steps:
- name: Checkout main sources
uses: actions/checkout@v3
with:
ref: main
path: main
- name: Checkout PR sources
uses: actions/checkout@v3
with:
clean: false
path: pr
- name: Install Valgrind
run: |
sudo apt install valgrind
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
main -> target
pr -> target
cache-on-failure: true
- name: Generate test vectors
run: |
cargo run --bin reth --manifest-path main/Cargo.toml -- test-vectors tables
cp -r testdata main
mv testdata pr
- name: Set main baseline
run: cargo bench --package reth-db --bench iai --manifest-path main/Cargo.toml
- name: Compare PR benchmark
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
run: |
./pr/.github/scripts/compare_iai.sh
# Checks that benchmarks not run in CI compile
bench-check:
name: check
runs-on:
group: Reth
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Check if benchmarks build
run: cargo check --workspace --benches --all-features
bench-success:
if: always()
name: bench success
needs: bench-check
runs-on: ubuntu-20.04
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}