Skip to content

Commit ce561cb

Browse files
committed
[1 changes] feat: Sync from aztec-packages (noir-lang/noir#7241)
chore: bump gates diff (noir-lang/noir#7245) feat: simplify subtraction from self to return zero (noir-lang/noir#7189) feat: allow specifying multiple patterns in nargo test (noir-lang/noir#7186) fix: Avoid type error when calling something with a type alias of a function (noir-lang/noir#7239) feat: Allow resolved types in constructors (noir-lang/noir#7223) chore: clarify to_radix docs examples (noir-lang/noir#7230) chore: fix struct example (noir-lang/noir#7198) feat(optimization): Add purity analysis to SSA (noir-lang/noir#7197) chore: start tracking time to run critical library tests (noir-lang/noir#7221) chore: Rework defunctionalize pass to not rely on DFG bugs (noir-lang/noir#7222) fix(brillig): Globals entry point reachability analysis (noir-lang/noir#7188) chore: update docs to use devcontainer feature (noir-lang/noir#7206) chore(ci): Add test for global vars entry points regression (noir-lang/noir#7209) chore(ssa): Flip the SSA Brillig constraint check to off by default (noir-lang/noir#7211) chore(docs): moving references to noir-starter to awesome-noir (noir-lang/noir#7203) chore: build docs in the merge queue (noir-lang/noir#7218) fix: correct reversed callstacks (noir-lang/noir#7212) chore: exclude dependency fetching time from benchmarks (noir-lang/noir#7210) feat(experimental): Support enums in comptime code (noir-lang/noir#7194)
1 parent a7f8d96 commit ce561cb

File tree

133 files changed

+5637
-500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+5637
-500
lines changed

.noir-sync-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c44b62615f1c8ee657eedd82f2b80e2ec76c9078
1+
a2a0478eaa1cd372b870e9b1f152877f0dcf9fd1

noir/noir-repo/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/aztec-nr.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/noir-contracts.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl

-4
This file was deleted.

noir/noir-repo/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl.jq

-1
This file was deleted.

noir/noir-repo/.github/critical_libraries_status/noir-lang/ec/.failures.jsonl.jq

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/noir-edwards/.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/noir_bigcurve/.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/noir_sort/.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/sparse_array/.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/workflows/docs-pr.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: Deploy preview for PR
22

33
on:
44
pull_request:
5+
merge_group:
56

67
jobs:
78
add_label:
89
runs-on: ubuntu-22.04
10+
if: github.event_name == 'pull_request'
911
outputs:
1012
has_label: ${{ steps.check-labels.outputs.result }}
1113
steps:

noir/noir-repo/.github/workflows/reports.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
7777
- name: Compare gates reports
7878
id: gates_diff
79-
uses: noir-lang/noir-gates-diff@7e4ddaa91c69380f15ccba514eac17bc7432a8cc
79+
uses: noir-lang/noir-gates-diff@dbe920a8dcc3370af4be4f702ca9cef29317bec1
8080
with:
8181
report: gates_report.json
8282
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)
@@ -132,7 +132,7 @@ jobs:
132132
133133
- name: Compare Brillig bytecode size reports
134134
id: brillig_bytecode_diff
135-
uses: noir-lang/noir-gates-diff@7e4ddaa91c69380f15ccba514eac17bc7432a8cc
135+
uses: noir-lang/noir-gates-diff@dbe920a8dcc3370af4be4f702ca9cef29317bec1
136136
with:
137137
report: gates_report_brillig.json
138138
header: |
@@ -192,7 +192,7 @@ jobs:
192192
193193
- name: Compare Brillig execution reports
194194
id: brillig_execution_diff
195-
uses: noir-lang/noir-gates-diff@c1503343c3e264925ef67c68a2a5eeadd245a77b
195+
uses: noir-lang/noir-gates-diff@dbe920a8dcc3370af4be4f702ca9cef29317bec1
196196
with:
197197
report: gates_report_brillig_execution.json
198198
header: |
@@ -365,10 +365,16 @@ jobs:
365365
repository: ${{ matrix.project.repo }}
366366
path: test-repo
367367
ref: ${{ matrix.project.ref }}
368+
369+
- name: Fetch noir dependencies
370+
working-directory: ./test-repo/${{ matrix.project.path }}
371+
run: |
372+
# We run `nargo check` to pre-fetch any dependencies so we don't measure the time to download these
373+
# when benchmarking.
374+
nargo check
368375
369-
- name: Generate compilation report without averages
376+
- name: Generate compilation report
370377
working-directory: ./test-repo/${{ matrix.project.path }}
371-
if: ${{ !matrix.project.take_average }}
372378
run: |
373379
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
374380
touch parse_time.sh

noir/noir-repo/.github/workflows/test-js-packages.yml

+105
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,23 @@ jobs:
595595
sed -i '/^compiler_version/d' ./**/Nargo.toml
596596
597597
- name: Run nargo test
598+
id: test_report
598599
working-directory: ./test-repo/${{ matrix.project.path }}
599600
run: |
601+
600602
output_file=${{ github.workspace }}/noir-repo/.github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.actual.jsonl
603+
BEFORE=$SECONDS
601604
nargo test --silence-warnings --skip-brillig-constraints-check --format json ${{ matrix.project.nargo_args }} | tee $output_file
605+
TIME=$(($SECONDS-$BEFORE))
606+
607+
NAME=${{ matrix.project.repo }}/${{ matrix.project.path }}
608+
# Replace any slashes with underscores
609+
NAME=${NAME//\//_}
610+
TEST_REPORT_NAME=test_report_$NAME
611+
echo "test_report_name=$TEST_REPORT_NAME" >> $GITHUB_OUTPUT
612+
613+
jq --null-input "{ test_reports: [{ name: \"$NAME\", value: (\"$TIME\" | tonumber), unit: \"s\" }]}" > $TEST_REPORT_NAME.json
614+
602615
if [ ! -s $output_file ]; then
603616
# The file is empty so we delete it to signal that `nargo test` failed before it could run any tests
604617
rm -f $output_file
@@ -610,6 +623,97 @@ jobs:
610623
working-directory: ./noir-repo
611624
run: .github/scripts/check_test_results.sh .github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.failures.jsonl .github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.actual.jsonl
612625

626+
- name: Upload test report
627+
uses: actions/upload-artifact@v4
628+
with:
629+
name: ${{ steps.test_report.outputs.test_report_name }}
630+
path: ./test-repo/${{ matrix.project.path }}/${{ steps.test_report.outputs.test_report_name }}.json
631+
retention-days: 3
632+
overwrite: true
633+
634+
compile-noir-contracts:
635+
needs: [build-nargo]
636+
runs-on: ubuntu-22.04
637+
timeout-minutes: 30
638+
name: Compile `noir-contracts` zero inliner aggressiveness
639+
steps:
640+
- name: Checkout
641+
uses: actions/checkout@v4
642+
with:
643+
repository: AztecProtocol/aztec-packages
644+
path: test-repo
645+
646+
- name: Download nargo binary
647+
uses: actions/download-artifact@v4
648+
with:
649+
name: nargo
650+
path: ./nargo
651+
652+
- name: Set nargo on PATH
653+
run: |
654+
nargo_binary="${{ github.workspace }}/nargo/nargo"
655+
chmod +x $nargo_binary
656+
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
657+
export PATH="$PATH:$(dirname $nargo_binary)"
658+
nargo -V
659+
660+
- name: Remove requirements on compiler version
661+
working-directory: ./test-repo
662+
run: |
663+
# Github actions seems to not expand "**" in globs by default.
664+
shopt -s globstar
665+
sed -i '/^compiler_version/d' ./**/Nargo.toml
666+
667+
- name: Run nargo compile
668+
working-directory: ./test-repo/noir-projects/noir-contracts
669+
run: nargo compile --inliner-aggressiveness 0
670+
671+
upload_critical_library_report:
672+
name: Upload critical library report
673+
needs: [external-repo-checks]
674+
# We want this job to run even if one variation of the matrix in `external-repo-checks` fails
675+
if: always()
676+
runs-on: ubuntu-22.04
677+
permissions:
678+
pull-requests: write
679+
# deployments permission to deploy GitHub pages website
680+
deployments: write
681+
# contents permission to update benchmark contents in gh-pages branch
682+
contents: write
683+
684+
steps:
685+
- uses: actions/checkout@v4
686+
687+
- name: Download matrix test reports
688+
uses: actions/download-artifact@v4
689+
with:
690+
pattern: test_report_*
691+
path: ./reports
692+
693+
- name: Merge test reports using jq
694+
run: |
695+
jq --null-input "{ test_reports: [] }" > test_report.json
696+
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
697+
./merge-bench-reports.sh test_report
698+
jq ".test_reports" < ./test_report.json > test_bench.json
699+
700+
- name: Store benchmark result
701+
continue-on-error: true
702+
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
703+
with:
704+
name: "Test Suite Duration"
705+
tool: "customSmallerIsBetter"
706+
output-file-path: ./test_bench.json
707+
github-token: ${{ secrets.GITHUB_TOKEN }}
708+
# We want this to only run on master to avoid garbage data from PRs being added.
709+
auto-push: ${{ github.ref == 'refs/heads/master' }}
710+
alert-threshold: "120%"
711+
comment-on-alert: true
712+
fail-on-alert: false
713+
alert-comment-cc-users: "@TomAFrench"
714+
max-items-in-chart: 50
715+
716+
613717
# This is a job which depends on all test jobs and reports the overall status.
614718
# This allows us to add/remove test jobs without having to update the required workflows.
615719
tests-end:
@@ -628,6 +732,7 @@ jobs:
628732
- test-integration-node
629733
- test-integration-browser
630734
- test-examples
735+
- compile-noir-contracts
631736

632737
steps:
633738
- name: Report overall success

0 commit comments

Comments
 (0)