forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: split ci workflow (paradigmxyz#1345)
- Loading branch information
Showing
14 changed files
with
343 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
CARGO_TERM_COLOR: always | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
name: bench | ||
jobs: | ||
iai: | ||
# Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete | ||
# See also <https://github.com/foundry-rs/foundry/issues/3827> | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install Valgrind | ||
run: | | ||
sudo apt install valgrind | ||
- name: Checkout PR sources | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Generate test vectors | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: --bin reth -- test-vectors tables | ||
|
||
- name: Set main baseline | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: bench | ||
args: --package reth-db --bench iai | ||
|
||
- name: Checkout main sources | ||
uses: actions/checkout@v3 | ||
with: | ||
clean: false | ||
|
||
- name: Compare PR benchmark | ||
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available | ||
run: | | ||
./.github/scripts/compare_iai.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
CARGO_TERM_COLOR: always | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
name: fuzz | ||
jobs: | ||
all: | ||
# Skip the Fuzzing Jobs until we make them run fast and reliably. Currently they will | ||
# always recompile the codebase for each test and that takes way too long. | ||
if: false | ||
|
||
# Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete | ||
# See also <https://github.com/foundry-rs/foundry/issues/3827> | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
target: | ||
- reth-primitives | ||
- reth-db | ||
- reth-eth-wire | ||
- reth-codecs | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Install fuzzer | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-test-fuzz afl | ||
- name: Force install cargo-afl | ||
run: | | ||
cargo install --force afl | ||
cargo afl --version | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Run fuzz tests | ||
run: | | ||
./.github/scripts/fuzz.sh ${{ matrix.target }} | ||
env: | ||
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1 | ||
- name: Upload coverage data to codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
flags: fuzz-tests |
Oops, something went wrong.