diff --git a/.github/workflows/reusable-verify-proofs.yml b/.github/workflows/reusable-verify-proofs.yml new file mode 100644 index 0000000..a5c24f8 --- /dev/null +++ b/.github/workflows/reusable-verify-proofs.yml @@ -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/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