-
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.
- Loading branch information
Showing
2 changed files
with
94 additions
and
1 deletion.
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,93 @@ | ||
# Taken form upstream reth | ||
# https://github.com/paradigmxyz/reth/blob/3212af2d85a54eb207661361ac9fe1d7de4b5b8e/.github/workflows/docker.yml | ||
|
||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
REPO_NAME: ${{ github.repository_owner }}/fraxtal-op-reth | ||
IMAGE_NAME: ${{ github.repository_owner }}/fraxtal-op-reth | ||
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/fraxtal-op-reth | ||
CARGO_TERM_COLOR: always | ||
DOCKER_USERNAME: ${{ github.actor }} | ||
|
||
jobs: | ||
build-x86: | ||
name: Build x86 binary | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- uses: taiki-e/install-action@cross | ||
- name: Set up Docker builder | ||
run: | | ||
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64 | ||
docker buildx create --use --name cross-builder | ||
- name: Build | ||
run: make PROFILE=maxperf build-x86_64-unknown-linux-gnu | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: fraxtal-op-reth-x86 | ||
path: target/x86_64-unknown-linux-gnu/maxperf/fraxtal-op-reth | ||
retention-days: 1 | ||
build-arm: | ||
name: Build arm binary | ||
runs-on: ubuntu-24.04-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- uses: taiki-e/install-action@cross | ||
- name: Set up Docker builder | ||
run: | | ||
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64 | ||
docker buildx create --use --name cross-builder | ||
- name: Build | ||
run: make PROFILE=maxperf build-aarch64-unknown-linux-gnu | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: fraxtal-op-reth-arm | ||
path: target/aarch64-unknown-linux-gnu/maxperf/fraxtal-op-reth | ||
retention-days: 1 | ||
|
||
build: | ||
name: build and push | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Log in to Docker | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin | ||
- name: Create artifacts dirs | ||
run: mkdir -p dist/bin/{build-x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu} | ||
- name: Download x86 artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: fraxtal-op-reth-x86 | ||
path: dist/bin/build-x86_64-unknown-linux-gnu/fraxtal-op-reth | ||
- name: Download arm artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: fraxtal-op-reth-arm | ||
path: dist/bin/build-arm_64-unknown-linux-gnu/fraxtal-op-reth | ||
- name: Build and push fraxtal-op-reth nightly image | ||
run: | | ||
docker buildx build --file ./Dockerfile.cross . \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--tag latest-nightly \ | ||
--provenance=false \ | ||
--push |
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