-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
matrix foundry tests and snapshots #10022
Conversation
I see that you haven't updated any README files. Would it make sense to do so? |
1d9a6c3
to
6722e11
Compare
49dfd88
to
aa7f705
Compare
Go solidity wrappers are out-of-date, regenerate them via the |
0520558
to
d6055da
Compare
d6055da
to
669638e
Compare
make running HH CI more restrictive
contracts/GNUmakefile
Outdated
# ALL_FOUNDRY_PRODUCTS contains a list of all products that have a foundry | ||
# profile defined. Adding a product to this list will make it available for | ||
# snapshotting. | ||
ALL_FOUNDRY_PRODUCTS = vrf automation llo functions automation-dev shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
automation-dev is required because automation has Foundry code in the dev
folder. This should be moved into the automation folder at some point.
shared is already here even though there are no Foundry tests yet, this will soon change so I already added it
id: changes | ||
with: | ||
filters: | | ||
src: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This excludes quite a few files vs the old filter. Hopefully this results in running HH less often while never missing a run when needed
@@ -2,5 +2,5 @@ | |||
pragma solidity ^0.8.0; | |||
|
|||
interface ITypeAndVersion { | |||
function typeAndVersion() external pure virtual returns (string memory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing small mistake from previous PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI looks good, just a few small suggestions.
# Conflicts: # .github/workflows/solidity.yml # GNUmakefile # contracts/gas-snapshots/llo.gas-snapshot
.PHONY: wrappers | ||
wrappers: pnpmdep abigen ## Recompiles solidity contracts and their go wrappers. | ||
./scripts/native_solc_compile_all_$(FOUNDRY_PROFILE) | ||
go generate ../core/gethwrappers/$(FOUNDRY_PROFILE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sense, but existing wrappers are placed under /core/gethwrappers/generated folder today, could this cause issues for go imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works for projects that adopt the new location. If they use the old way, they have to run make wrappers-all, just like now, and their files are unchanged. Some projects have already moved their wrapper generation code to subfolders, this command if for those teams.
SonarQube Quality Gate 0 Bugs No Coverage information |
This PR aims to improve the developer experience for developers writing Solidity through the following changes
/contracts
so developers can run Foundry tests and the Make commands from the same location.FOUNDRY_PROFILE
env var and a new Make commandmake snapshot
FOUNDRY_PROFILE
already set during development to runforge test
they can now runmake snapshot
to update only the snapshot for the product they're currently working onFOUNDRY_PROFILE
to indicate which wrappers are generatedmake wrappers
with env varFOUNDRY_PROFILE=llo
would compile all llo contracts and then create gethwrappers just for llonative_solc_compile_all_XXX
compile scripts andcore/gethwrappers/$(FOUNDRY_PROFILE)/go_generate.go
generation files.go_generate
yet, if you want to use this functionality, simply extract the lines that apply to your product into a properly named file to add supportubuntu20.04-4cores-16GB
machine to be available to run HH jobs