@@ -152,67 +152,30 @@ jobs:
152
152
echo "matrix=$matrix" >> $GITHUB_OUTPUT
153
153
154
154
slither :
155
- if : needs.changed-files.outputs.any_changed == 'true'
156
- needs : [changed-files, set-matrix, deps ]
155
+ if : contains( needs.changed-files.outputs.modified_files, 'lean-imt')
156
+ needs : [changed-files, compile ]
157
157
runs-on : ubuntu-latest
158
158
permissions :
159
159
contents : read
160
160
security-events : write
161
- strategy :
162
- matrix :
163
- dir : ${{ fromJson(needs.set-matrix.outputs.matrix) }}
164
161
steps :
165
162
- uses : actions/checkout@v4
166
-
167
- # FIXME this does not work as a way to restore compilation results for slither job but it does for the compile job ??
168
- # - uses: actions/download-artifact@v4
169
- # with:
170
- # name: all-artifacts
171
- # path: packages/
172
-
173
- - uses : actions/setup-node@v4
174
- with :
175
- node-version : 20
176
- - uses : actions/cache/restore@v4
177
- with :
178
- path : node_modules
179
- key : ${{ needs.deps.outputs.cache-key }}
180
- # TODO: right now forge and node tooling coexist, eventually keep only forge action
181
- - uses : foundry-rs/foundry-toolchain@v1
163
+ - uses : actions/download-artifact@v4
182
164
with :
183
- version : nightly
184
-
185
- - if : contains(needs.changed-files.outputs.modified_files, matrix.dir)
186
- name : Compile contracts
187
- run : |
188
- workspace=$(jq -r '.name' packages/${{ matrix.dir }}/package.json)
189
- yarn workspace "$workspace" run compile
165
+ name : all-artifacts-forge
166
+ path : packages/
190
167
191
- - if : contains(needs.changed-files.outputs.modified_files, matrix.dir) && matrix.dir != 'lean-imt'
192
- name : Run slither
168
+ - name : Run slither
193
169
uses : crytic/slither-action@v0.4.0
194
170
id : slither
195
171
with :
196
172
ignore-compile : true
197
- node-version : 20
198
173
fail-on : none
199
174
sarif : results.sarif
200
175
slither-args : --filter-paths "test" --exclude-dependencies --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
201
176
target : packages/${{ matrix.dir }}
202
177
203
- - if : contains(needs.changed-files.outputs.modified_files, 'lean-imt')
204
- name : Run slither
205
- uses : crytic/slither-action@v0.4.0
206
- id : slither
207
- with :
208
- ignore-compile : true
209
- fail-on : none
210
- sarif : results.sarif
211
- slither-args : --filter-paths "test" --hardhat-ignore-compile --exclude-dependencies --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
212
- target : packages/lean-imt
213
-
214
- - if : contains(needs.changed-files.outputs.modified_files, matrix.dir)
215
- name : Upload SARIF files
178
+ - name : Upload SARIF files
216
179
uses : github/codeql-action/upload-sarif@v3
217
180
with :
218
181
sarif_file : ${{ steps.slither.outputs.sarif }}
0 commit comments