Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release): update version #622

Merged
merged 20 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
40d019b
fix(release): fix release pipeline
0xfourzerofour Feb 24, 2024
b278e15
feat(release): change back to curl on local docker image
0xfourzerofour Feb 24, 2024
4da08ab
feat(release): change back to curl on local docker image
0xfourzerofour Feb 24, 2024
80e6e3a
feat(release): fixes
0xfourzerofour Feb 26, 2024
6085c9e
feat(release): fix if statement
0xfourzerofour Feb 28, 2024
8de70b6
feat(release): change release build
0xfourzerofour Feb 28, 2024
0df3c37
feat(release): remove install script
0xfourzerofour Feb 28, 2024
c3ca2b4
feat(release): get recursive dependencies
0xfourzerofour Feb 28, 2024
0848826
feat(release): add foundry
0xfourzerofour Feb 28, 2024
691cef6
feat(release): add protobuf for images not using cross builder
0xfourzerofour Feb 28, 2024
19983b0
feat(release): add protobuf for images not using cross builder
0xfourzerofour Feb 28, 2024
cd017c2
feat(release): add protobuf for images not using cross builder
0xfourzerofour Feb 28, 2024
f40af83
feat(release): add protobuf for images not using cross builder
0xfourzerofour Feb 28, 2024
401ae16
feat(release): make release sudo for solc install
0xfourzerofour Feb 28, 2024
d4170bb
feat(release): update gpg script
0xfourzerofour Feb 28, 2024
35dbc4e
feat(paymaster): remove java common chain utils
0xfourzerofour Feb 28, 2024
93d971a
feat(release): fix loop
0xfourzerofour Feb 28, 2024
65399a8
feat(version): change version back
0xfourzerofour Mar 4, 2024
5e6c534
feat(version): change version back
0xfourzerofour Mar 4, 2024
1286963
feat(version): update
0xfourzerofour Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
0xfourzerofour marked this conversation as resolved.
Show resolved Hide resolved
else
make docker-build-latest
sudo -E env "PATH=$PATH" make docker-build-latest
fi
87 changes: 40 additions & 47 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,52 +30,52 @@ jobs:

build:
name: build release
runs-on: ${{ matrix.os }}
needs: extract-version
strategy:
matrix:
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-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-20.04
profile: release
- arch: x86_64-unknown-linux-gnu
platform: ubuntu-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
profile: release
- arch: x86_64-apple-darwin
platform: macos-latest
- target: x86_64-apple-darwin
os: macos-latest
profile: release
- arch: aarch64-apple-darwin
platform: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
profile: release
- arch: x86_64-pc-windows-gnu
platform: ubuntu-latest
- target: x86_64-pc-windows-gnu
os: ubuntu-20.04
profile: release

runs-on: ${{ matrix.platform }}
needs: extract-version
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- name: Install target
run: rustup target add ${{ matrix.arch }}
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- uses: taiki-e/install-action@cross
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Foundry install
if: contains( ${{ matrix.target }}, 'apple')
uses: foundry-rs/foundry-toolchain@v1
- name: Install protobuf
if: contains( ${{ matrix.target }}, 'apple')
uses: arduino/setup-protoc@v3

# ==============================
# Apple Silicon SDK setup
# ==============================

- name: Apple Silicon setup
if: ${{ matrix.job.target == 'aarch64-apple-darwin' }}
if: matrix.target == 'aarch64-apple-darwin'
run: |
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV
Expand All @@ -84,22 +84,15 @@ jobs:
# Builds
# ==============================

- name: Build rundler for ${{ matrix.arch }}
- name: Build rundler for ${{ matrix.target }}
run: |
cargo install cross
env PROFILE=${{ matrix.profile }} make build-${{ matrix.arch }}
sudo -E env "PATH=$PATH" make build-${{ matrix.target }}

- name: Move cross-compiled binary
if: matrix.arch != 'x86_64-pc-windows-gnu'
run: |
mkdir artifacts
mv target/${{ matrix.arch }}/${{ matrix.profile }}/rundler ./artifacts

- name: Move cross-compiled binary (Windows)
if: matrix.arch == 'x86_64-pc-windows-gnu'
run: |
mkdir artifacts
mv target/${{ matrix.arch }}/${{ matrix.profile }}/rundler.exe ./artifacts
[[ "${{ matrix.target }}" == *windows* ]] && ext=".exe"
sudo mv "target/${{ matrix.target }}/${{ matrix.profile }}/rundler${ext}" ./artifacts

# ==============================
# Signing
Expand All @@ -111,10 +104,10 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
export GPG_TTY=$(tty)
echo -n "$GPG_SIGNING_KEY" | gpg --batch --import
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import
cd artifacts
tar -czf rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz rundler*
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
tar -czf rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz rundler*
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
mv *tar.gz* ..
shell: bash

Expand All @@ -125,14 +118,14 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz

- name: Upload signature
uses: actions/upload-artifact@v3
with:
name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc

draft-release:
name: draft release
Expand Down Expand Up @@ -220,7 +213,7 @@ jobs:
)
assets=()
for asset in ./rundler-*.tar.gz*; do
assets+=("-a" "$asset/$asset")
assets+=("$asset/$asset")
done
tag_name="${{ env.VERSION }}"
echo "$body" | gh release create --draft "${assets[@]}" -F "-" "$tag_name"
echo "$body" | gh release create --draft -t "Rundler $tag_name" -F "-" "$tag_name" "${assets[@]}"
102 changes: 0 additions & 102 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default-members = ["bin/rundler"]
resolver = "2"

[workspace.package]
version = "0.2.0-alpha.0"
version = "0.1.0-beta"
0xfourzerofour marked this conversation as resolved.
Show resolved Hide resolved
edition = "2021"
rust-version = "1.75"
license = "MIT OR Apache-2.0"
Expand Down
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"
28 changes: 16 additions & 12 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 ghcr.io/foundry-rs/foundry:nightly-ac802618e15039b31e464ae6d1fe3ee39f87cefd 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
Loading
Loading