Skip to content

Commit 589a1a5

Browse files
committed
Update release workflow
1 parent 8dee125 commit 589a1a5

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

.github/workflows/tag_release.yaml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,41 @@ jobs:
2222
- ubuntu-22.04
2323
- ubuntu-24.04-arm
2424
- macos-latest
25-
gpu:
26-
- true
27-
- false
25+
stack:
26+
- l1
27+
- l2
28+
- l2_gpu
29+
exclude:
30+
- platform: macos-latest
31+
stack: l2_gpu
2832
include:
2933
- platform: ubuntu-22.04
3034
os: linux
3135
arch: x86_64
32-
prover_features: sp1,risc0
3336
cpu_flags: RUSTFLAGS='-C target-cpu=x86-64-v2'
3437
- platform: ubuntu-24.04-arm
3538
os: linux
3639
arch: aarch64
37-
prover_features: sp1
3840
- platform: macos-latest
3941
os: macos
4042
arch: aarch64
41-
- gpu: true
43+
- platform: ubuntu-22.04
44+
stack: l2
45+
features: sp1,risc0
46+
- platform: ubuntu-22.04
47+
stack: l2_gpu
48+
features: sp1,risc0,gpu
49+
- platform: ubuntu-24.04-arm
50+
stack: l2
51+
features: sp1
52+
- platform: ubuntu-24.04-arm
53+
stack: l2_gpu
54+
features: sp1,gpu
55+
- stack: l2_gpu
4256
gpu_flags: NVCC_PREPEND_FLAGS='-arch=sm_70'
43-
gpu_feature: ",gpu"
44-
gpu_suffix: "-gpu"
45-
exclude:
46-
- platform: macos-latest
47-
gpu: true
57+
suffix: "-l2-gpu"
58+
- stack: l2
59+
suffix: "-l2"
4860
runs-on: ${{ matrix.platform }}
4961
steps:
5062
- name: Free Disk Space (Ubuntu)
@@ -57,10 +69,8 @@ jobs:
5769
- name: Checkout code
5870
uses: actions/checkout@v4
5971

60-
- name: Rustup toolchain install
61-
uses: dtolnay/rust-toolchain@master
62-
with:
63-
toolchain: ${{ vars.RUST_VERSION }}
72+
- name: Setup Rust Environment
73+
uses: ./.github/actions/setup-rust
6474

6575
- name: Install SP1 (only Linux)
6676
if: ${{ matrix.os == 'linux' }}
@@ -89,7 +99,7 @@ jobs:
8999
90100
- name: Install CUDA (only Linux x86 GPU)
91101
uses: Jimver/[email protected]
92-
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }}
102+
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }}
93103
id: cuda-toolkit
94104
with:
95105
cuda: "12.9.0"
@@ -116,11 +126,12 @@ jobs:
116126
117127
- name: Build ethrex
118128
run: |
119-
COMPILE_CONTRACTS=true ${{ matrix.cpu_flags }} ${{ matrix.gpu_flags }} cargo build --release --features "${{ matrix.prover_features }}${{ matrix.gpu_feature }}" --bin ethrex
120-
mv target/release/ethrex ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
129+
COMPILE_CONTRACTS=true ${{ matrix.cpu_flags }} ${{ matrix.gpu_flags }} cargo build --release --features "${{ matrix.features }}" --bin ethrex
130+
chmod +x target/release/ethrex
131+
mv target/release/ethrex ethrex-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix }}
121132
122133
- name: Copy verification keys
123-
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }} # Run only once
134+
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }} # Run only once
124135
run: |
125136
mkdir -p ./verification_keys
126137
mv crates/l2/prover/src/guest_program/src/risc0/out/riscv32im-risc0-vk verification_keys/ethrex-riscv32im-risc0-vk
@@ -129,11 +140,11 @@ jobs:
129140
- name: Upload artifact
130141
uses: actions/upload-artifact@v4
131142
with:
132-
name: ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
133-
path: ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
143+
name: ethrex-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix }}
144+
path: ethrex-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix }}
134145

135146
- name: Upload verification keys
136-
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }} # Run only once
147+
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }} # Run only once
137148
uses: actions/upload-artifact@v4
138149
with:
139150
name: verification_keys

0 commit comments

Comments
 (0)