update build

This commit is contained in:
Jaremy Creechley 2024-01-10 16:46:26 +02:00
parent 926fb4b919
commit f35649b7cf
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
1 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import std/os
task genffi, "update the nim ffi bindings": task genffi, "update the nim ffi bindings":
exec "cargo install nbindgen" exec "cargo install nbindgen"
@ -10,4 +11,8 @@ task compileCircuits, "compile test circuits":
exec "circom src/circuit_tests/storer-test.circom --r1cs --wasm -o src/circuit_tests/artifacts" exec "circom src/circuit_tests/storer-test.circom --r1cs --wasm -o src/circuit_tests/artifacts"
task tests, "run unit tests": task tests, "run unit tests":
let storerR1cs = fileExists "src/circuit_tests/artifacts/storer-test.r1cs"
let storerWasm = fileExists "src/circuit_tests/artifacts/storer-test_js/storer-test.wasm"
if not storerR1cs or not storerWasm:
compileCircuitsTask()
exec "nim c -r tests/tffi.nim" exec "nim c -r tests/tffi.nim"