-
Notifications
You must be signed in to change notification settings - Fork 11
144 lines (122 loc) · 4.38 KB
/
Copy pathintegration-test.yml
File metadata and controls
144 lines (122 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Integration test
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
jobs:
test_zkvm_execution:
name: ${{ matrix.stateless_validator }} on ${{ matrix.zkvm }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stateless_validator:
- ethrex
- reth
zkvm:
- openvm
- sp1
- zisk
include:
- { zkvm: zisk, external: true, stateless_validator: zesu }
- { zkvm: zisk, stateless_validator: ethrex, ere_profile: ethrex }
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Free up disk space
if: matrix.zkvm == 'zisk'
run: bash .github/scripts/free-up-disk-space.sh
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla/sccache-action@v0.0.9
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache bin target
if: matrix.external != true
uses: actions/cache@v4
with:
path: bin/stateless-validator-${{ matrix.stateless_validator }}/${{ matrix.zkvm }}/target
key: ${{ format('{0}-bin-{1}-{2}-{3}', runner.os, matrix.stateless_validator, matrix.zkvm, hashFiles(format('bin/stateless-validator-{0}/{1}/Cargo.lock', matrix.stateless_validator, matrix.zkvm))) }}
restore-keys: |
${{ runner.os }}-bin-${{ matrix.stateless_validator }}-${{ matrix.zkvm }}-
- name: Set rayon threads
if: matrix.threads != ''
env:
RAYON_NUM_THREADS: ${{ matrix.threads }}
run: echo "RAYON_NUM_THREADS=$RAYON_NUM_THREADS" >> "$GITHUB_ENV"
- name: Enable Ere profile
if: matrix.ere_profile != ''
env:
ERE_PROFILE: ${{ matrix.ere_profile }}
run: echo "ERE_PROFILE=$ERE_PROFILE" >> "$GITHUB_ENV"
- name: Test zkVM execution
env:
RUST_LOG: info,ere_server=error
ERE_IMAGE_REGISTRY: ghcr.io/eth-act/ere
run: |
cargo test --release --package stateless-validator-test --test zkvm_execution -- ${{ matrix.stateless_validator }}_${{ matrix.zkvm }} --test-threads=1
- name: Chown
if: matrix.external != true
run: |
sudo chown -R $(id -u):$(id -g) bin/stateless-validator-${{ matrix.stateless_validator }}/${{ matrix.zkvm }}/target || true
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats
test_host_execution:
name: ${{ matrix.stateless_validator }} on host
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stateless_validator:
- ethrex
- reth
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla/sccache-action@v0.0.9
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Test host execution
env:
RUST_LOG: info
CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS: true
run: |
cargo test --release --package stateless-validator-${{ matrix.stateless_validator }} --features host --test host_execution -- --test-threads=1
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats