mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
ci: chores (#5280)
This commit is contained in:
11
.github/SANITY_DEPS_ISSUE_TEMPLATE.md
vendored
11
.github/SANITY_DEPS_ISSUE_TEMPLATE.md
vendored
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
title: "bug: deps sanity check failed"
|
|
||||||
labels: P-high, C-bug, A-dependencies
|
|
||||||
---
|
|
||||||
|
|
||||||
Something broke our version constraints in a `Cargo.toml`.
|
|
||||||
|
|
||||||
Check the [dependencies sanity check]({{env.WORKFLOW_URL}}) workflow for details.
|
|
||||||
|
|
||||||
This issue was raised by the workflow at `.github/workflows/sanity.yml`
|
|
||||||
|
|
||||||
11
.github/scripts/compare_iai.sh
vendored
11
.github/scripts/compare_iai.sh
vendored
@ -1,6 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# This script should be run on the main branch, after running the iai benchmarks on the target branch.
|
# This script should be run on the main branch, after running the iai benchmarks on the target branch.
|
||||||
|
# If the main branch has a better iai performance, exits in error.
|
||||||
|
# It ignores L2 differences, since they seem hard to stabilize across runs.
|
||||||
|
|
||||||
# If the main branch has a better iai performance, exits in error. It ignores L2 differences, since they seem hard to stabilize across runs.
|
set -eo pipefail
|
||||||
cargo bench --package reth-db --bench iai --manifest-path pr/Cargo.toml | tee /dev/tty | awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
|
|
||||||
|
cargo bench --package reth-db --bench iai --manifest-path pr/Cargo.toml \
|
||||||
|
| tee /dev/tty \
|
||||||
|
| awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
|
||||||
|
|||||||
20
.github/scripts/fuzz.sh
vendored
20
.github/scripts/fuzz.sh
vendored
@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
# Runs fuzz tests using `cargo test-fuzz`.
|
|
||||||
|
|
||||||
PACKAGE=$1
|
|
||||||
TEST_TIME=${2:-5}
|
|
||||||
|
|
||||||
echo Building corpus.
|
|
||||||
cargo test -p $PACKAGE
|
|
||||||
|
|
||||||
# Gets the list of tests present in the package.
|
|
||||||
TESTS=$(cargo test-fuzz --list -p $PACKAGE | head -n -3 | tail -n+9 | cat - <(echo \"--list\"]) | cat - | jq -r ".[]")
|
|
||||||
|
|
||||||
for test in $TESTS
|
|
||||||
do
|
|
||||||
echo Running test: $test
|
|
||||||
set -x
|
|
||||||
cargo test-fuzz --no-ui --exact -p "$PACKAGE" $test -- -V $TEST_TIME
|
|
||||||
set +x
|
|
||||||
done;
|
|
||||||
23
.github/scripts/install_geth.sh
vendored
Executable file
23
.github/scripts/install_geth.sh
vendored
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Installs Geth (https://geth.ethereum.org) in $HOME/bin for x86_64 Linux.
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
GETH_BUILD=${GETH_BUILD:-"1.13.4-3f907d6a"}
|
||||||
|
|
||||||
|
name="geth-linux-amd64-$GETH_BUILD"
|
||||||
|
|
||||||
|
mkdir -p "$HOME/bin"
|
||||||
|
wget "https://gethstore.blob.core.windows.net/builds/$name.tar.gz"
|
||||||
|
tar -xvf "$name.tar.gz"
|
||||||
|
rm "$name.tar.gz"
|
||||||
|
mv "$name/geth" "$HOME/bin/geth"
|
||||||
|
rm -rf "$name"
|
||||||
|
chmod +x "$HOME/bin/geth"
|
||||||
|
|
||||||
|
# Add $HOME/bin to $PATH
|
||||||
|
[[ "$PATH" != *$HOME/bin* ]] && export PATH=$HOME/bin:$PATH
|
||||||
|
[ -n "$CI" ] && echo "$HOME/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
geth version
|
||||||
30
.github/workflows/bench.yml
vendored
30
.github/workflows/bench.yml
vendored
@ -1,3 +1,5 @@
|
|||||||
|
# Runs benchmarks.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
merge_group:
|
merge_group:
|
||||||
@ -20,49 +22,31 @@ jobs:
|
|||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main sources
|
- name: Checkout main sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
path: main
|
path: main
|
||||||
|
|
||||||
- name: Checkout PR sources
|
- name: Checkout PR sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
path: pr
|
path: pr
|
||||||
|
|
||||||
- name: Install Valgrind
|
- name: Install Valgrind
|
||||||
run: |
|
run: sudo apt update && sudo apt install valgrind
|
||||||
sudo apt update && sudo apt install valgrind
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Install toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: |
|
workspaces: |
|
||||||
main -> target
|
main -> target
|
||||||
pr -> target
|
pr -> target
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
|
||||||
- name: Generate test vectors
|
- name: Generate test vectors
|
||||||
run: |
|
run: |
|
||||||
cargo run --bin reth --manifest-path main/Cargo.toml -- test-vectors tables
|
cargo run --bin reth --manifest-path main/Cargo.toml -- test-vectors tables
|
||||||
cp -r testdata main
|
cp -r testdata main
|
||||||
mv testdata pr
|
mv testdata pr
|
||||||
|
|
||||||
- name: Set main baseline
|
- name: Set main baseline
|
||||||
run: cargo bench --package reth-db --bench iai --features test-utils --manifest-path main/Cargo.toml
|
run: cargo bench --package reth-db --bench iai --features test-utils --manifest-path main/Cargo.toml
|
||||||
|
|
||||||
- name: Compare PR benchmark
|
- name: Compare PR benchmark
|
||||||
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
|
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
|
||||||
run: |
|
run: pr/.github/scripts/compare_iai.sh
|
||||||
./pr/.github/scripts/compare_iai.sh
|
|
||||||
|
|
||||||
bench-success:
|
|
||||||
if: always()
|
|
||||||
name: bench success
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# Note: This check is a dummy because we don't have any bench checks enabled.
|
|
||||||
- run: echo OK.
|
|
||||||
|
|||||||
11
.github/workflows/book.yml
vendored
11
.github/workflows/book.yml
vendored
@ -1,4 +1,7 @@
|
|||||||
|
# Documentation and mdbook related jobs.
|
||||||
|
|
||||||
name: book
|
name: book
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
@ -13,7 +16,7 @@ jobs:
|
|||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install mdbook
|
- name: Install mdbook
|
||||||
run: |
|
run: |
|
||||||
@ -36,7 +39,7 @@ jobs:
|
|||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install mdbook-linkcheck
|
- name: Install mdbook-linkcheck
|
||||||
run: |
|
run: |
|
||||||
@ -53,10 +56,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
|
||||||
toolchain: nightly-2023-10-29
|
|
||||||
- name: Install mdbook
|
- name: Install mdbook
|
||||||
run: |
|
run: |
|
||||||
mkdir mdbook
|
mkdir mdbook
|
||||||
|
|||||||
5
.github/workflows/deny.yml
vendored
5
.github/workflows/deny.yml
vendored
@ -1,3 +1,5 @@
|
|||||||
|
# Runs `cargo-deny` when modifying `Cargo.lock`.
|
||||||
|
|
||||||
name: deny
|
name: deny
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -10,7 +12,6 @@ on:
|
|||||||
merge_group:
|
merge_group:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D warnings
|
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
concurrency: deny-${{ github.head_ref || github.run_id }}
|
concurrency: deny-${{ github.head_ref || github.run_id }}
|
||||||
@ -20,7 +21,7 @@ jobs:
|
|||||||
name: deny
|
name: deny
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: EmbarkStudios/cargo-deny-action@v1
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
||||||
with:
|
with:
|
||||||
command: check all
|
command: check all
|
||||||
|
|||||||
4
.github/workflows/dependencies.yml
vendored
4
.github/workflows/dependencies.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
# Automatically run `cargo update` periodically
|
# Runs `cargo update` periodically.
|
||||||
|
|
||||||
name: Update Dependencies
|
name: Update Dependencies
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
name: Update
|
name: Update
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
|
||||||
- name: cargo update
|
- name: cargo update
|
||||||
|
|||||||
16
.github/workflows/docker.yml
vendored
16
.github/workflows/docker.yml
vendored
@ -1,3 +1,5 @@
|
|||||||
|
# Publishes the Docker image.
|
||||||
|
|
||||||
name: docker
|
name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -21,24 +23,18 @@ jobs:
|
|||||||
packages: write
|
packages: write
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Get latest version of stable Rust
|
|
||||||
run: rustup update stable
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
- uses: taiki-e/install-action@cross
|
||||||
- name: Log in to Docker
|
- name: Log in to Docker
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin
|
||||||
|
|
||||||
- name: Set up Docker builder
|
- name: Set up Docker builder
|
||||||
run: |
|
run: |
|
||||||
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
|
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
|
||||||
docker buildx create --use --name cross-builder
|
docker buildx create --use --name cross-builder
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: |
|
run: make PROFILE=maxperf docker-build-latest
|
||||||
cargo install cross
|
|
||||||
env PROFILE=maxperf make docker-build-latest
|
|
||||||
|
|||||||
61
.github/workflows/fuzz.yml
vendored
61
.github/workflows/fuzz.yml
vendored
@ -1,61 +0,0 @@
|
|||||||
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: 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
|
|
||||||
runs-on:
|
|
||||||
group: Reth
|
|
||||||
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
|
|
||||||
- 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 cargo-afl
|
|
||||||
|
|
||||||
- name: Run fuzz tests
|
|
||||||
run: |
|
|
||||||
./.github/scripts/fuzz.sh ${{ matrix.target }}
|
|
||||||
env:
|
|
||||||
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
|
|
||||||
|
|
||||||
fuzz-success:
|
|
||||||
if: always()
|
|
||||||
name: fuzz success
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: all
|
|
||||||
steps:
|
|
||||||
# Note: This check is a dummy because we currently have fuzz tests disabled.
|
|
||||||
- run: echo OK.
|
|
||||||
#- name: Decide whether the needed jobs succeeded or failed
|
|
||||||
# uses: re-actors/alls-green@release/v1
|
|
||||||
# with:
|
|
||||||
# jobs: ${{ toJSON(needs) }}
|
|
||||||
48
.github/workflows/hive.yml
vendored
48
.github/workflows/hive.yml
vendored
@ -1,7 +1,11 @@
|
|||||||
|
# Runs `ethereum/hive` tests.
|
||||||
|
|
||||||
|
name: hive
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# every day
|
# every day
|
||||||
- cron: '0 0 * * *'
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@ -10,16 +14,13 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
name: hive
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on:
|
runs-on:
|
||||||
group: Reth
|
group: Reth
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
|
||||||
- run: mkdir artifacts
|
- run: mkdir artifacts
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Build and export reth image
|
- name: Build and export reth image
|
||||||
@ -33,7 +34,7 @@ jobs:
|
|||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Checkout hive tests
|
- name: Checkout hive tests
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ethereum/hive
|
repository: ethereum/hive
|
||||||
ref: master
|
ref: master
|
||||||
@ -41,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '^1.13.1'
|
go-version: "^1.13.1"
|
||||||
- run: go version
|
- run: go version
|
||||||
- name: Build hive tool
|
- name: Build hive tool
|
||||||
run: |
|
run: |
|
||||||
@ -55,7 +56,6 @@ jobs:
|
|||||||
name: artifacts
|
name: artifacts
|
||||||
path: ./artifacts
|
path: ./artifacts
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
continue-on-error: ${{ matrix.experimental }}
|
continue-on-error: ${{ matrix.experimental }}
|
||||||
strategy:
|
strategy:
|
||||||
@ -71,7 +71,17 @@ jobs:
|
|||||||
# we have excluded these tests because we do not support block
|
# we have excluded these tests because we do not support block
|
||||||
# announcements
|
# announcements
|
||||||
# exclude: [TestLargeAnnounce, TestBroadcast, TestBlockHashAnnounce]
|
# exclude: [TestLargeAnnounce, TestBroadcast, TestBlockHashAnnounce]
|
||||||
include: [TestStatus, TestGetBlockHeaders, TestSimultaneousRequests, TestSameRequestID, TestZeroRequestID, TestGetBlockBodies, TestMaliciousHandshake, TestMaliciousStatus, TestTransaction, TestMaliciousTx]
|
include:
|
||||||
|
- TestStatus
|
||||||
|
- TestGetBlockHeaders
|
||||||
|
- TestSimultaneousRequests
|
||||||
|
- TestSameRequestID
|
||||||
|
- TestZeroRequestID
|
||||||
|
- TestGetBlockBodies
|
||||||
|
- TestMaliciousHandshake
|
||||||
|
- TestMaliciousStatus
|
||||||
|
- TestTransaction
|
||||||
|
- TestMaliciousTx
|
||||||
experimental: true
|
experimental: true
|
||||||
- sim: ethereum/engine
|
- sim: ethereum/engine
|
||||||
limit: engine-exchange-capabilities
|
limit: engine-exchange-capabilities
|
||||||
@ -93,7 +103,23 @@ jobs:
|
|||||||
experimental: true
|
experimental: true
|
||||||
# eth_ rpc methods
|
# eth_ rpc methods
|
||||||
- sim: ethereum/rpc-compat
|
- sim: ethereum/rpc-compat
|
||||||
include: [eth_blockNumber, eth_call, eth_chainId, eth_createAccessList, eth_estimateGas, eth_feeHistory, eth_getBalance, eth_getBlockBy, eth_getBlockTransactionCountBy, eth_getCode, eth_getStorage, eth_getTransactionBy, eth_getTransactionCount, eth_getTransactionReceipt, eth_sendRawTransaction, eth_syncing]
|
include:
|
||||||
|
- eth_blockNumber
|
||||||
|
- eth_call
|
||||||
|
- eth_chainId
|
||||||
|
- eth_createAccessList
|
||||||
|
- eth_estimateGas
|
||||||
|
- eth_feeHistory
|
||||||
|
- eth_getBalance
|
||||||
|
- eth_getBlockBy
|
||||||
|
- eth_getBlockTransactionCountBy
|
||||||
|
- eth_getCode
|
||||||
|
- eth_getStorage
|
||||||
|
- eth_getTransactionBy
|
||||||
|
- eth_getTransactionCount
|
||||||
|
- eth_getTransactionReceipt
|
||||||
|
- eth_sendRawTransaction
|
||||||
|
- eth_syncing
|
||||||
experimental: true
|
experimental: true
|
||||||
# not running eth_getProof tests because we do not support
|
# not running eth_getProof tests because we do not support
|
||||||
# eth_getProof yet
|
# eth_getProof yet
|
||||||
@ -175,7 +201,7 @@ jobs:
|
|||||||
chmod +x /usr/local/bin/hive
|
chmod +x /usr/local/bin/hive
|
||||||
|
|
||||||
- name: Checkout hive tests
|
- name: Checkout hive tests
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ethereum/hive
|
repository: ethereum/hive
|
||||||
ref: master
|
ref: master
|
||||||
|
|||||||
60
.github/workflows/integration.yml
vendored
60
.github/workflows/integration.yml
vendored
@ -1,3 +1,7 @@
|
|||||||
|
# Runs integration tests.
|
||||||
|
|
||||||
|
name: integration
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
merge_group:
|
merge_group:
|
||||||
@ -6,17 +10,15 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
GETH_BUILD: 1.13.4-3f907d6a
|
|
||||||
SEED: rustethereumethereumrust
|
SEED: rustethereumethereumrust
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
name: integration
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
|
name: test (${{ matrix.partition }}/${{ strategy.job-total }})
|
||||||
runs-on:
|
runs-on:
|
||||||
group: Reth
|
group: Reth
|
||||||
strategy:
|
strategy:
|
||||||
@ -24,29 +26,14 @@ jobs:
|
|||||||
partition: [1, 2]
|
partition: [1, 2]
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install toolchain
|
- name: Install Geth
|
||||||
uses: dtolnay/rust-toolchain@stable
|
run: .github/scripts/install_geth.sh
|
||||||
|
- uses: taiki-e/install-action@nextest
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
|
||||||
- name: Install geth
|
|
||||||
run: |
|
|
||||||
mkdir -p "$HOME/bin"
|
|
||||||
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz
|
|
||||||
tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz
|
|
||||||
rm geth-linux-amd64-$GETH_BUILD.tar.gz
|
|
||||||
mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth
|
|
||||||
chmod u+x "$HOME/bin/geth"
|
|
||||||
export PATH=$HOME/bin:$PATH
|
|
||||||
echo $HOME/bin >> $GITHUB_PATH
|
|
||||||
geth version
|
|
||||||
|
|
||||||
- name: Install latest nextest release
|
|
||||||
uses: taiki-e/install-action@nextest
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cargo nextest run \
|
cargo nextest run \
|
||||||
@ -64,39 +51,30 @@ jobs:
|
|||||||
RUST_LOG: info,sync=error
|
RUST_LOG: info,sync=error
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Install toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
- name: Run sync
|
||||||
- name: Run sync (${{ matrix.profile }})
|
|
||||||
run: |
|
run: |
|
||||||
cargo run --profile release --features jemalloc,min-error-logs \
|
cargo run --profile release --features jemalloc,min-error-logs \
|
||||||
--bin reth -- node \
|
--bin reth -- node \
|
||||||
--debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 \
|
--debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 \
|
||||||
--debug.max-block 100000 \
|
--debug.max-block 100000 \
|
||||||
--debug.terminate
|
--debug.terminate
|
||||||
|
|
||||||
- name: Verify the target block hash
|
- name: Verify the target block hash
|
||||||
run: |
|
run: |
|
||||||
cargo run --profile release \
|
cargo run --profile release -- \
|
||||||
db get CanonicalHeaders 100000 | grep 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4
|
db get CanonicalHeaders 100000 \
|
||||||
|
| grep 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4
|
||||||
|
|
||||||
integration-success:
|
integration-success:
|
||||||
if: always()
|
|
||||||
name: integration success
|
name: integration success
|
||||||
runs-on:
|
runs-on: ubuntu-latest
|
||||||
group: Reth
|
if: always()
|
||||||
needs: [test]
|
needs: [test]
|
||||||
timeout-minutes: 60
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Decide whether the needed jobs succeeded or failed
|
- name: Decide whether the needed jobs succeeded or failed
|
||||||
uses: re-actors/alls-green@release/v1
|
uses: re-actors/alls-green@release/v1
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
name: lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
merge_group:
|
merge_group:
|
||||||
@ -7,14 +9,13 @@ on:
|
|||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
name: ci
|
|
||||||
jobs:
|
jobs:
|
||||||
clippy:
|
clippy:
|
||||||
name: clippy
|
name: clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@clippy
|
- uses: dtolnay/rust-toolchain@clippy
|
||||||
with:
|
with:
|
||||||
toolchain: nightly-2023-10-29
|
toolchain: nightly-2023-10-29
|
||||||
@ -30,10 +31,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
|
||||||
toolchain: nightly-2023-10-29
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
@ -50,29 +49,27 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
with:
|
||||||
toolchain: nightly-2023-10-29
|
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
- run: cargo fmt --all --check
|
- run: cargo fmt --all --check
|
||||||
|
|
||||||
grafana-lint:
|
grafana:
|
||||||
name: grafana lint
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Check dashboard JSON with jq
|
- name: Check dashboard JSON with jq
|
||||||
uses: sergeysova/jq-action@v2
|
uses: sergeysova/jq-action@v2
|
||||||
with:
|
with:
|
||||||
cmd: jq empty etc/grafana/dashboards/overview.json
|
cmd: jq empty etc/grafana/dashboards/overview.json
|
||||||
|
|
||||||
lint-success:
|
lint-success:
|
||||||
if: always()
|
|
||||||
name: lint success
|
name: lint success
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [clippy, docs, fmt, grafana-lint]
|
if: always()
|
||||||
|
needs: [clippy, docs, fmt, grafana]
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Decide whether the needed jobs succeeded or failed
|
- name: Decide whether the needed jobs succeeded or failed
|
||||||
116
.github/workflows/release.yml
vendored
116
.github/workflows/release.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
# This workflow is borrowed from Lighthouse: https://github.com/sigp/lighthouse/blob/693886b94176faa4cb450f024696cb69cda2fe58/.github/workflows/release.yml
|
# This workflow is modified from Lighthouse:
|
||||||
|
# https://github.com/sigp/lighthouse/blob/441fc1691b69f9edc4bbdc6665f3efab16265c9b/.github/workflows/release.yml
|
||||||
|
|
||||||
name: release
|
name: release
|
||||||
|
|
||||||
@ -25,80 +26,49 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
name: build release
|
name: build release
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: extract-version
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch:
|
|
||||||
[
|
|
||||||
aarch64-unknown-linux-gnu,
|
|
||||||
x86_64-unknown-linux-gnu,
|
|
||||||
x86_64-apple-darwin,
|
|
||||||
aarch64-apple-darwin,
|
|
||||||
x86_64-pc-windows-gnu,
|
|
||||||
]
|
|
||||||
include:
|
include:
|
||||||
- arch: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
platform: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
profile: maxperf
|
profile: maxperf
|
||||||
- arch: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
platform: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
profile: maxperf
|
profile: maxperf
|
||||||
- arch: x86_64-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
platform: macos-latest
|
os: macos-latest
|
||||||
profile: maxperf
|
profile: maxperf
|
||||||
- arch: aarch64-apple-darwin
|
- target: aarch64-apple-darwin
|
||||||
platform: macos-latest
|
os: macos-latest
|
||||||
profile: maxperf
|
profile: maxperf
|
||||||
- arch: x86_64-pc-windows-gnu
|
- target: x86_64-pc-windows-gnu
|
||||||
platform: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
profile: maxperf
|
profile: maxperf
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
needs: extract-version
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Get latest version of stable Rust
|
with:
|
||||||
run: rustup update stable
|
target: ${{ matrix.target }}
|
||||||
- name: Install target
|
- uses: taiki-e/install-action@cross
|
||||||
run: rustup target add ${{ matrix.arch }}
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
|
||||||
# ==============================
|
|
||||||
# Apple M1 SDK setup
|
|
||||||
# ==============================
|
|
||||||
|
|
||||||
- name: Apple M1 setup
|
- name: Apple M1 setup
|
||||||
if: ${{ matrix.job.target == 'aarch64-apple-darwin' }}
|
if: matrix.target == 'aarch64-apple-darwin'
|
||||||
run: |
|
run: |
|
||||||
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
|
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
|
||||||
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV
|
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-os-version)" >> $GITHUB_ENV
|
||||||
|
|
||||||
# ==============================
|
- name: Build Reth
|
||||||
# Builds
|
run: make PROFILE=${{ matrix.profile }} build-${{ matrix.target }}
|
||||||
# ==============================
|
- name: Move binary
|
||||||
|
|
||||||
- name: Build reth for ${{ matrix.arch }}
|
|
||||||
run: |
|
|
||||||
cargo install cross
|
|
||||||
env PROFILE=${{ matrix.profile }} make build-${{ matrix.arch }}
|
|
||||||
|
|
||||||
- name: Move cross-compiled binary
|
|
||||||
if: matrix.arch != 'x86_64-pc-windows-gnu'
|
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
mv target/${{ matrix.arch }}/${{ matrix.profile }}/reth ./artifacts
|
[[ "${{ matrix.target }}" == *windows* ]] && ext=".exe"
|
||||||
|
mv "target/${{ matrix.target }}/${{ matrix.profile }}/reth${ext}" ./artifacts
|
||||||
- name: Move cross-compiled binary (Windows)
|
|
||||||
if: matrix.arch == 'x86_64-pc-windows-gnu'
|
|
||||||
run: |
|
|
||||||
mkdir artifacts
|
|
||||||
mv target/${{ matrix.arch }}/${{ matrix.profile }}/reth.exe ./artifacts
|
|
||||||
|
|
||||||
# ==============================
|
|
||||||
# Signing
|
|
||||||
# ==============================
|
|
||||||
|
|
||||||
- name: Configure GPG and create artifacts
|
- name: Configure GPG and create artifacts
|
||||||
env:
|
env:
|
||||||
@ -108,26 +78,22 @@ jobs:
|
|||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import
|
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import
|
||||||
cd artifacts
|
cd artifacts
|
||||||
tar -czf reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz reth*
|
tar -czf reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz reth*
|
||||||
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
|
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||||
mv *tar.gz* ..
|
mv *tar.gz* ..
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# =======================================================================
|
|
||||||
# Upload artifacts
|
|
||||||
# This is required to share artifacts between different jobs
|
|
||||||
# =======================================================================
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
|
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||||
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
|
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||||
|
|
||||||
- name: Upload signature
|
- name: Upload signature
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
|
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
|
||||||
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
|
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
|
||||||
|
|
||||||
draft-release:
|
draft-release:
|
||||||
name: draft release
|
name: draft release
|
||||||
@ -139,35 +105,25 @@ jobs:
|
|||||||
# Required to post the release
|
# Required to post the release
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
# This is necessary for generating the changelog. It has to come before "Download Artifacts" or else it deletes the artifacts.
|
# This is necessary for generating the changelog.
|
||||||
- name: Checkout sources
|
# It has to come before "Download Artifacts" or else it deletes the artifacts.
|
||||||
uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# ==============================
|
|
||||||
# Download artifacts
|
|
||||||
# ==============================
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|
||||||
# ==============================
|
|
||||||
# Create release draft
|
|
||||||
# ==============================
|
|
||||||
- name: Generate full changelog
|
- name: Generate full changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
|
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
|
||||||
echo "$(git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 ${{ env.VERSION }}^)..${{ env.VERSION }})" >> $GITHUB_OUTPUT
|
echo "$(git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 ${{ env.VERSION }}^)..${{ env.VERSION }})" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create release draft
|
- name: Create release draft
|
||||||
env:
|
env:
|
||||||
GITHUB_USER: ${{ github.repository_owner }}
|
GITHUB_USER: ${{ github.repository_owner }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# The formatting here is borrowed from Lighthouse (which is borrowed from OpenEthereum):
|
# The formatting here is borrowed from Lighthouse (which is borrowed from OpenEthereum):
|
||||||
# https://github.com/openethereum/openethereum/blob/main/.github/workflows/build.yml
|
# https://github.com/openethereum/openethereum/blob/6c2d392d867b058ff867c4373e40850ca3f96969/.github/workflows/build.yml
|
||||||
run: |
|
run: |
|
||||||
body=$(cat <<- "ENDBODY"
|
body=$(cat <<- "ENDBODY"
|
||||||
<Release Name>
|
<Release Name>
|
||||||
|
|||||||
79
.github/workflows/sanity.yml
vendored
79
.github/workflows/sanity.yml
vendored
@ -1,88 +1,31 @@
|
|||||||
# Runs a series of sanity checks for crate consumers.
|
# Runs a series of sanity checks for crate consumers.
|
||||||
#
|
|
||||||
# Currently the only check is that the version constraints in each `Cargo.toml` do not lead to a breaking dependency.
|
name: sanity
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
# Once per day at 00:00 UTC
|
# Once per day at 00:00 UTC
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D warnings
|
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
GETH_BUILD: 1.13.4-3f907d6a
|
|
||||||
|
|
||||||
name: sanity
|
|
||||||
jobs:
|
jobs:
|
||||||
dep-version-constraints:
|
unused-dependencies:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: dep version constraints test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
partition: [1, 2, 3]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
- name: Install toolchain
|
- uses: taiki-e/install-action@cargo-udeps
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
cache-on-failure: true
|
|
||||||
|
|
||||||
- name: Install geth
|
|
||||||
run: |
|
|
||||||
mkdir -p "$HOME/bin"
|
|
||||||
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz
|
|
||||||
tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz
|
|
||||||
rm geth-linux-amd64-$GETH_BUILD.tar.gz
|
|
||||||
mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth
|
|
||||||
chmod u+x "$HOME/bin/geth"
|
|
||||||
export PATH=$HOME/bin:$PATH
|
|
||||||
echo $HOME/bin >> $GITHUB_PATH
|
|
||||||
geth version
|
|
||||||
|
|
||||||
- name: Install latest nextest release
|
|
||||||
uses: taiki-e/install-action@nextest
|
|
||||||
|
|
||||||
- name: Update packages
|
|
||||||
run: cargo update
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
cargo nextest run --locked --workspace --all-features \
|
|
||||||
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
|
|
||||||
-E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
|
|
||||||
|
|
||||||
- uses: JasonEtco/create-an-issue@v2
|
|
||||||
if: ${{ failure() }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
||||||
with:
|
|
||||||
update_existing: true
|
|
||||||
filename: .github/SANITY_DEPS_ISSUE_TEMPLATE.md
|
|
||||||
|
|
||||||
unused-deps:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: unused dependencies
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Install toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
|
||||||
|
|
||||||
- name: Install cargo-udeps
|
|
||||||
run: cargo install cargo-udeps --locked
|
|
||||||
|
|
||||||
- name: Check for unused dependencies
|
- name: Check for unused dependencies
|
||||||
run: cargo +nightly udeps --all-features --all-targets
|
run: cargo udeps --all-features --all-targets
|
||||||
|
|
||||||
- uses: JasonEtco/create-an-issue@v2
|
- uses: JasonEtco/create-an-issue@v2
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
WORKFLOW_URL:
|
||||||
|
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
with:
|
with:
|
||||||
update_existing: true
|
update_existing: true
|
||||||
filename: .github/SANITY_UNUSED_DEPS_ISSUE_TEMPLATE.md
|
filename: .github/SANITY_UNUSED_DEPS_ISSUE_TEMPLATE.md
|
||||||
|
|
||||||
|
|||||||
3
.github/workflows/stale.yml
vendored
3
.github/workflows/stale.yml
vendored
@ -1,4 +1,7 @@
|
|||||||
|
# Marks issues as stale.
|
||||||
|
|
||||||
name: stale issues
|
name: stale issues
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
71
.github/workflows/unit.yml
vendored
71
.github/workflows/unit.yml
vendored
@ -1,3 +1,7 @@
|
|||||||
|
# Runs unit tests.
|
||||||
|
|
||||||
|
name: unit
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
merge_group:
|
merge_group:
|
||||||
@ -12,88 +16,71 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
name: unit
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
|
name: tests (${{ matrix.partition }}/${{ strategy.job-total }})
|
||||||
runs-on:
|
runs-on:
|
||||||
group: Reth
|
group: Reth
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
partition: [1, 2]
|
partition: [1, 2]
|
||||||
timeout-minutes: 60
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
- uses: taiki-e/install-action@nextest
|
||||||
- name: Install latest nextest release
|
|
||||||
uses: taiki-e/install-action@nextest
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cargo nextest run \
|
cargo nextest run \
|
||||||
--locked --all-features --workspace --exclude examples --exclude ef-tests \
|
--locked --all-features --workspace --exclude examples --exclude ef-tests \
|
||||||
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
|
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
|
||||||
-E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
|
-E "kind(lib) | kind(bin) | kind(proc-macro)"
|
||||||
|
|
||||||
eth-blockchain:
|
state:
|
||||||
name: ethereum / state tests (stable)
|
name: Ethereum state tests
|
||||||
runs-on:
|
runs-on:
|
||||||
group: Reth
|
group: Reth
|
||||||
env:
|
env:
|
||||||
RUST_LOG: info,sync=error
|
RUST_LOG: info,sync=error
|
||||||
timeout-minutes: 60
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Checkout ethereum/tests
|
- name: Checkout ethereum/tests
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ethereum/tests
|
repository: ethereum/tests
|
||||||
path: testing/ef-tests/ethereum-tests
|
path: testing/ef-tests/ethereum-tests
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install toolchain
|
- uses: taiki-e/install-action@nextest
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
- name: Install latest nextest release
|
- run: cargo nextest run --release -p ef-tests --features ef-tests
|
||||||
uses: taiki-e/install-action@nextest
|
|
||||||
|
|
||||||
- name: Run Ethereum tests
|
doc:
|
||||||
run: cargo nextest run --release -p ef-tests --features ef-tests
|
name: doc tests
|
||||||
|
|
||||||
doc-test:
|
|
||||||
name: rustdoc
|
|
||||||
runs-on:
|
runs-on:
|
||||||
group: Reth
|
group: Reth
|
||||||
timeout-minutes: 60
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install toolchain
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: Run doctests
|
with:
|
||||||
run: cargo test --doc --all --all-features
|
cache-on-failure: true
|
||||||
|
- run: cargo test --doc --workspace --all-features
|
||||||
|
|
||||||
unit-success:
|
unit-success:
|
||||||
if: always()
|
|
||||||
name: unit success
|
name: unit success
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test, eth-blockchain, doc-test]
|
if: always()
|
||||||
timeout-minutes: 60
|
needs: [test, state, doc]
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Decide whether the needed jobs succeeded or failed
|
- name: Decide whether the needed jobs succeeded or failed
|
||||||
uses: re-actors/alls-green@release/v1
|
uses: re-actors/alls-green@release/v1
|
||||||
|
|||||||
Reference in New Issue
Block a user