Skip to content

Commit

Permalink
fix(release): fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfourzerofour committed Feb 24, 2024
1 parent 899794e commit 193eeea
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
toolchain: 1.71.0
toolchain: 1.75.0

- name: Install toolchain (nightly)
run: rustup toolchain add nightly --component rustfmt --profile minimal
Expand All @@ -40,6 +40,8 @@ jobs:
with:
cache-on-failure: true

- uses: taiki-e/install-action@cross

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -53,10 +55,8 @@ jobs:
- name: Build and push image
run: |
cargo install cross --git https://github.com/cross-rs/cross
if [ -n "${{ github.event.inputs.version }}" ]; then
make GIT_TAG="${{ github.event.inputs.version }}" docker-build
sudo -E env "PATH=$PATH" make GIT_TAG="${{ github.event.inputs.version }}" docker-build
else
make docker-build-latest
sudo -E env "PATH=$PATH" make docker-build-latest
fi
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cross.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build]
dockerfile = "Dockerfile.build"
dockerfile = "./Dockerfile.build"
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Adapted from https://github.com/paradigmxyz/reth/blob/main/Dockerfile
# syntax=docker/dockerfile:1.4

FROM ghcr.io/foundry-rs/foundry:latest as foundry

FROM --platform=$TARGETPLATFORM rust:1.75.0 AS chef-builder

# Install system dependencies
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
SHELL ["/bin/bash", "-c"]
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn rsync

SHELL ["/bin/bash", "-c"]
RUN curl -L https://foundry.paradigm.xyz | bash
ENV PATH="/root/.foundry/bin:${PATH}"
RUN foundryup
RUN apt-get update && apt-get -y upgrade && apt-get install -y protobuf-compiler nodejs yarn rsync

RUN cargo install cargo-chef --locked

Expand Down
26 changes: 15 additions & 11 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
ARG CROSS_BASE_IMAGE
# Dockerfile.forge

FROM ghcr.io/foundry-rs/foundry:latest as foundry

FROM $CROSS_BASE_IMAGE
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge

ARG DEBIAN_FRONTEND=noninteractive
# Install Node.js 14.x and Yarn
RUN apt-get update \
&& apt-get install -y curl \
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \
&& apt-get clean

RUN apt-get update && apt-get install -y unzip

# Install Protobuf compiler v3
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip \
&& unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local \
&& chmod +x /usr/local/bin/protoc

RUN apt-get update && apt-get install -y gnupg2 apt-transport-https ca-certificates software-properties-common
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn
RUN add-apt-repository ppa:ethereum/ethereum
RUN apt-get update
RUN apt-get install -y solc
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ submodule-update: ## Update git submodules
git submodule update

build-%:
cross build --bin rundler --target $* --profile "$(PROFILE)"
cross build --target $* --profile "$(PROFILE)"

.PHONY: fmt
fmt: ## format code with nightly rust
Expand Down Expand Up @@ -71,6 +71,6 @@ define build_docker_image
--platform linux/arm64,linux/amd64 \
--tag $(DOCKER_IMAGE_NAME):$(1) \
$(if $(2),--tag $(DOCKER_IMAGE_NAME):$(2)) \
--provenance=false
--provenance=false --push
endef

2 changes: 2 additions & 0 deletions bin/rundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ tracing.workspace = true
tracing-appender = "0.2.2"
tracing-log = "0.2.0"
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "fmt", "json"] }
openssl = { version = "0.10", features = ["vendored"] }

0 comments on commit 193eeea

Please sign in to comment.