From f35649b7cf0dfcfe2edd607094cb634f04481c1a Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Wed, 10 Jan 2024 16:46:26 +0200 Subject: [PATCH] update build --- build.nims | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.nims b/build.nims index 7da60f4..05139a6 100644 --- a/build.nims +++ b/build.nims @@ -1,3 +1,4 @@ +import std/os task genffi, "update the nim ffi bindings": 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" 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"