Skip to content

Commit 22b6e35

Browse files
paulbalajiclaude
andauthored
chore(ci): pin Foundry version via .foundryrc (#7531)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1133c7a commit 22b6e35

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/actions/setup-foundry/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ description: 'Install Foundry and Soldeer dependencies'
44
runs:
55
using: 'composite'
66
steps:
7+
- name: Read Foundry version
8+
id: foundry-version
9+
shell: bash
10+
run: echo "version=$(cat solidity/.foundryrc)" >> $GITHUB_OUTPUT
11+
712
- name: Install Foundry
813
uses: foundry-rs/foundry-toolchain@v1
14+
with:
15+
version: ${{ steps.foundry-version.outputs.version }}
916

1017
- name: Install Soldeer dependencies
1118
shell: bash

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
88
&& yarn set version 4.5.1
99

1010
# Install Foundry for solidity builds (early for layer caching)
11+
COPY solidity/.foundryrc ./solidity/
1112
RUN curl -L https://foundry.paradigm.xyz | bash
12-
RUN /root/.foundry/bin/foundryup
13+
RUN /root/.foundry/bin/foundryup --install $(cat solidity/.foundryrc)
1314
ENV PATH="/root/.foundry/bin:${PATH}"
1415

1516
# Copy package.json and friends

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ Run the following to install `foundryup`:
4646
curl -L https://foundry.paradigm.xyz | bash
4747
```
4848

49-
Then run `foundryup` to install `forge`, `cast`, `anvil` and `chisel`.
49+
Then run `foundryup` with the pinned version to install `forge`, `cast`, `anvil` and `chisel`.
5050

5151
```bash
52-
foundryup
52+
foundryup --install $(cat solidity/.foundryrc)
5353
```
5454

5555
Check out the [Foundry Book](https://getfoundry.sh/introduction/installation/) for more information.

solidity/.foundryrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.5.0

0 commit comments

Comments
 (0)