Skip to content

Commit 87c2cf6

Browse files
authored
ci(foundry): add forge build cache + 45min timeout (#123)
Foundry CI on main has been dying with exit 143 (SIGTERM) at the 'Run Forge build' step around 17min — symptoms consistent with the runner OOM-killing solc on a 220-file via-IR build. Adds an actions/cache@v4 step pinned to foundry.toml + soldeer.lock + src/test/script/dependencies hashes, restoring incremental forge build state across runs. Also pins a 45min timeout so we get a clear timeout signal instead of a generic SIGTERM if a future build genuinely runs over. If this still OOMs after the cache lands, next step is to switch to a larger runner (ubuntu-latest-l) once that's enabled for the org.
1 parent 9286c27 commit 87c2cf6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/foundry.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323

2424
name: Foundry project
2525
runs-on: ubuntu-latest
26+
timeout-minutes: 45
2627
outputs:
2728
foundry_changed: ${{ steps.changes.outputs.foundry_changed }}
2829
steps:
@@ -31,6 +32,17 @@ jobs:
3132
fetch-depth: 0
3233
submodules: recursive
3334

35+
- name: Cache Foundry build artifacts
36+
if: steps.changes.outputs.foundry_changed != 'false'
37+
uses: actions/cache@v4
38+
with:
39+
path: |
40+
cache
41+
out
42+
key: foundry-${{ runner.os }}-${{ hashFiles('foundry.toml', 'soldeer.lock', 'remappings.txt', 'src/**', 'test/**', 'script/**', 'dependencies/**') }}
43+
restore-keys: |
44+
foundry-${{ runner.os }}-
45+
3446
- name: Detect Foundry-relevant changes
3547
id: changes
3648
run: |

0 commit comments

Comments
 (0)