Skip to content

merge queue: embarking main (884690e), #2184, #2180, #2182, #2156 and #2154 together #24

merge queue: embarking main (884690e), #2184, #2180, #2182, #2156 and #2154 together

merge queue: embarking main (884690e), #2184, #2180, #2182, #2156 and #2154 together #24

name: contracts-abi-compat-check
# Default to no token permissions at the workflow level; each job opts into the
# minimum read scopes it needs.
permissions: {}
on:
pull_request:
env:
ABI_COMPAT_FROM_TAG: v0.11.1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check-changes:
name: contracts-abi-compat-check/check-changes
permissions:
contents: read # Required by actions/checkout to clone the repository
pull-requests: read # Required by dorny/paths-filter to inspect changed files
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: "false"
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: |
host-contracts:
- .github/workflows/contracts-abi-compat-check.yml
- ci/abi-compat/**
- ci/shared/**
- host-contracts/**
gateway-contracts:
- .github/workflows/contracts-abi-compat-check.yml
- ci/abi-compat/**
- ci/shared/**
- gateway-contracts/**
check:
name: contracts-abi-compat-check/${{ matrix.package }}
needs: check-changes
if: ${{ needs.check-changes.outputs.packages != '[]' }}
permissions:
contents: read # Required by actions/checkout to clone the PR branch and baseline tag
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.check-changes.outputs.packages) }}
include:
- package: host-contracts
extra-deps: forge soldeer install
- package: gateway-contracts
extra-deps: ""
steps:
- name: Checkout PR branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: "false"
- name: Checkout baseline
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ env.ABI_COMPAT_FROM_TAG }}
path: baseline
persist-credentials: "false"
- name: Install Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de
- name: Install PR dependencies
working-directory: ${{ matrix.package }}
run: npm ci
- name: Install baseline dependencies
working-directory: baseline/${{ matrix.package }}
run: npm ci
- name: Install Forge dependencies
if: matrix.extra-deps != ''
env:
PACKAGE: ${{ matrix.package }}
EXTRA_DEPS: ${{ matrix.extra-deps }}
run: |
(cd "$PACKAGE" && $EXTRA_DEPS)
(cd "baseline/$PACKAGE" && $EXTRA_DEPS)
- name: Setup compilation
env:
PACKAGE: ${{ matrix.package }}
run: |
(cd "$PACKAGE" && make ensure-addresses)
(cd "baseline/$PACKAGE" && make ensure-addresses)
bun ci/shared/merge-address-constants.ts "baseline/$PACKAGE/addresses" "$PACKAGE/addresses"
cp "$PACKAGE/foundry.toml" "baseline/$PACKAGE/foundry.toml"
- name: Run ABI compatibility check
env:
PACKAGE: ${{ matrix.package }}
run: bun ci/abi-compat/check.ts "baseline/$PACKAGE" "$PACKAGE" "$PACKAGE"