21
21
- name : Install foundry-zksync
22
22
run : |
23
23
mkdir ./foundry-zksync
24
- curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b /foundry_nightly_linux_amd64.tar.gz
24
+ curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-ae913af65381734ad46c044a9495b67310bc77c4 /foundry_nightly_linux_amd64.tar.gz
25
25
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
26
26
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
27
27
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
57
57
yarn build:foundry
58
58
59
59
- name : Create cache
60
- uses : actions/cache/save@v3
60
+ uses : actions/cache/save@v4
61
61
with :
62
62
key : artifacts-l1-${{ github.sha }}
63
63
path : |
@@ -149,7 +149,7 @@ jobs:
149
149
- name : Install foundry-zksync
150
150
run : |
151
151
mkdir ./foundry-zksync
152
- curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b /foundry_nightly_linux_amd64.tar.gz
152
+ curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-ae913af65381734ad46c044a9495b67310bc77c4 /foundry_nightly_linux_amd64.tar.gz
153
153
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
154
154
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
155
155
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
@@ -173,7 +173,12 @@ jobs:
173
173
174
174
- name : Run tests
175
175
working-directory : ./l1-contracts
176
- run : FOUNDRY_PROFILE=default yarn test:foundry
176
+ run : yarn test:foundry
177
+
178
+ # TODO: restore once we can get back to latest foundry
179
+ # - name: Check gas snapshots
180
+ # working-directory: ./l1-contracts
181
+ # run: forge test --match-test MeasureGas --gas-snapshot-check=true
177
182
178
183
test-foundry-zksync :
179
184
needs : [build, lint]
@@ -194,7 +199,7 @@ jobs:
194
199
- name : Install foundry-zksync
195
200
run : |
196
201
mkdir ./foundry-zksync
197
- curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b /foundry_nightly_linux_amd64.tar.gz
202
+ curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-ae913af65381734ad46c044a9495b67310bc77c4 /foundry_nightly_linux_amd64.tar.gz
198
203
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
199
204
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
200
205
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
@@ -221,7 +226,7 @@ jobs:
221
226
222
227
- name : Run tests
223
228
working-directory : ./l1-contracts
224
- run : FOUNDRY_PROFILE=default yarn test:zkfoundry
229
+ run : yarn test:zkfoundry
225
230
226
231
check-verifier-generator-l1 :
227
232
runs-on : ubuntu-latest
@@ -280,7 +285,6 @@ jobs:
280
285
run : diff tools/data/VerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol
281
286
282
287
coverage :
283
- if : false # FIXME: coverage disabled due to stack-too-deep in VerifierFflonk.sol
284
288
defaults :
285
289
run :
286
290
working-directory : l1-contracts
@@ -302,7 +306,7 @@ jobs:
302
306
- name : Install foundry-zksync
303
307
run : |
304
308
mkdir ./foundry-zksync
305
- curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b /foundry_nightly_linux_amd64.tar.gz
309
+ curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-ae913af65381734ad46c044a9495b67310bc77c4 /foundry_nightly_linux_amd64.tar.gz
306
310
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
307
311
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
308
312
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
@@ -325,7 +329,7 @@ jobs:
325
329
system-contracts/zkout
326
330
327
331
- name : Run coverage
328
- run : FOUNDRY_PROFILE=default yarn test:foundry && FOUNDRY_PROFILE=default yarn coverage:foundry --report summary --report lcov
332
+ run : yarn test:foundry && yarn coverage:foundry --report summary --report lcov
329
333
330
334
# Installing the specific version of `lcov` because of
331
335
# the `genhtml: ERROR: line ... of ... has branchcov but no linecov data` error.
@@ -336,15 +340,15 @@ jobs:
336
340
ref : v1.16
337
341
338
342
# To ignore coverage for certain directories modify the paths in this step as needed. The
339
- # below default ignores coverage results for the test and script directories. Alternatively,
340
- # to include coverage in all directories, comment out this step. Note that because this
341
- # filtering applies to the lcov file, the summary table generated in the previous step will
342
- # still include all files and directories.
343
- # The `--rc branch_coverage=1` part keeps branch info in the filtered report, since lcov
344
- # defaults to removing branch info.
343
+ # below default ignores coverage results for the test and script directories. It also ignores
344
+ # the ChainRegistrar contract since it is unused. Alternatively, to include coverage in all
345
+ # directories, comment out this step. Note that because this filtering applies to the lcov
346
+ # file, the summary table generated in the previous step will still include all files and
347
+ # directories. The `--rc branch_coverage=1` part keeps branch info in the filtered report,
348
+ # since lcov defaults to removing branch info.
345
349
- name : Filter directories
346
350
run : |
347
- lcov --ignore-errors unused --remove lcov.info 'test/*' 'contracts/dev-contracts/*' 'lib/*' '../lib/*' 'lib/' 'deploy-scripts/*' --output-file lcov.info --rc branch_coverage=1
351
+ lcov --ignore-errors unused --remove lcov.info 'test/*' 'contracts/dev-contracts/*' 'lib/*' '../lib/*' 'lib/' 'deploy-scripts/*' 'contracts/chain-registrar/ChainRegistrar.sol' --output-file lcov.info --rc branch_coverage=1
348
352
349
353
# This step posts a detailed coverage report as a comment and deletes previous comments on
350
354
# each push. The below step is used to fail coverage if the specified coverage threshold is
0 commit comments