-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add script to check for critical libraries supporting a given …
…Noir version (#6697) Co-authored-by: Savio <[email protected]> Co-authored-by: Akosh Farkash <[email protected]>
- Loading branch information
1 parent
b70daf4
commit 1cd2b4d
Showing
3 changed files
with
79 additions
and
20 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
https://github.com/noir-lang/ec | ||
https://github.com/noir-lang/eddsa | ||
https://github.com/noir-lang/mimc | ||
https://github.com/noir-lang/schnorr | ||
https://github.com/noir-lang/noir_sort | ||
https://github.com/noir-lang/noir-edwards | ||
https://github.com/noir-lang/noir-bignum | ||
https://github.com/noir-lang/noir_bigcurve | ||
https://github.com/noir-lang/noir_base64 | ||
https://github.com/noir-lang/noir_string_search | ||
https://github.com/noir-lang/sparse_array | ||
https://github.com/noir-lang/noir_rsa | ||
https://github.com/noir-lang/noir_json_parser |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# Run relative to repo root | ||
cd $(dirname "$0")/../ | ||
|
||
if [[ -z $1 ]]; then | ||
echo "Must specify Noir release to test against" >&2 | ||
echo "usage: ./check-critical-libraries.sh <release-version>" >&2 | ||
exit 1 | ||
fi | ||
noirup -v $1 | ||
|
||
CRITICAL_LIBRARIES=$(grep -v "^#\|^$" ./CRITICAL_NOIR_LIBRARIES) | ||
readarray -t REPOS_TO_CHECK < <(echo "$CRITICAL_LIBRARIES") | ||
|
||
getLatestReleaseTagForRepo() { | ||
REPO_NAME=$1 | ||
TAG=$(gh release list -R $REPO_NAME --json 'tagName,isLatest' -q '.[] | select(.isLatest == true).tagName') | ||
if [[ -z $TAG ]]; then | ||
echo "$REPO_NAME has no valid release" >&2 | ||
exit 1 | ||
fi | ||
echo $TAG | ||
} | ||
|
||
for REPO in ${REPOS_TO_CHECK[@]}; do | ||
echo $REPO | ||
TMP_DIR=$(mktemp -d) | ||
|
||
TAG=$(getLatestReleaseTagForRepo $REPO) | ||
git clone $REPO -c advice.detachedHead=false --depth 1 --branch $TAG $TMP_DIR | ||
|
||
nargo test --program-dir $TMP_DIR | ||
|
||
rm -rf $TMP_DIR | ||
done |