mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 18:52:58 +03:00
adds constraint check (falsy)
This commit is contained in:
parent
9bc53eb594
commit
d0c9c90451
@ -158,6 +158,19 @@ jobs:
|
|||||||
export LEO=/home/circleci/project/project/bin/leo
|
export LEO=/home/circleci/project/project/bin/leo
|
||||||
./project/.circleci/leo-add-remove.sh
|
./project/.circleci/leo-add-remove.sh
|
||||||
|
|
||||||
|
leo-check-constraints:
|
||||||
|
docker:
|
||||||
|
- image: cimg/rust:1.50.0
|
||||||
|
resource_class: xlarge
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: /home/circleci/project/
|
||||||
|
- run:
|
||||||
|
name: leo check constraints for Pedersen Hash
|
||||||
|
command: |
|
||||||
|
export LEO=/home/circleci/project/project/bin/leo
|
||||||
|
./project/.circleci/leo-check-constraints.sh
|
||||||
|
|
||||||
leo-login-logout:
|
leo-login-logout:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/rust:1.50.0
|
- image: cimg/rust:1.50.0
|
||||||
|
17
.circleci/leo-check-constraints.sh
Executable file
17
.circleci/leo-check-constraints.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
# leo new hello-world
|
||||||
|
|
||||||
|
cd examples/pedersen-hash
|
||||||
|
|
||||||
|
PEDERSEH_HASH_CONSTRAINTS=1539
|
||||||
|
|
||||||
|
# 1. build
|
||||||
|
# 2. find lines with constraint number
|
||||||
|
# 3. find lines with $PEDERSEH_HASH_CONSTRAINTS
|
||||||
|
# 4. count lines
|
||||||
|
# 4.Er if result is 0 -> constraint number changed
|
||||||
|
# 4.Ok if result is 1 -> all good
|
||||||
|
|
||||||
|
[[ $($LEO build | grep "Number of constraints" | grep $PEDERSEH_HASH_CONSTRAINTS | wc -l) -eq 0 ]] || {
|
||||||
|
echo >&2 "Number of constraints for Pedersen Hash is not $PEDERSEN_HASH_CONSTRAINTS";
|
||||||
|
exit 1;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user