Skip to content
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

Create TeleporterMessenger ABI Go binding #41

Merged
merged 29 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/abi_go_bindings_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ABI Go Bindings Checker

on:
push:
branches:
- main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may only want to do this on pull requests, since the CI job works by (potentially) modifying the branch. I'm sure it's highly unlikely to cause issues, but I'd prefer if we didn't do that on main in any automated fashion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that every workflow should be run in it's own environment. I don't think this test is really only important in PRs though, so I'm fine with this either way.

pull_request:
branches:
- "*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need need to add on push to main?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on Cam's comments, we may not want to run this on main in automated fashion


env:
GO_VERSION: "1.20.7"
gwen917 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
abi_binding:
name: abi_binding
runs-on: ubuntu-20.04

steps:
- name: Checkout go-ethereum repository
uses: actions/checkout@v4
with:
repository: ethereum/go-ethereum
ref: v1.13.1
gwen917 marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout Teleporter repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install forge and generate ABI Go bindings
run: |
BASE_DIR=${XDG_CONFIG_HOME:-$HOME}
curl -L https://foundry.paradigm.xyz | bash
source $HOME/.bashrc
$BASE_DIR/.foundry/bin/foundryup
export GOPATH=$HOME/go
export PATH="$PATH:$BASE_DIR/.foundry/bin"
export PATH="$PATH:$GOPATH/bin"
./scripts/abi_go_bindings.sh

- name: Check for clean branch
run: .github/workflows/check_clean_branch.sh
9 changes: 9 additions & 0 deletions .github/workflows/check_clean_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Exits if any uncommitted changes are found.

set -o errexit
gwen917 marked this conversation as resolved.
Show resolved Hide resolved
set -o nounset
set -o pipefail

git update-index --really-refresh >> /dev/null
gwen917 marked this conversation as resolved.
Show resolved Hide resolved
gwen917 marked this conversation as resolved.
Show resolved Hide resolved
git diff-index --quiet HEAD
Loading