Browse Source

Update compile-circuits.sh to adapt null from json, update GH Actions to install snarkjs & circom for testdata generation

ed255-patch-1
arnaucube 4 years ago
parent
commit
8df45c7a91
2 changed files with 14 additions and 2 deletions
  1. +12
    -2
      .github/workflows/main.yml
  2. +2
    -0
      compile-circuits.sh

+ 12
- 2
.github/workflows/main.yml

@ -14,7 +14,17 @@ jobs:
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: Test
run: go test ./...
- name: Compile circuits and execute Go tests
run: |
sh ./compile-circuits.sh
go test ./...

+ 2
- 0
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

Loading…
Cancel
Save