-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling Foundry installation #44
Comments
I think that if you set I haven't tested yet, but following something like the |
as a workaround, you can add a |
@elopez Thanks! That does it as a workaround. |
I am looking for this so that i can use the foundry action to install a specific version of foundry as it is currently slither will override any existing foundry installation on CI |
hey @thedavidmeister! The Slither action runs inside a container so any existing foundry installations on the github runner are unfortunately inaccesible. If you'd like to use a foundry installation on the runner itself you can pre-build the project and then run the action with (the following example is untested, but it should give you an idea of what I'm saying) name: Slither Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Build the contracts
run: forge build --build-info
- name: Run Slither
uses: crytic/[email protected]
with:
ignore-compile: true |
@elopez thanks i'll try it |
I just bumped into an error that might be related to this GitHub issue. We are working on making our Foundry repos rely exclusively on Node.js dependencies (instead of git submodules), and we can't get Slither to work in CI. Always getting this error:
Slither is forcefully attempting to install some submodules in the We don't want to remove the Any guidance, @elopez, @montyly, @0xalpharush? Here's the failed CI run: https://github.com/PaulRBerg/prb-proxy/actions/runs/7087816498/job/19288940816?pr=179 |
hey @PaulRBerg, the Slither action just runs https://github.com/crytic/slither-action/blob/main/entrypoint.sh#L233-L234 I can reproduce the same error locally on a clone of your repo: emilio@mbpro /tmp % git clone https://github.com/PaulRBerg/prb-proxy.git -b build/include-test-utils-in-package
Cloning into 'prb-proxy'...
remote: Enumerating objects: 4114, done.
remote: Counting objects: 100% (1191/1191), done.
remote: Compressing objects: 100% (440/440), done.
remote: Total 4114 (delta 823), reused 1029 (delta 747), pack-reused 2923
Receiving objects: 100% (4114/4114), 8.34 MiB | 14.52 MiB/s, done.
Resolving deltas: 100% (2419/2419), done.
emilio@mbpro /tmp % cd prb-proxy
emilio@mbpro prb-proxy % forge install
Updating dependencies in /private/tmp/prb-proxy/lib
error: pathspec '/private/tmp/prb-proxy/lib' did not match any file(s) known to git
Error:
git submodule exited with code 1 It seems like Foundry doesn't like it if your project does not have a "lib" folder, but just re-adding it seems to work around the issue: emilio@mbpro prb-proxy % forge install
Updating dependencies in /private/tmp/prb-proxy/lib
error: pathspec '/private/tmp/prb-proxy/lib' did not match any file(s) known to git
Error:
git submodule exited with code 1
emilio@mbpro prb-proxy % mkdir lib && touch lib/.keep && git add lib && git commit -m "fix"
[build/include-test-utils-in-package d3d8fba] fix
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 lib/.keep
emilio@mbpro prb-proxy % forge install
Updating dependencies in /private/tmp/prb-proxy/lib
emilio@mbpro prb-proxy % It might be worth reporting this issue to the Foundry devs |
Great sleuthing @elopez, thanks for the prompt response. I've opened an issue in Foundry: foundry-rs/foundry#6519 |
Just noting I had a similar issue stemming from a monorepo. Our contracts package uses forge but has a Here is the fix commit that removes the |
There is currently a problem in foundry around glibc versioning that causes installation to fail in this action, resulting in a failed run. See foundry-rs/foundry#3827
Is there a way to skip its installation entirely? In our case we have a dual Hardhat-Foundry repository so we just need Hardhat. Neither forcing the framework to Hardhat or disabling foundry compilation seems to actually skip installation in the test that I ran.
The text was updated successfully, but these errors were encountered: