Skip to content

Commit

Permalink
ci: minor fixes (#4831)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Sep 28, 2023
1 parent ec25f49 commit 8e9937b
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
bench-success:
if: always()
name: bench success
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
# Note: This check is a dummy because we don't have any bench checks enabled.
- run: echo OK.
- run: echo OK.
10 changes: 6 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-20.04
runs-on: ubuntu-latest
name: test
timeout-minutes: 60

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

lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: lint
timeout-minutes: 60

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

build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
Expand All @@ -69,6 +69,8 @@ jobs:
echo $(pwd)/mdbook-template >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Build book
run: mdbook build
Expand Down Expand Up @@ -111,7 +113,7 @@ jobs:
deploy:
# Only deploy if a push to main
if: github.ref_name == 'main' && github.event_name == 'push'
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [test, lint, build]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -D warnings
Expand All @@ -29,6 +31,8 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo docs --document-private-items
env:
# Keep in sync with ./book.yml:jobs.build
Expand Down
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-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
fuzz-success:
if: always()
name: fuzz success
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: all
steps:
# Note: This check is a dummy because we currently have fuzz tests disabled.
Expand Down
99 changes: 52 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,42 @@ env:
jobs:
extract-version:
name: extract version
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Extract version
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
id: extract_version
outputs:
VERSION: ${{ steps.extract_version.outputs.VERSION }}

build:
name: build release
strategy:
matrix:
arch: [aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
x86_64-apple-darwin,
aarch64-apple-darwin,
x86_64-pc-windows-gnu]
arch:
[
aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
x86_64-apple-darwin,
aarch64-apple-darwin,
x86_64-pc-windows-gnu,
]
include:
- arch: aarch64-unknown-linux-gnu
platform: ubuntu-20.04
profile: maxperf
- arch: x86_64-unknown-linux-gnu
platform: ubuntu-20.04
profile: maxperf
- arch: x86_64-apple-darwin
platform: macos-latest
profile: maxperf
- arch: aarch64-apple-darwin
platform: macos-latest
profile: maxperf
- arch: x86_64-pc-windows-gnu
platform: ubuntu-20.04
profile: maxperf
- arch: aarch64-unknown-linux-gnu
platform: ubuntu-20.04
profile: maxperf
- arch: x86_64-unknown-linux-gnu
platform: ubuntu-20.04
profile: maxperf
- arch: x86_64-apple-darwin
platform: macos-latest
profile: maxperf
- arch: aarch64-apple-darwin
platform: macos-latest
profile: maxperf
- arch: x86_64-pc-windows-gnu
platform: ubuntu-20.04
profile: maxperf

runs-on: ${{ matrix.platform }}
needs: extract-version
Expand Down Expand Up @@ -76,18 +80,18 @@ jobs:
# ==============================

- name: Build reth for ${{ matrix.arch }}
run: |
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'
if: matrix.arch != 'x86_64-pc-windows-gnu'
run: |
mkdir artifacts
mv target/${{ matrix.arch }}/${{ matrix.profile }}/reth ./artifacts
- name: Move cross-compiled binary (Windows)
if: matrix.arch == 'x86_64-pc-windows-gnu'
if: matrix.arch == 'x86_64-pc-windows-gnu'
run: |
mkdir artifacts
mv target/${{ matrix.arch }}/${{ matrix.profile }}/reth.exe ./artifacts
Expand All @@ -113,8 +117,8 @@ jobs:
# Upload artifacts
# This is required to share artifacts between different jobs
# =======================================================================
- name: Upload artifact
uses: actions/upload-artifact@v3
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
Expand All @@ -127,10 +131,10 @@ jobs:

draft-release:
name: draft release
needs: [build, extract-version]
runs-on: ubuntu-20.04
needs: [build, extract-version]
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.extract-version.outputs.VERSION }}
VERSION: ${{ needs.extract-version.outputs.VERSION }}
permissions:
# Required to post the release
contents: write
Expand Down Expand Up @@ -162,54 +166,55 @@ jobs:
GITHUB_USER: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# The formatting here is borrowed from Lighthouse (which is borrowed from OpenEthereum): https://github.com/openethereum/openethereum/blob/main/.github/workflows/build.yml
# The formatting here is borrowed from Lighthouse (which is borrowed from OpenEthereum):
# https://github.com/openethereum/openethereum/blob/main/.github/workflows/build.yml
run: |
body=$(cat <<- "ENDBODY"
<Release Name>
## Testing Checklist (DELETE ME)
- [ ] Run on testnet for 1-3 days.
- [ ] Resync a mainnet node.
- [ ] Ensure all CI checks pass.
## Release Checklist (DELETE ME)
- [ ] Ensure all crates have had their versions bumped.
- [ ] Write the summary.
- [ ] Fill out the update priority.
- [ ] Ensure all binaries have been added.
- [ ] Prepare release posts (Twitter, ...).
## Summary
Add a summary, including:
- Critical bug fixes
- New features
- Any breaking changes (and what to expect)
## Update Priority
This table provides priorities for which classes of users should update particular components.
| User Class | Priority |
|----------------------|-----------------|
| Payload Builders | <TODO> |
| Non-Payload Builders | <TODO> |
*See [Update Priorities](https://paradigmxyz.github.io/reth/installation/priorities.html) for more information about this table.*
## All Changes
${{ steps.changelog.outputs.CHANGELOG }}
## Binaries
[See pre-built binaries documentation.](https://paradigmxyz.github.io/reth/installation/binaries.html)
The binaries are signed with the PGP key: `A3AE 097C 8909 3A12 4049 DF1F 5391 A3C4 1005 30B4`
| System | Architecture | Binary | PGP Signature |
|:---:|:---:|:---:|:---|
| <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | x86_64 | [reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
name: sanity
jobs:
dep-version-constraints:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: dep version constraints test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
strategy:
matrix:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
filename: .github/SANITY_DEPS_ISSUE_TEMPLATE.md

unused-deps:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: unused dependencies
steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
close-issues:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
repository: ethereum/tests
path: testing/ef-tests/ethereum-tests
submodules: recursive
depth: 1
fetch-depth: 1

- name: Install toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
unit-success:
if: always()
name: unit success
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [test, eth-blockchain, doc-test]
timeout-minutes: 60
steps:
Expand Down

0 comments on commit 8e9937b

Please sign in to comment.