Skip to content

fix: issue with concurrent workflows #3

fix: issue with concurrent workflows

fix: issue with concurrent workflows #3

Workflow file for this run

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:
GO_VERSION: "1.21" # https://go.dev/dl/
GO_ETHEREUM_VERSION: "v1.13.5" # https://github.com/ethereum/go-ethereum/releases
jobs:
go-bindings:
name: Go bindings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Install solc
run: sudo snap install --stable solc
- name: Install abigen
run: |
go get -u github.com/ethereum/go-ethereum@${{ env.GO_ETHEREUM_VERSION }}
cd ${{ github.workspace }}/$GOPATH/src/github.com/ethereum/go-ethereum/
make
make devtools
- 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\`."
exit 1
else
echo "✅ The go bindings are up to date."
fi