Skip to content

Commit a25ec16

Browse files
committed
Speed up CI by installing foundry with Github action (#4505)
## Issue Addressed Speed up CI by installing foundry with Github action instead of building Anvil from source. Building anvil from source on GItHub hosted runners currently takes about 10 mins. Using the `foundry-toolchain` action to install only takes about 2 seconds.
1 parent f2223fe commit a25ec16

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/test-suite.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
5959
with:
6060
repo-token: ${{ secrets.GITHUB_TOKEN }}
61-
- name: Install anvil
62-
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
61+
- name: Install Foundry (anvil)
62+
uses: foundry-rs/foundry-toolchain@v1
6363
- name: Run tests in release
6464
run: make test-release
6565
release-tests-windows:
@@ -78,9 +78,8 @@ jobs:
7878
run: |
7979
choco install python protoc visualstudio2019-workload-vctools -y
8080
npm config set msvs_version 2019
81-
- name: Install anvil
82-
# Extra feature to work around https://github.com/foundry-rs/foundry/issues/5115
83-
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil --features ethers/ipc
81+
- name: Install Foundry (anvil)
82+
uses: foundry-rs/foundry-toolchain@v1
8483
- name: Install make
8584
run: choco install -y make
8685
- uses: KyleMayes/install-llvm-action@v1
@@ -141,8 +140,8 @@ jobs:
141140
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
142141
with:
143142
repo-token: ${{ secrets.GITHUB_TOKEN }}
144-
- name: Install anvil
145-
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
143+
- name: Install Foundry (anvil)
144+
uses: foundry-rs/foundry-toolchain@v1
146145
- name: Run tests in debug
147146
run: make test-debug
148147
state-transition-vectors-ubuntu:
@@ -197,8 +196,8 @@ jobs:
197196
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
198197
with:
199198
repo-token: ${{ secrets.GITHUB_TOKEN }}
200-
- name: Install anvil
201-
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
199+
- name: Install Foundry (anvil)
200+
uses: foundry-rs/foundry-toolchain@v1
202201
- name: Run the beacon chain sim that starts from an eth1 contract
203202
run: cargo run --release --bin simulator eth1-sim
204203
merge-transition-ubuntu:
@@ -213,8 +212,8 @@ jobs:
213212
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
214213
with:
215214
repo-token: ${{ secrets.GITHUB_TOKEN }}
216-
- name: Install anvil
217-
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
215+
- name: Install Foundry (anvil)
216+
uses: foundry-rs/foundry-toolchain@v1
218217
- name: Run the beacon chain sim and go through the merge transition
219218
run: cargo run --release --bin simulator eth1-sim --post-merge
220219
no-eth1-simulator-ubuntu:
@@ -243,8 +242,8 @@ jobs:
243242
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
244243
with:
245244
repo-token: ${{ secrets.GITHUB_TOKEN }}
246-
- name: Install anvil
247-
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
245+
- name: Install Foundry (anvil)
246+
uses: foundry-rs/foundry-toolchain@v1
248247
- name: Run the syncing simulator
249248
run: cargo run --release --bin simulator syncing-sim
250249
doppelganger-protection-test:

0 commit comments

Comments
 (0)