Add reusable verifying workflow #1
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: 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/recursive-checkout@v1.1.1 | ||
with: | ||
paths: ${{ github.workspace }}/** | ||
refs: ${{ inputs.refs }} | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3.6.0 | ||
- 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 |