|
47 | 47 | with:
|
48 | 48 | submodules: recursive
|
49 | 49 |
|
| 50 | + # Restore Forge cache |
| 51 | + - name: Cache Forge Build |
| 52 | + uses: actions/cache@v3 |
| 53 | + with: |
| 54 | + path: | |
| 55 | + cache/ |
| 56 | + out/ |
| 57 | + key: ${{ runner.os }}-forge-${{ hashFiles('**/foundry.toml', '**/remappings.txt', 'src/**/*.sol', 'lib/**/*.sol') }} |
| 58 | + restore-keys: | |
| 59 | + ${{ runner.os }}-forge- |
| 60 | +
|
50 | 61 | # Install the Foundry toolchain.
|
51 | 62 | - name: Install Foundry
|
52 | 63 | uses: foundry-rs/foundry-toolchain@v1
|
@@ -93,6 +104,17 @@ jobs:
|
93 | 104 | with:
|
94 | 105 | submodules: recursive
|
95 | 106 |
|
| 107 | + # Restore Forge cache |
| 108 | + - name: Cache Forge Build |
| 109 | + uses: actions/cache@v3 |
| 110 | + with: |
| 111 | + path: | |
| 112 | + cache/ |
| 113 | + out/ |
| 114 | + key: ${{ runner.os }}-forge-${{ hashFiles('**/foundry.toml', '**/remappings.txt', 'src/**/*.sol', 'lib/**/*.sol') }} |
| 115 | + restore-keys: | |
| 116 | + ${{ runner.os }}-forge- |
| 117 | +
|
96 | 118 | # Install the Foundry toolchain.
|
97 | 119 | - name: "Install Foundry"
|
98 | 120 | uses: foundry-rs/foundry-toolchain@v1
|
@@ -126,6 +148,17 @@ jobs:
|
126 | 148 | with:
|
127 | 149 | submodules: recursive
|
128 | 150 |
|
| 151 | + # Restore Forge cache |
| 152 | + - name: Cache Forge Build |
| 153 | + uses: actions/cache@v3 |
| 154 | + with: |
| 155 | + path: | |
| 156 | + cache/ |
| 157 | + out/ |
| 158 | + key: ${{ runner.os }}-forge-${{ hashFiles('**/foundry.toml', '**/remappings.txt', 'src/**/*.sol', 'lib/**/*.sol') }} |
| 159 | + restore-keys: | |
| 160 | + ${{ runner.os }}-forge- |
| 161 | +
|
129 | 162 | # Install the Foundry toolchain.
|
130 | 163 | - name: "Install Foundry"
|
131 | 164 | uses: foundry-rs/foundry-toolchain@v1
|
@@ -160,20 +193,20 @@ jobs:
|
160 | 193 | - uses: actions/checkout@v4
|
161 | 194 | with:
|
162 | 195 | submodules: recursive
|
163 |
| - |
164 |
| - # Cache Foundry dependencies |
165 |
| - - name: Cache Foundry dependencies |
| 196 | + |
| 197 | + # Restore Foundry and Forge cache |
| 198 | + - name: Cache Foundry Dependencies |
166 | 199 | uses: actions/cache@v3
|
167 | 200 | with:
|
168 | 201 | path: |
|
169 | 202 | ~/.cargo
|
170 | 203 | ~/.foundry
|
171 | 204 | out/
|
172 | 205 | cache/
|
173 |
| - key: ${{ runner.os }}-foundry-${{ hashFiles('**/foundry.toml', '**/Cargo.lock') }} |
| 206 | + key: ${{ runner.os }}-forge-${{ hashFiles('**/foundry.toml', '**/remappings.txt', 'src/**/*.sol', 'lib/**/*.sol', '**/Cargo.lock') }} |
174 | 207 | restore-keys: |
|
175 | 208 | ${{ runner.os }}-foundry-
|
176 |
| -
|
| 209 | + |
177 | 210 | # Install the Foundry toolchain.
|
178 | 211 | - name: "Install Foundry"
|
179 | 212 | uses: foundry-rs/foundry-toolchain@v1
|
|
0 commit comments