Skip to content

Commit

Permalink
chore(ci): Check various inliner aggressiveness setttings in Brillig …
Browse files Browse the repository at this point in the history
…reports (#7049)
  • Loading branch information
vezenovm authored Jan 14, 2025
1 parent f4d2271 commit 51b7c07
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,19 @@ jobs:
- name: Generate Brillig bytecode size report
working-directory: ./test_programs
run: |
./gates_report_brillig.sh
mv gates_report_brillig.json ../gates_report_brillig.json
mkdir ./reports
./gates_report_brillig.sh 9223372036854775807
jq '.programs |= map(.package_name |= (. + "_inliner_max"))' gates_report_brillig.json > ./reports/gates_report_brillig_inliner_max.json
./gates_report_brillig.sh 0
jq '.programs |= map(.package_name |= (. + "_inliner_zero"))' gates_report_brillig.json > ./reports/gates_report_brillig_inliner_zero.json
./gates_report_brillig.sh -9223372036854775808
jq '.programs |= map(.package_name |= (. + "_inliner_min"))' gates_report_brillig.json > ./reports/gates_report_brillig_inliner_min.json
# Merge all reports
jq -s '{ programs: map(.programs) | add }' ./reports/* > ../gates_report_brillig.json
- name: Compare Brillig bytecode size reports
id: brillig_bytecode_diff
Expand Down Expand Up @@ -165,8 +176,19 @@ jobs:
- name: Generate Brillig execution report
working-directory: ./test_programs
run: |
./gates_report_brillig_execution.sh
mv gates_report_brillig_execution.json ../gates_report_brillig_execution.json
mkdir ./reports
./gates_report_brillig_execution.sh 9223372036854775807
jq '.programs |= map(.package_name |= (. + "_inliner_max"))' gates_report_brillig_execution.json > ./reports/gates_report_brillig_execution_inliner_max.json
./gates_report_brillig_execution.sh 0
jq '.programs |= map(.package_name |= (. + "_inliner_zero"))' gates_report_brillig_execution.json > ./reports/gates_report_brillig_execution_inliner_zero.json
./gates_report_brillig_execution.sh -9223372036854775808
jq '.programs |= map(.package_name |= (. + "_inliner_min"))' gates_report_brillig_execution.json > ./reports/gates_report_brillig_execution_inliner_min.json
# Merge all reports
jq -s '{ programs: map(.programs) | add }' ./reports/* > ../gates_report_brillig_execution.json
- name: Compare Brillig execution reports
id: brillig_execution_diff
Expand Down
2 changes: 1 addition & 1 deletion test_programs/gates_report_brillig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ done

echo "]" >> Nargo.toml

nargo info --force-brillig --json | jq -r ".programs[].functions = []" > gates_report_brillig.json
nargo info --silence-warnings --force-brillig --json --inliner-aggressiveness $1 | jq -r ".programs[].functions = []" > gates_report_brillig.json

rm Nargo.toml
2 changes: 1 addition & 1 deletion test_programs/gates_report_brillig_execution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ done

echo "]" >> Nargo.toml

nargo info --profile-execution --json | jq -r ".programs[].functions = []" > gates_report_brillig_execution.json
nargo info --silence-warnings --profile-execution --json --inliner-aggressiveness $1 | jq -r ".programs[].functions = []" > gates_report_brillig_execution.json

rm Nargo.toml

0 comments on commit 51b7c07

Please sign in to comment.