Skip to content

Commit

Permalink
Add reusable verifying workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
x-mass committed Dec 12, 2023
1 parent d766861 commit fd9d39a
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/reusable-verify-proofs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Verify Proofs (Reusable)

on:
workflow_dispatch:
inputs:
artifact_name:
description: 'Name of the artifact to extract'
required: true
test_names:
description: 'Names of the tests to run (one per line)'
required: true
type: string
evm-placeholder-verification-ref:
description: "Reference to evm-placeholder-verification repository to checkout at"
required: true
type: string
refs:
type: string
description: "Lines with repo names and refs (e.g. `org/repo: ref`)"
required: false

jobs:
run-tests:
runs-on: [ ubuntu-22.04 ]
steps:
- uses: actions/checkout@v4
repository: 'NilFoundation/evm-placeholder-verification'
ref: ${{ inputs.evm-placeholder-verification-ref }}

- name: Checkout modules to specified refs
if: inputs.refs != ''
uses: NilFoundation/ci-cd/actions/[email protected]
with:
paths: ${{ github.workspace }}/**
refs: ${{ inputs.refs }}

- name: Setup Node.js environment
uses: actions/[email protected]

- name: Install node dependencies
run: |
npm install
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: ./contracts/zkllvm

- name: Hardhat deploy
run: |
npx hardhat deploy
- name: Verification of zkllvm proofs
run: |
echo "${{ inputs.test_names }}" | awk '{$1=$1};1' | sed '/^$/d' | while read test_name
do
npx hardhat verify-circuit-proof --test "$test_name"
done

0 comments on commit fd9d39a

Please sign in to comment.