From 4db0edd72f3ad650f156e43682fff0a36aac62ca Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Wed, 3 Jul 2024 23:00:23 +0200 Subject: [PATCH] ci(hive): build `reth` externally (#9281) --- .github/assets/hive/Dockerfile | 8 ++++++++ .github/workflows/hive.yml | 14 ++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .github/assets/hive/Dockerfile diff --git a/.github/assets/hive/Dockerfile b/.github/assets/hive/Dockerfile new file mode 100644 index 000000000..9f75ba6f1 --- /dev/null +++ b/.github/assets/hive/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu + +COPY dist/reth /usr/local/bin + +COPY LICENSE-* ./ + +EXPOSE 30303 30303/udp 9001 8545 8546 +ENTRYPOINT ["/usr/local/bin/reth"] \ No newline at end of file diff --git a/.github/workflows/hive.yml b/.github/workflows/hive.yml index 3340393d0..421e4b2f5 100644 --- a/.github/workflows/hive.yml +++ b/.github/workflows/hive.yml @@ -23,17 +23,23 @@ jobs: group: Reth steps: - uses: actions/checkout@v4 - - run: mkdir artifacts + - run: mkdir artifacts + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: Build reth + run: | + cargo build --features asm-keccak --profile hivetests --bin reth --locked + mkdir dist && cp ./target/hivetests/reth ./dist/reth - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and export reth image uses: docker/build-push-action@v6 with: context: . + file: .github/assets/hive/Dockerfile tags: ghcr.io/paradigmxyz/reth:latest - build-args: | - BUILD_PROFILE=hivetests - FEATURES=asm-keccak outputs: type=docker,dest=./artifacts/reth_image.tar cache-from: type=gha cache-to: type=gha,mode=max