Skip to content

Commit 82a893d

Browse files
ci: use zksync-foundry v0.1.5 (matter-labs#1959)
# What ❔ * [x] Unify zksync-foundry installation in CI * [x] Use latest stable version `v0.1.5` <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ To remove old version of foundry and simplify CI and fix a bug with MacOS and Linux hash mismatches. <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated.
1 parent 67affae commit 82a893d

File tree

9 files changed

+786
-812
lines changed

9 files changed

+786
-812
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Install zksync-foundry"
2+
3+
description: "Installs zksync-foundry with specified version."
4+
5+
inputs:
6+
version:
7+
type: string
8+
description: "Version of zksync-foundry to install."
9+
required: false
10+
default: "v0.1.5"
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Install zksync-foundry
16+
shell: "bash -ex {0}"
17+
env:
18+
ZKSYNC_FOUNDRY_URL: "https://github.com/matter-labs/foundry-zksync/releases/download"
19+
VERSION: "${{ inputs.version }}"
20+
INSTALL_DIR: "foundry-zksync"
21+
run: |
22+
mkdir "${INSTALL_DIR}"
23+
curl -LO ${ZKSYNC_FOUNDRY_URL}/foundry-zksync-${VERSION}/foundry_zksync_${VERSION}_linux_amd64.tar.gz
24+
tar zxf foundry_zksync_${VERSION}_linux_amd64.tar.gz -C ./${INSTALL_DIR}
25+
chmod +x ./${INSTALL_DIR}/forge ./${INSTALL_DIR}/cast
26+
echo "${PWD}/${INSTALL_DIR}" >> "${GITHUB_PATH}"
27+
./${INSTALL_DIR}/forge --version
28+
./${INSTALL_DIR}/cast --version
29+
echo "Installed zksync-foundry version: ${VERSION}"

.github/workflows/build-release.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ jobs:
3535
submodules: recursive
3636

3737
- name: Install foundry-zksync
38-
run: |
39-
mkdir ./foundry-zksync
40-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
41-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
42-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
43-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
38+
uses: ./.github/actions/install-zksync-foundry
4439

4540
- name: Use Node.js
4641
uses: actions/setup-node@v3

.github/workflows/l1-contracts-ci.yaml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ jobs:
1919
submodules: recursive
2020

2121
- name: Install foundry-zksync
22-
run: |
23-
mkdir ./foundry-zksync
24-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
25-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
26-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
27-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
22+
uses: ./.github/actions/install-zksync-foundry
2823

2924
- name: Use Node.js
3025
uses: actions/setup-node@v3
@@ -184,12 +179,7 @@ jobs:
184179
l1-contracts/zkout
185180
186181
- name: Install foundry-zksync
187-
run: |
188-
mkdir ./foundry-zksync
189-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
190-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
191-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
192-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
182+
uses: ./.github/actions/install-zksync-foundry
193183

194184
- name: Check selectors
195185
run: yarn l1 selectors --check
@@ -211,12 +201,7 @@ jobs:
211201
cache: yarn
212202

213203
- name: Install foundry-zksync
214-
run: |
215-
mkdir ./foundry-zksync
216-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
217-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
218-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
219-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
204+
uses: ./.github/actions/install-zksync-foundry
220205

221206
- name: Install dependencies
222207
run: yarn
@@ -266,12 +251,7 @@ jobs:
266251
cache: yarn
267252

268253
- name: Install foundry-zksync
269-
run: |
270-
mkdir ./foundry-zksync
271-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
272-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
273-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
274-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
254+
uses: ./.github/actions/install-zksync-foundry
275255

276256
- name: Install dependencies
277257
run: yarn
@@ -355,12 +335,7 @@ jobs:
355335
cache: yarn
356336

357337
- name: Install foundry-zksync
358-
run: |
359-
mkdir ./foundry-zksync
360-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
361-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
362-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
363-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
338+
uses: ./.github/actions/install-zksync-foundry
364339

365340
- name: Install dependencies
366341
run: yarn

.github/workflows/l1-contracts-foundry-ci.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ jobs:
1717
submodules: true
1818

1919
- name: Install foundry-zksync
20-
run: |
21-
mkdir ./foundry-zksync
22-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
23-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
24-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
25-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
20+
uses: ./.github/actions/install-zksync-foundry
2621

2722
- name: Use Node.js
2823
uses: actions/setup-node@v4

.github/workflows/l2-contracts-ci.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ jobs:
1414
submodules: recursive
1515

1616
- name: Install foundry-zksync
17-
run: |
18-
mkdir ./foundry-zksync
19-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
20-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
21-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
22-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
17+
uses: ./.github/actions/install-zksync-foundry
2318

2419
- name: Use Node.js
2520
uses: actions/setup-node@v3

.github/workflows/slither.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ jobs:
2828
python-version: 3.8
2929

3030
- name: Install foundry-zksync
31-
run: |
32-
mkdir ./foundry-zksync
33-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
34-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
35-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
36-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
31+
uses: ./.github/actions/install-zksync-foundry
3732

3833
- name: Install Slither
3934
run: |

.github/workflows/system-contracts-ci.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ jobs:
1414
submodules: recursive
1515

1616
- name: Install foundry-zksync
17-
run: |
18-
mkdir ./foundry-zksync
19-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
20-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
21-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
22-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
17+
uses: ./.github/actions/install-zksync-foundry
2318

2419
- name: Use Node.js
2520
uses: actions/setup-node@v3
@@ -178,12 +173,7 @@ jobs:
178173
run: yarn
179174

180175
- name: Install foundry-zksync
181-
run: |
182-
mkdir ./foundry-zksync
183-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
184-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
185-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
186-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
176+
uses: ./.github/actions/install-zksync-foundry
187177

188178
- name: Run tests using foundry
189179
run: yarn sc test:foundry

0 commit comments

Comments
 (0)