Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ inputs:
description: "Install Photon indexer (required for TypeScript tests)"
required: false
default: "false"
circom-version:
description: "Circom version for ZK circuits"
required: false
default: "v2.2.2"
install-circom:
description: "Whether to install circom and snarkjs"
required: false
default: "false"

runs:
using: composite
Expand Down Expand Up @@ -100,6 +108,34 @@ runs:
shell: bash
run: npm install -g @lightprotocol/zk-compression-cli

- name: Cache Powers of Tau file
if: inputs.install-circom == 'true'
uses: actions/cache@v4
with:
path: ${{ inputs.example }}/pot/powersOfTau28_hez_final_16.ptau
key: ptau-powersOfTau28_hez_final_16-v1

- name: Cache circom installation
if: inputs.install-circom == 'true'
id: cache-circom
uses: actions/cache@v4
with:
path: ~/.cargo/bin/circom
key: circom-${{ runner.os }}-${{ inputs.circom-version }}

- name: Install circom
if: inputs.install-circom == 'true' && steps.cache-circom.outputs.cache-hit != 'true'
shell: bash
run: |
wget -q https://github.com/iden3/circom/releases/download/${{ inputs.circom-version }}/circom-linux-amd64
chmod +x circom-linux-amd64
mv circom-linux-amd64 ~/.cargo/bin/circom

- name: Install snarkjs
if: inputs.install-circom == 'true'
shell: bash
run: npm install -g snarkjs

- name: Install Photon indexer
if: inputs.photon-indexer == 'true'
shell: bash
Expand All @@ -122,3 +158,7 @@ runs:
node --version
npm --version
fi
if [ "${{ inputs.install-circom }}" == "true" ]; then
circom --version
snarkjs --help | head -1 || true
fi
7 changes: 7 additions & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- counter/native
- counter/pinocchio
- account-comparison
- zk-id
steps:
- uses: actions/checkout@v4

Expand All @@ -38,6 +39,12 @@ jobs:
example: ${{ matrix.example }}
solana-cli-version: ${{ env.SOLANA_CLI_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
install-circom: ${{ matrix.example == 'zk-id' }}

- name: Setup ZK circuits
if: matrix.example == 'zk-id'
working-directory: ${{ matrix.example }}
run: ./scripts/setup.sh

- name: Build and test
working-directory: ${{ matrix.example }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ node_modules
test-ledger
.yarn
.claude
build
pot
10 changes: 10 additions & 0 deletions zk-id/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules/
build/
pot/
*.sym
*.r1cs
*.wasm
*.zkey
*.wtns
proof.json
public.json
Loading