-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): print protocol circuits gate counts
- Loading branch information
1 parent
b3bca76
commit 9597ce9
Showing
3 changed files
with
91 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
REPORT_NAME=$1 | ||
NAME_PLURAL=""$REPORT_NAME"s" | ||
|
||
combined_reports='{"programs": []}' | ||
|
||
# Iterate over each report and merge them | ||
for report in ./reports/*; do | ||
# The report is saved under ./$REPORT_NAME_{ matrix_report }/$REPORT_NAME_{ matrix_report }.json | ||
FILE_PATH=$(echo $(ls $report)) | ||
|
||
# Extract the $NAME_PLURAL array from each report and merge it | ||
combined_reports=$(jq --argjson COMBINED_REPORTS "$combined_reports" '.programs += $COMBINED_REPORTS.programs' <<< "$(cat "$report/$FILE_PATH")") | ||
done | ||
|
||
# Wrap the merged memory reports into a new object as to keep the $NAME_PLURAL key | ||
|
||
echo "$combined_reports" | ||
|
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,12 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
BACKEND=${BACKEND:-bb} | ||
|
||
ARTIFACT_PATH=$1 | ||
ARTIFACT_NAME=$(basename "$ARTIFACT_PATH") | ||
|
||
GATES_INFO=$($BACKEND gates -b $ARTIFACT_PATH) | ||
MAIN_FUNCTION_INFO=$(echo $GATES_INFO | jq -r '.functions[0] | .name = "main"') | ||
echo "{\"programs\": [ {\"package_name\": \"$ARTIFACT_NAME\", \"functions\": [$MAIN_FUNCTION_INFO]} ]}" | ||
|
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