-
Notifications
You must be signed in to change notification settings - Fork 10
290 lines (249 loc) · 8.43 KB
/
ci.yml
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
INFURA_API_KEY: '${{ secrets.INFURA_API_KEY }}'
USER_PRIVATE_KEY: '${{ secrets.USER_PRIVATE_KEY }}'
ETHERSCAN_API_KEY: '${{ secrets.ETHERSCAN_API_KEY }}'
ETHEREUM_MAINNET_RPC: https://eth.llamarpc.com
jobs:
Linter:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run yarn format check
run: nix develop -c yarn format:check
Build_All:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build all
run: nix develop -c yarn check:build
# EOS_Relayer_Test:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Use local my-action
# uses: ./.github/actions/setup
# with:
# cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# - name: Run Verifier in EOS - Relayer test
# run: nix develop -c yarn test './tests/eosLightClient/test-verifier-in-EOS-relay.ts'
Solidity_Validators_Accumulator_Test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name:
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Solidity Validators accumulator tests
run: nix develop -c make test-validator-accumulator
# Nim_Light_Client_Compiled_with_Emsctipten_Tests:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Use local my-action
# uses: ./.github/actions/setup
# with:
# cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
#
# - name: Run Nim Light Client compiled with emsctipten tests
# run: nix develop -c yarn test-emcc './tests/test-nim-to-wasm.ts' 'test-nim-light-client.ts'
Nim_Light_Client_Clang_Test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Nim Light Client compiled with clang tests
run: nix develop -c yarn test './tests/test-nim-to-wasm.ts' 'test-nim-light-client.ts'
Nim_Groth16_Verifier_Tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Nim groth16 verifier tests
run: nix develop -c make test-groth16-verifier
# Disable temporary till we find way to have docker in local setup
# Run_Light_Client_In_Cosmos_Test:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Use local my-action
# uses: ./.github/actions/setup
# with:
# cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# - name: Run Light Client in Cosmos test
# run: nix develop -c yarn test './tests/cosmosLightClient/test-nim-light-client-in-cosmos.ts'
# Run_Verifier_In_Cosmos_Test:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Use local my-action
# uses: ./.github/actions/setup
# with:
# cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# - name: Run Verifier in Cosmos test
# run: nix develop -c yarn test './tests/cosmosLightClient/test-verifier-in-cosmos.ts'
# Run_Verifier_In_Cosmos_Relay_Tests:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Use local my-action
# uses: ./.github/actions/setup
# with:
# cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# - name: Run Verifier in Cosmos - Relayer test
# run: nix develop -c yarn test './tests/cosmosLightClient/test-verifier-in-cosmos-relay.ts'
Run_Circom_Tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run circom tests
run: nix develop -c make test-circom-circuits
Run_Plonky2_Tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run plonky2 circuit tests
run: nix develop -c make test-plonky2-circuits
Run_Verify_Given_Proof:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Verify given proof - test using bncurve and constantine
run: nix develop -c nim c -r 'tests/verify_proof/verify_given_proof_test.nim'
Run_Verify_Given_Proof_ffJS:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Verify given proof - test using ffJavascript
run: nix develop -c yarn test ./tests/verify_proof/verify_given_proof_test.ts
Solidity_Verifier_Tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run Solidity verifier tests
run: nix develop -c make evm-simulation
OneShot_Syncing_Simulation:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run one shot syncing simulation
run: nix develop -c make one-shot-syncing-simulation
Bash_Scripts_Building_Circom_Circuits:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Use local my-action
uses: ./.github/actions/setup
with:
cachix_auth_token: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run one of the scripts building the circom circuits
run: nix develop -c ./scripts/build-circom-compress-circuits.sh
check:
if: always()
needs:
- Linter
# - EOS_Relayer_Test
- Solidity_Validators_Accumulator_Test
# - Nim_Light_Client_Compiled_with_Emsctipten_Tests
- Nim_Light_Client_Clang_Test
- Nim_Groth16_Verifier_Tests
# - Run_Light_Client_In_Cosmos_Test
# - Run_Verifier_In_Cosmos_Test
- Run_Circom_Tests
# - Run_Verifier_In_Cosmos_Relay_Tests
- Run_Verify_Given_Proof
- Run_Verify_Given_Proof_ffJS
- Solidity_Verifier_Tests
- OneShot_Syncing_Simulation
- Run_Plonky2_Tests
runs-on: self-hosted
steps:
- name: Check if any job failed or was cancelled
if: >-
${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
- name: Success
if: >-
${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
run: echo "All dependent jobs succeeded!"