Skip to content

Commit

Permalink
Speed up CI by installing foundry with Github action (#4505)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
jimmygchen committed Jul 17, 2023
1 parent f2223fe commit a25ec16
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1
- name: Run tests in release
run: make test-release
release-tests-windows:
Expand All @@ -78,9 +78,8 @@ jobs:
run: |
choco install python protoc visualstudio2019-workload-vctools -y
npm config set msvs_version 2019
- name: Install anvil
# Extra feature to work around https://github.com/foundry-rs/foundry/issues/5115
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil --features ethers/ipc
- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1
- name: Install make
run: choco install -y make
- uses: KyleMayes/install-llvm-action@v1
Expand Down Expand Up @@ -141,8 +140,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1
- name: Run tests in debug
run: make test-debug
state-transition-vectors-ubuntu:
Expand Down Expand Up @@ -197,8 +196,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1
- name: Run the beacon chain sim that starts from an eth1 contract
run: cargo run --release --bin simulator eth1-sim
merge-transition-ubuntu:
Expand All @@ -213,8 +212,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1
- name: Run the beacon chain sim and go through the merge transition
run: cargo run --release --bin simulator eth1-sim --post-merge
no-eth1-simulator-ubuntu:
Expand Down Expand Up @@ -243,8 +242,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1
- name: Run the syncing simulator
run: cargo run --release --bin simulator syncing-sim
doppelganger-protection-test:
Expand Down

0 comments on commit a25ec16

Please sign in to comment.