Merge branch 'main' into minhd-vu/disconnect-useless-peers #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: go-bindings | |
on: | |
push: | |
# Only run when files under `bindings/` or `contracts/` folders are modified. | |
paths: | |
- '.github/workflows/go-bindings.yml' | |
- 'contracts/**' | |
- 'bindings/**' | |
concurrency: | |
group: go-bindings-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
SOLC_VERSION: "0.8.21" | |
jobs: | |
go-bindings: | |
name: Check go bindings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install abigen | |
run: | | |
sudo add-apt-repository ppa:ethereum/ethereum | |
sudo apt-get update | |
sudo apt-get install ethereum | |
abigen --version | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install dependencies | |
working-directory: contracts | |
run: forge install | |
- name: Generate go bindings | |
run: make gen-go-bindings | |
- name: Check if the go bindings are up to date | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "❌ Error: Go bindings are not up to date. Please run \`make gen-go-bindings\`." | |
git diff | |
exit 1 | |
else | |
echo "✅ Go bindings are up to date." | |
fi |