ci: add workflow to check bindings are up to date #15
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: Bindings | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [ '**' ] | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
check: | |
strategy: | |
fail-fast: true | |
name: Check bindings are up to date | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: v0.3.0 | |
- name: Show Forge version | |
run: forge --version | |
- name: Backup existing bindings | |
working-directory: crates/utils/src/ | |
run: | | |
cp -r core/ existing_core/ | |
cp -r middleware/ existing_middleware/ | |
cp -r sdk/ existing_sdk/ | |
- name: Generate new bindings | |
run: | | |
make bindings_host | |
cargo fmt | |
- name: Compare existing and new bindings | |
working-directory: crates/utils/src/ | |
run: | | |
diff existing_core/ core/ | |
diff existing_middleware/ middleware/ | |
diff existing_sdk/ sdk/ |