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 edececf
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/reusable-verify-proofs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Verify Proofs (Reusable)

on:
workflow_call:
inputs:
artifact-name:
type: string
description: 'Name of the artifact to extract'
required: true
test-names:
type: string
description: 'Names of the tests to run (one per line)'
required: true
evm-placeholder-verification-ref:
type: string
description: "Reference to evm-placeholder-verification repository to checkout at"
required: true
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
with:
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 edececf

Please sign in to comment.