From 3d224ff0ffbc28b0467e803a8b7bb092c746ab21 Mon Sep 17 00:00:00 2001 From: Jim Zhang Date: Tue, 6 Aug 2024 09:21:59 -0400 Subject: [PATCH] Add e2e test with circuit builds and proving keys generation Signed-off-by: Jim Zhang --- .github/workflows/e2e.yaml | 49 ++++++++++++++++++++++ .github/workflows/{go.yaml => golang.yaml} | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/e2e.yaml rename .github/workflows/{go.yaml => golang.yaml} (97%) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 0000000..926f033 --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,49 @@ +name: e2e + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + circuit-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: Checkout circom repo + uses: actions/checkout@v4 + with: + repository: 'iden3/circom' + ref: 'v2.1.9' + + - name: Build circom + run: | + cd circom + cargo build --release + cargo install --path circom + + - name: Setup node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: install snarkjs + run: | + npm install -g snarkjs + + - name: Build circuits + run: | + cd zkp/circuits + npm run gen diff --git a/.github/workflows/go.yaml b/.github/workflows/golang.yaml similarity index 97% rename from .github/workflows/go.yaml rename to .github/workflows/golang.yaml index 5c9a012..d7f4b7e 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/golang.yaml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - build: + golang-test: env: TEST_ARGS: -v runs-on: ubuntu-latest