Skip to content

Commit

Permalink
ci: add ci for elf check
Browse files Browse the repository at this point in the history
  • Loading branch information
fakedev9999 committed Jan 15, 2025
1 parent 5dfc439 commit 903e442
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/elf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: ELF

on:
pull_request:
branches:
- main
paths:
- 'programs/**'
- 'elf/**'
push:
branches:
- main
paths:
- 'programs/**'
- 'elf/**'
workflow_dispatch:

jobs:
elf:
runs-on:
- runs-on
- runner=64cpu-linux-arm64
- run-id=${{ github.run_id }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
source ~/.bashrc
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Verify the OP Succinct binaries
run: |
# Save verification keys
RANGE_VK=$(cargo run --bin vkey --release | grep "Range ELF Verification Key Commitment:" | cut -d' ' -f6)
AGGREGATION_VK=$(cargo run --bin vkey --release | grep "Aggregation ELF Verification Key:" | cut -d' ' -f6)
# Build the binaries
cargo prove build --elf-name range-elf --docker --tag latest
cargo prove build --elf-name aggregation-elf --docker --tag latest
# Save new verification keys
NEW_RANGE_VK=$(cargo run --bin vkey --release | grep "Range ELF Verification Key Commitment:" | cut -d' ' -f6)
NEW_AGGREGATION_VK=$(cargo run --bin vkey --release | grep "Aggregation ELF Verification Key:" | cut -d' ' -f6)
# Compare the verification keys
[ "$NEW_RANGE_VK" = "$RANGE_VK" ] || exit 1
[ "$NEW_AGGREGATION_VK" = "$AGGREGATION_VK" ] || exit 1

0 comments on commit 903e442

Please sign in to comment.