Skip to content
39 changes: 15 additions & 24 deletions .github/workflows/tag_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
platform:
- ubuntu-22.04
- ubuntu-24.04-arm
- ubuntu-22.04-arm
- macos-latest
stack:
- l1
Expand All @@ -33,13 +33,14 @@ jobs:
os: linux
arch: x86_64
cpu_flags: RUSTFLAGS='-C target-cpu=x86-64-v2'
- platform: ubuntu-24.04-arm
- platform: ubuntu-22.04-arm
os: linux
arch: aarch64
- platform: macos-latest
os: macos
arch: aarch64
- platform: macos-latest
os: macos
stack: l2
features: l2,l2-sql
- platform: ubuntu-22.04
Expand All @@ -48,10 +49,10 @@ jobs:
- platform: ubuntu-22.04
stack: l2_gpu
features: l2,l2-sql,sp1,risc0,gpu
- platform: ubuntu-24.04-arm
- platform: ubuntu-22.04-arm
stack: l2
features: l2,l2-sql,sp1
- platform: ubuntu-24.04-arm
- platform: ubuntu-22.04-arm
stack: l2_gpu
features: l2,l2-sql,sp1,gpu
- stack: l2_gpu
Expand Down Expand Up @@ -83,9 +84,8 @@ jobs:
run: |
curl -L https://sp1up.succinct.xyz | bash
~/.sp1/bin/sp1up --version 5.0.8

- name: Set up QEMU (only Linux ARM)
if: ${{ matrix.platform == 'ubuntu-24.04-arm' }}
if: ${{ matrix.platform == 'ubuntu-22.04-arm' }}
uses: docker/setup-qemu-action@v3
with:
platforms: amd64
Expand All @@ -99,7 +99,6 @@ jobs:
~/.risc0/bin/rzup install cargo-risczero 3.0.3
~/.risc0/bin/rzup install risc0-groth16
~/.risc0/bin/rzup install rust

- name: Install CUDA (only Linux x86 GPU)
uses: Jimver/[email protected]
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }}
Expand All @@ -109,37 +108,33 @@ jobs:
method: "network"
sub-packages: '["nvcc"]'

- name: Install solc
if: ${{ matrix.platform != 'ubuntu-24.04-arm' }}
uses: lambdaclass/get-solc@master
with:
version: v0.8.29
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install solc (Linux ARM)
if: ${{ matrix.platform == 'ubuntu-24.04-arm' }}
- name: Install solc
run: |
sudo curl -L -o /usr/local/bin/solc https://github.com/nikitastupin/solc/raw/refs/heads/main/linux/aarch64/solc-v0.8.29
sudo chmod +x /usr/local/bin/solc
if [[ "${{ matrix.os }}" == "linux" ]]; then
sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v0.8.29/solc-static-linux
sudo chmod +x /usr/local/bin/solc
elif [[ "${{ matrix.os }}" == "macos" ]]; then
sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v0.8.29/solc-macos
sudo chmod +x /usr/local/bin/solc
fi
solc --version
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested here: https://github.com/samoht9277/ethrex/actions/runs/18925460915

This works because ARM builds depend on docker/setup-qemu-action for the SP1 dependency to work.

We can take advantage of this by using the amd64 version of the binary on Linux (which is also compiled statically) for the ARM version as well.


- name: Build ethrex
run: |
COMPILE_CONTRACTS=true ${{ matrix.cpu_flags }} ${{ matrix.gpu_flags }} cargo build --release --features "${{ matrix.features }}" --bin ethrex
chmod +x target/release/ethrex
mv target/release/ethrex ethrex${{ matrix.l2_suffix }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.gpu_suffix }}

- name: Copy verification keys
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }} # Run only once
run: |
mkdir -p ./verification_keys
mv crates/l2/prover/src/guest_program/src/risc0/out/riscv32im-risc0-vk verification_keys/ethrex-riscv32im-risc0-vk
mv crates/l2/prover/src/guest_program/src/sp1/out/riscv32im-succinct-zkvm-vk verification_keys/ethrex-riscv32im-succinct-zkvm-vk

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -171,7 +166,6 @@ jobs:
run: |
cd crates/l2/contracts/src/
tar -czvf ../../../../ethrex-contracts.tar.gz .

- name: Upload contracts artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -196,7 +190,6 @@ jobs:
- name: Format name
run: |
echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV

# Pushes to ghcr.io/lambdaclass/ethrex
- name: Build and push L1 Docker image
id: push_l1
Expand Down Expand Up @@ -246,7 +239,6 @@ jobs:
common_parent=$(git merge-base ${{ github.ref_name }} $last_tag)
echo "PREVIOUS_TAG: $common_parent"
echo "PREVIOUS_TAG=$common_parent" >> $GITHUB_ENV

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
Expand All @@ -268,5 +260,4 @@ jobs:
name: "ethrex: ${{ github.ref_name }}"
body: >
Installation and running instructions can be found in [our docs](https://docs.ethrex.xyz/)

${{ steps.changelog.outputs.changes }}
Loading