Skip to content

Commit

Permalink
Merge branch 'paradigmxyz:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dereksione committed Sep 20, 2023
2 parents 4a42537 + 6016da7 commit 02e3d08
Show file tree
Hide file tree
Showing 598 changed files with 52,668 additions and 17,599 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
!/dist

# include licenses
!LICENSE-*
!LICENSE-*

# include example files
!/examples
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/foundry-rs/reth/blob/main/CODE_OF_CONDUCT.md)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/paradigmxyz/reth/blob/main/CONTRIBUTING.md#code-of-conduct)
options:
- label: I agree to follow the Code of Conduct
required: true
30 changes: 8 additions & 22 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
on:
pull_request:
merge_group:
push:
branches: [main]

env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always

concurrency:
Expand All @@ -13,7 +14,8 @@ concurrency:
name: bench
jobs:
iai:
runs-on: ubuntu-latest
runs-on:
group: Reth
# Only run benchmarks in merge groups
if: github.event_name != 'pull_request'
steps:
Expand All @@ -31,7 +33,7 @@ jobs:

- name: Install Valgrind
run: |
sudo apt install valgrind
sudo apt update && sudo apt install valgrind
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -57,26 +59,10 @@ jobs:
run: |
./pr/.github/scripts/compare_iai.sh
# Checks that benchmarks not run in CI compile
bench-check:
name: check
runs-on: ubuntu-latest
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 bench --all --all-features --all-targets --no-run


bench-success:
if: always()
name: bench success
needs: bench-check
runs-on: ubuntu-latest
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) }}
# Note: This check is a dummy because we don't have any bench checks enabled.
- run: echo OK.
8 changes: 4 additions & 4 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
name: test

steps:
Expand All @@ -30,7 +30,7 @@ jobs:
run: mdbook test

lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
name: lint

steps:
Expand All @@ -48,7 +48,7 @@ jobs:
run: mdbook-linkcheck --standalone

build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
deploy:
# Only deploy if a push to main
if: github.ref_name == 'main' && github.event_name == 'push'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [test, lint, build]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
pull_request:
merge_group:
push:
branches: [main]

env:
RUSTFLAGS: -D warnings
Expand All @@ -14,7 +16,7 @@ name: ci
jobs:
lint:
name: code lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -26,21 +28,27 @@ jobs:
with:
cache-on-failure: true

- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features --benches --tests

- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check

- name: cargo clippy
uses: actions-rs/clippy-check@v1
uses: actions-rs/cargo@v1
with:
args: --all --all-features
token: ${{ secrets.GITHUB_TOKEN }}
command: clippy
args: --all --all-features --benches --tests

doc-lint:
name: doc lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install toolchain
Expand All @@ -51,7 +59,7 @@ jobs:

grafana-lint:
name: grafana lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Check dashboard JSON with jq
Expand All @@ -62,10 +70,10 @@ jobs:
lint-success:
if: always()
name: lint success
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [lint, doc-lint, grafana-lint]
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency: deny-${{ github.head_ref || github.run_id }}
jobs:
deny:
name: deny
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Automatically run `cargo update` periodically

name: Update Dependencies

on:
schedule:
# Run weekly
- cron: "0 0 * * SUN"
workflow_dispatch:
# Needed so we can run it manually

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: cargo-update
TITLE: "chore(deps): weekly `cargo update`"
BODY: |
Automation to keep dependencies in `Cargo.lock` current.
<details><summary><strong>cargo update log</strong></summary>
<p>
```log
$cargo_update_log
```
</p>
</details>
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly

- name: cargo update
# Remove first line that always just says "Updating crates.io index"
run: cargo update --color never 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log

- name: craft commit message and PR body
id: msg
run: |
export cargo_update_log="$(cat cargo_update.log)"
echo "commit_message<<EOF" >> $GITHUB_OUTPUT
printf "$TITLE\n\n$cargo_update_log\n" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$BODY" | envsubst >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
add-paths: ./Cargo.lock
commit-message: ${{ steps.msg.outputs.commit_message }}
title: ${{ env.TITLE }}
body: ${{ steps.msg.outputs.body }}
branch: ${{ env.BRANCH }}
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: docker

on:
workflow_dispatch: {}
push:
tags:
- v*

env:
REPO_NAME: ${{ github.repository_owner }}/reth
IMAGE_NAME: ${{ github.repository_owner }}/reth
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/reth
DOCKER_USERNAME: ${{ github.actor }}

jobs:
build:
name: build and push
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
on:
pull_request:
merge_group:
push:
branches: [main]

env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always

concurrency:
Expand All @@ -16,7 +17,8 @@ jobs:
# 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: ubuntu-latest
runs-on:
group: Reth
strategy:
matrix:
target:
Expand Down Expand Up @@ -62,12 +64,12 @@ jobs:
fuzz-success:
if: always()
name: fuzz success
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
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) }}
# jobs: ${{ toJSON(needs) }}
Loading

0 comments on commit 02e3d08

Please sign in to comment.