-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update integration tests to call
bb
directly
- Loading branch information
1 parent
37b68b1
commit 836b861
Showing
1 changed file
with
19 additions
and
15 deletions.
There are no files selected for viewing
34 changes: 19 additions & 15 deletions
34
noir/noir-repo/compiler/integration-tests/scripts/codegen-verifiers.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
NARGO_BACKEND_PATH=${NARGO_BACKEND_PATH:-bb} | ||
|
||
self_path=$(dirname "$(readlink -f "$0")") | ||
|
||
repo_root=$self_path/../../.. | ||
|
||
# Run codegen-verifier for 1_mul | ||
# We want to move all the contracts to the root of compiler/integration-tests | ||
contracts_dir=$self_path/../contracts | ||
rm -rf $contracts_dir | ||
mkdir $contracts_dir | ||
|
||
# Codegen verifier contract for 1_mul | ||
mul_dir=$repo_root/test_programs/execution_success/1_mul | ||
nargo --program-dir $mul_dir codegen-verifier | ||
nargo --program-dir $mul_dir compile | ||
$NARGO_BACKEND_PATH write_vk -b $mul_dir/target/1_mul.json | ||
$NARGO_BACKEND_PATH contract -o $contracts_dir/1_mul.sol | ||
|
||
# Run codegen-verifier for assert_statement | ||
# Codegen verifier contract for assert_statement | ||
assert_statement_dir=$repo_root/test_programs/execution_success/assert_statement | ||
nargo --program-dir $assert_statement_dir codegen-verifier | ||
nargo --program-dir $assert_statement_dir compile | ||
$NARGO_BACKEND_PATH write_vk -b $assert_statement_dir/target/assert_statement.json | ||
$NARGO_BACKEND_PATH contract -o $contracts_dir/assert_statement.sol | ||
|
||
# Run codegen-verifier for recursion | ||
# Codegen verifier contract for recursion | ||
recursion_dir=$repo_root/compiler/integration-tests/circuits/recursion | ||
nargo --program-dir $recursion_dir codegen-verifier | ||
|
||
# Copy compiled contracts from the root of compiler/integration-tests | ||
contracts_dir=$self_path/../contracts | ||
rm -rf $contracts_dir | ||
mkdir $contracts_dir | ||
|
||
cp $mul_dir/contract/1_mul/plonk_vk.sol $contracts_dir/1_mul.sol | ||
cp $assert_statement_dir/contract/assert_statement/plonk_vk.sol $contracts_dir/assert_statement.sol | ||
cp $recursion_dir/contract/recursion/plonk_vk.sol $contracts_dir/recursion.sol | ||
nargo --program-dir $recursion_dir compile | ||
$NARGO_BACKEND_PATH write_vk -b $recursion_dir/target/recursion.json | ||
$NARGO_BACKEND_PATH contract -o $contracts_dir/recursion.sol |