Skip to content

Commit

Permalink
chore: update builtin generation (#896)
Browse files Browse the repository at this point in the history
* chore: update builtin generation

* fix: update GHA
  • Loading branch information
darrenvechain authored Nov 29, 2024
1 parent 45ab2bd commit 9eec212
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/lint-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
with:
go-version: '1.22'
cache: false

- name: Check `builtins` directory
# if it has any changes in the 'builtins' dir after running `go generate`, echo an error and fail the workflow
run: |
go generate ./builtin/gen
git diff --exit-code builtin/gen || (echo "\n\n\nbuiltin/gen directory is not up to date, run 'go generate ./...' to update it" && exit 1)
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
27 changes: 9 additions & 18 deletions builtin/gen/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions builtin/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
package gen

//go:generate rm -rf ./compiled/
//go:generate solc --optimize-runs 200 --overwrite --bin-runtime --abi -o ./compiled authority.sol energy.sol executor.sol extension.sol extension-v2.sol measure.sol params.sol prototype.sol
//go:generate go-bindata -nometadata -ignore=_ -pkg gen -o bindata.go compiled/
//go:generate docker run -v ./:/solidity ethereum/solc:0.4.24 --optimize-runs 200 --overwrite --bin-runtime --abi -o /solidity/compiled authority.sol energy.sol executor.sol extension.sol extension-v2.sol measure.sol params.sol prototype.sol
//go:generate go run github.com/go-bindata/go-bindata/[email protected] -nometadata -ignore=_ -pkg gen -o bindata.go compiled/
//go:generate go fmt

0 comments on commit 9eec212

Please sign in to comment.