arnaucube
arnaucube/go-circom-prover-verifierPublic Self-hosted repository
Merge pull request #1 from iden3/feature/gh-actions

Add Github Actions
arnau 17317030+arnaucube@users.noreply.github.com
Tue, 14 Apr 2020 16:45:19 +0200
commit

96b4b5b3087acdc1fda9dffa8340611d0c9e6f61

parent

a439651fafb0be31029933ce19f0ae18cb32f200

2 files changed, 32 insertions(+), 0 deletions(-)

jump to
A .github/workflows/main.yml

@@ -0,0 +1,30 @@

+ +name: Test +on: [push, pull_request] +jobs: + test: + # matrix strategy from: https://github.com/mvdan/github-actions-golang/blob/master/.github/workflows/test.yml + strategy: + matrix: + go-version: [1.13.x, 1.14.x] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Install Nodejs + uses: actions/setup-node@v1 + with: + go-version: 10.x + - name: Install circom + run: npm install -g circom + - name: Install snarkjs + run: npm install -g snarkjs + - name: Checkout code + uses: actions/checkout@v2 + - name: Compile circuits and execute Go tests + run: | + sh ./compile-circuits.sh + go test ./...
M compile-circuits.sh → compile-circuits.sh

@@ -6,6 +6,7 @@ echo "compiling circuit"

circom circuit.circom -r1cs --wasm --sym echo "generating setup" snarkjs setup +sed -i 's/null/["0","0","0"]/g' proving_key.json echo "calculating witness" snarkjs calculatewitness --wasm circuit.wasm --input input.json --witness witness.json

@@ -15,5 +16,6 @@ echo "compiling circuit"

circom circuit.circom -r1cs --wasm --sym echo "generating setup" snarkjs setup +sed -i 's/null/["0","0","0"]/g' proving_key.json echo "calculating witness" snarkjs calculatewitness --wasm circuit.wasm --input input.json --witness witness.json