From 668f64cffa6a3b9d34cccd65700a6d791cd0759d Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 11:05:32 +0000 Subject: [PATCH 01/15] chore: reduce number of benchmarking scripts --- .github/workflows/test-js-packages.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index b92b2ae2030..8cdc75ed706 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -539,7 +539,7 @@ jobs: TEST_REPORT_NAME=test_report_$NAME echo "test_report_name=$TEST_REPORT_NAME" >> $GITHUB_OUTPUT - jq --null-input "{ test_reports: [{ name: \"$NAME\", value: (\"$TIME\" | tonumber), unit: \"s\" }]}" > $TEST_REPORT_NAME.json + jq --null-input "{ name: \"$NAME\", value: (\"$TIME\" | tonumber), unit: \"s\" }" > $TEST_REPORT_NAME.json if [ ! -s $output_file ]; then # The file is empty so we delete it to signal that `nargo test` failed before it could run any tests @@ -606,8 +606,6 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 - - name: Download matrix test reports uses: actions/download-artifact@v4 with: @@ -616,11 +614,7 @@ jobs: - name: Merge test reports using jq run: | - jq --null-input "{ test_reports: [] }" > test_report.json - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh - ./merge-bench-reports.sh test_report - jq ".test_reports" < ./test_report.json > test_bench.json - + jq --slurp '.' ./reports/*.json > test_bench.json - name: Store benchmark result continue-on-error: true uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29 From 13a82ca6006153061a830a4770edc66fa79636b6 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 11:16:04 +0000 Subject: [PATCH 02/15] . --- .github/workflows/reports.yml | 27 +++++--------------------- .github/workflows/test-js-packages.yml | 1 + test_programs/compilation_report.sh | 6 +++--- test_programs/execution_report.sh | 6 +++--- test_programs/memory_report.sh | 7 ++++--- 5 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 1ac775591a6..477eb180931 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -471,12 +471,11 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 - - name: Download initial compilation report uses: actions/download-artifact@v4 with: name: in_progress_compilation_report + path: ./reports - name: Download matrix compilation reports uses: actions/download-artifact@v4 @@ -486,9 +485,7 @@ jobs: - name: Merge compilation reports using jq run: | - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh - ./merge-bench-reports.sh compilation_report - jq ".compilation_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./compilation_report.json > time_bench.json + jq --slurp '.' ./reports/*.json > time_bench.json - name: Store benchmark result continue-on-error: true @@ -520,8 +517,6 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 - - name: Download initial memory report uses: actions/download-artifact@v4 with: @@ -535,9 +530,7 @@ jobs: - name: Merge memory reports using jq run: | - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh - ./merge-bench-reports.sh memory_report - jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./memory_report.json > memory_bench.json + jq --slurp '.' ./reports/*.json > memory_bench.json - name: Store benchmark result continue-on-error: true @@ -569,8 +562,6 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 - - name: Download initial memory report uses: actions/download-artifact@v4 with: @@ -584,11 +575,7 @@ jobs: - name: Merge memory reports using jq run: | - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh - ./merge-bench-reports.sh memory_report - # Rename the memory report as to not clash with the compilation memory report file name - cp memory_report.json execution_memory_report.json - jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./execution_memory_report.json > memory_bench.json + jq --slurp '.' ./reports/*.json > memory_bench.json - name: Store benchmark result continue-on-error: true @@ -621,8 +608,6 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 - - name: Download initial execution report uses: actions/download-artifact@v4 with: @@ -636,9 +621,7 @@ jobs: - name: Merge execution reports using jq run: | - mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh - ./merge-bench-reports.sh execution_report - jq ".execution_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./execution_report.json > time_bench.json + jq --slurp '.' ./reports/*.json > time_bench.json - name: Store benchmark result continue-on-error: true diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 8cdc75ed706..a5025edd0c8 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -615,6 +615,7 @@ jobs: - name: Merge test reports using jq run: | jq --slurp '.' ./reports/*.json > test_bench.json + - name: Store benchmark result continue-on-error: true uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29 diff --git a/test_programs/compilation_report.sh b/test_programs/compilation_report.sh index 66f1a53626e..1d20cd5ba1d 100755 --- a/test_programs/compilation_report.sh +++ b/test_programs/compilation_report.sh @@ -8,7 +8,7 @@ base_path="$current_dir/execution_success" # Tests to be profiled for compilation report tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression" "global_var_regression_entry_points") -echo "{\"compilation_reports\": [ " > $current_dir/compilation_report.json +echo "[ " > $current_dir/compilation_report.json # If there is an argument that means we want to generate a report for only the current directory if [ "$1" == "1" ]; then @@ -62,7 +62,7 @@ for dir in ${tests_to_profile[@]}; do printf "%.3f\n", 0 }' <<<"${TIMES[@]}") - jq -rc "{artifact_name: \"$PACKAGE_NAME\", time: \""$AVG_TIME"s\"}" --null-input >> $current_dir/compilation_report.json + jq -rc "{name: \"$PACKAGE_NAME\", value: tonumber(\""$AVG_TIME"\"), unit: \"s\"}" --null-input >> $current_dir/compilation_report.json if (($ITER != $NUM_ARTIFACTS)); then echo "," >> $current_dir/compilation_report.json @@ -73,4 +73,4 @@ for dir in ${tests_to_profile[@]}; do ITER=$(( $ITER + 1 )) done -echo "]}" >> $current_dir/compilation_report.json +echo "]" >> $current_dir/compilation_report.json diff --git a/test_programs/execution_report.sh b/test_programs/execution_report.sh index dcdc1bb8879..ed0176473be 100755 --- a/test_programs/execution_report.sh +++ b/test_programs/execution_report.sh @@ -8,7 +8,7 @@ base_path="$current_dir/execution_success" # Tests to be profiled for execution report tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression" "global_var_regression_entry_points") -echo "{\"execution_reports\": [ " > $current_dir/execution_report.json +echo "{[" > $current_dir/execution_report.json # If there is an argument that means we want to generate a report for only the current directory if [ "$1" == "1" ]; then @@ -70,7 +70,7 @@ for dir in ${tests_to_profile[@]}; do printf "%.3f\n", 0 }' <<<"${TIMES[@]}") - jq -rc "{artifact_name: \"$PACKAGE_NAME\", time: \""$AVG_TIME"s\"}" --null-input >> $current_dir/execution_report.json + jq -rc "{name: \"$PACKAGE_NAME\", value: tonumber(\""$AVG_TIME"\"), unit: \"s\"}" --null-input >> $current_dir/execution_report.json if (($ITER != $NUM_ARTIFACTS)); then echo "," >> $current_dir/execution_report.json @@ -81,4 +81,4 @@ for dir in ${tests_to_profile[@]}; do ITER=$(( $ITER + 1 )) done -echo "]}" >> $current_dir/execution_report.json +echo "]" >> $current_dir/execution_report.json diff --git a/test_programs/memory_report.sh b/test_programs/memory_report.sh index 00065fbfb36..72a88cfcc78 100755 --- a/test_programs/memory_report.sh +++ b/test_programs/memory_report.sh @@ -22,7 +22,7 @@ fi FIRST="1" FLAGS=${FLAGS:- ""} -echo "{\"memory_reports\": [ " > memory_report.json +echo "[" > memory_report.json for test_name in ${tests_to_profile[@]}; do cd $base_path/$test_name @@ -57,8 +57,9 @@ for test_name in ${tests_to_profile[@]}; do peak=${consumption:30:len} rm $current_dir/$test_name"_heap_analysis.txt" peak_memory=$($PARSE_MEMORY $peak) - echo -e " {\n \"artifact_name\":\"$test_name\",\n \"peak_memory\":\"$peak_memory\"\n }" >> $current_dir"/memory_report.json" + jq -rc "{name: \"$PACKAGE_NAME\", value: tonumber(\"$peak_memory\"), unit: \"MB\"}" --null-input >> $current_dir/memory_report.json + done -echo "]}" >> $current_dir"/memory_report.json" +echo "]" >> $current_dir"/memory_report.json" From 1a64b9c595df1b93c93a99f7115b234b2225b436 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 11:16:42 +0000 Subject: [PATCH 03/15] . --- .github/scripts/merge-bench-reports.sh | 27 -------------------------- 1 file changed, 27 deletions(-) delete mode 100755 .github/scripts/merge-bench-reports.sh diff --git a/.github/scripts/merge-bench-reports.sh b/.github/scripts/merge-bench-reports.sh deleted file mode 100755 index 23a62874148..00000000000 --- a/.github/scripts/merge-bench-reports.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -eu - -echo "Merging reports" - -REPORT_NAME=$1 -NAME_PLURAL=""$REPORT_NAME"s" - -combined_reports="[]" - -# 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 '[."'"$NAME_PLURAL"'"[]] + '"$combined_reports" <<< "$(cat "$report/$FILE_PATH")") -done - -combined_reports=$(jq '[."'$NAME_PLURAL'"[]] + '"$combined_reports" <<< "$(cat ./$REPORT_NAME.json)") - -# Wrap the merged memory reports into a new object as to keep the $NAME_PLURAL key -final_report="{\"$NAME_PLURAL\": $combined_reports}" - -echo "$final_report" > $REPORT_NAME.json - -cat $REPORT_NAME.json \ No newline at end of file From e530561c2504f875fc517f39c2f8e49f221f8c03 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:17:28 +0000 Subject: [PATCH 04/15] Update test_programs/execution_report.sh --- test_programs/execution_report.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_programs/execution_report.sh b/test_programs/execution_report.sh index ed0176473be..6006b26064e 100755 --- a/test_programs/execution_report.sh +++ b/test_programs/execution_report.sh @@ -8,7 +8,7 @@ base_path="$current_dir/execution_success" # Tests to be profiled for execution report tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression" "global_var_regression_entry_points") -echo "{[" > $current_dir/execution_report.json +echo "[" > $current_dir/execution_report.json # If there is an argument that means we want to generate a report for only the current directory if [ "$1" == "1" ]; then From d35769d5bf40a0186f4e62a7f42e245156f43101 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:24:08 +0000 Subject: [PATCH 05/15] Update reports.yml --- .github/workflows/reports.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 477eb180931..7e66def8a43 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -292,7 +292,7 @@ jobs: sparse-checkout-cone-mode: false - name: Download nargo binary - uses: scripts/.github/actions/download-nargo + uses: ./scripts/.github/actions/download-nargo - name: Checkout uses: actions/checkout@v4 From e5c9f2d64ec2e34950fdb8962e2bda468d4bba9a Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 14:12:07 +0000 Subject: [PATCH 06/15] . --- test_programs/compilation_report.sh | 2 +- test_programs/execution_report.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test_programs/compilation_report.sh b/test_programs/compilation_report.sh index 1d20cd5ba1d..6f7ef254477 100755 --- a/test_programs/compilation_report.sh +++ b/test_programs/compilation_report.sh @@ -62,7 +62,7 @@ for dir in ${tests_to_profile[@]}; do printf "%.3f\n", 0 }' <<<"${TIMES[@]}") - jq -rc "{name: \"$PACKAGE_NAME\", value: tonumber(\""$AVG_TIME"\"), unit: \"s\"}" --null-input >> $current_dir/compilation_report.json + jq -rc "{name: \"$PACKAGE_NAME\", value: \""$AVG_TIME"\" | tonumber, unit: \"s\"}" --null-input >> $current_dir/compilation_report.json if (($ITER != $NUM_ARTIFACTS)); then echo "," >> $current_dir/compilation_report.json diff --git a/test_programs/execution_report.sh b/test_programs/execution_report.sh index 6006b26064e..5c916ef6bd7 100755 --- a/test_programs/execution_report.sh +++ b/test_programs/execution_report.sh @@ -70,7 +70,7 @@ for dir in ${tests_to_profile[@]}; do printf "%.3f\n", 0 }' <<<"${TIMES[@]}") - jq -rc "{name: \"$PACKAGE_NAME\", value: tonumber(\""$AVG_TIME"\"), unit: \"s\"}" --null-input >> $current_dir/execution_report.json + jq -rc "{name: \"$PACKAGE_NAME\", value: \""$AVG_TIME"\" | tonumber, unit: \"s\"}" --null-input >> $current_dir/execution_report.json if (($ITER != $NUM_ARTIFACTS)); then echo "," >> $current_dir/execution_report.json From 8564c5af19aaefcee4638a8d3cf1909767056e29 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 14:28:13 +0000 Subject: [PATCH 07/15] . --- .github/actions/download-nargo/action.yml | 22 +++++++++++----------- .github/workflows/reports.yml | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/download-nargo/action.yml b/.github/actions/download-nargo/action.yml index 49c8b1d0bd8..b727520978a 100644 --- a/.github/actions/download-nargo/action.yml +++ b/.github/actions/download-nargo/action.yml @@ -4,15 +4,15 @@ description: Downloads the nargo binary from an artifact and adds it to the path runs: using: composite steps: - - name: Download nargo binary - uses: actions/download-artifact@v4 - with: - name: nargo - path: ./nargo + - name: Download nargo binary + uses: actions/download-artifact@v4 + with: + name: nargo + path: ./nargo - - name: Set nargo on PATH - shell: bash - run: | - nargo_binary="${{ github.workspace }}/nargo/nargo" - chmod +x $nargo_binary - echo "$(dirname $nargo_binary)" >> $GITHUB_PATH + - name: Set nargo on PATH + shell: bash + run: | + nargo_binary="${{ github.workspace }}/nargo/nargo" + chmod +x $nargo_binary + echo "$(dirname $nargo_binary)" >> $GITHUB_PATH diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 7e66def8a43..3217faaa98e 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -390,7 +390,7 @@ jobs: with: path: scripts sparse-checkout: | - ./.github/actions/download-nargo/action.yml + .github/actions/download-nargo/action.yml test_programs/memory_report.sh test_programs/parse_memory.sh sparse-checkout-cone-mode: false From ca93f5d147577c83598ab9bb908df654a600e507 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 14:30:21 +0000 Subject: [PATCH 08/15] . --- .github/workflows/reports.yml | 8 ++++---- .github/workflows/test-js-packages.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 3217faaa98e..8ab246a0b68 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -485,7 +485,7 @@ jobs: - name: Merge compilation reports using jq run: | - jq --slurp '.' ./reports/*.json > time_bench.json + jq --slurp '.' ./reports/*.json | tee time_bench.json - name: Store benchmark result continue-on-error: true @@ -530,7 +530,7 @@ jobs: - name: Merge memory reports using jq run: | - jq --slurp '.' ./reports/*.json > memory_bench.json + jq --slurp '.' ./reports/*.json | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -575,7 +575,7 @@ jobs: - name: Merge memory reports using jq run: | - jq --slurp '.' ./reports/*.json > memory_bench.json + jq --slurp '.' ./reports/*.json | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -621,7 +621,7 @@ jobs: - name: Merge execution reports using jq run: | - jq --slurp '.' ./reports/*.json > time_bench.json + jq --slurp '.' ./reports/*.json | tee time_bench.json - name: Store benchmark result continue-on-error: true diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index a5025edd0c8..bbce41a422b 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -614,7 +614,7 @@ jobs: - name: Merge test reports using jq run: | - jq --slurp '.' ./reports/*.json > test_bench.json + jq --slurp '.' ./reports/*.json | tee test_bench.json - name: Store benchmark result continue-on-error: true From d46cf830a3ecfa9e141ac8dfdf7cb6b4b12110ed Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 14:42:59 +0000 Subject: [PATCH 09/15] . --- test_programs/memory_report.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_programs/memory_report.sh b/test_programs/memory_report.sh index 72a88cfcc78..f0f6c53d156 100755 --- a/test_programs/memory_report.sh +++ b/test_programs/memory_report.sh @@ -57,7 +57,7 @@ for test_name in ${tests_to_profile[@]}; do peak=${consumption:30:len} rm $current_dir/$test_name"_heap_analysis.txt" peak_memory=$($PARSE_MEMORY $peak) - jq -rc "{name: \"$PACKAGE_NAME\", value: tonumber(\"$peak_memory\"), unit: \"MB\"}" --null-input >> $current_dir/memory_report.json + jq -rc "{name: \"$PACKAGE_NAME\", value: \"$peak_memory\" | tonumber, unit: \"MB\"}" --null-input >> $current_dir/memory_report.json done From cd22268772755cc6dfe25cff8333537c77c6112b Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 5 Feb 2025 14:58:42 +0000 Subject: [PATCH 10/15] . --- .github/workflows/reports.yml | 10 +++++++++- .github/workflows/test-js-packages.yml | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 8ab246a0b68..efddef9b335 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -485,6 +485,8 @@ jobs: - name: Merge compilation reports using jq run: | + # Github actions seems to not expand "**" in globs by default. + shopt -s globstar jq --slurp '.' ./reports/*.json | tee time_bench.json - name: Store benchmark result @@ -530,6 +532,8 @@ jobs: - name: Merge memory reports using jq run: | + # Github actions seems to not expand "**" in globs by default. + shopt -s globstar jq --slurp '.' ./reports/*.json | tee memory_bench.json - name: Store benchmark result @@ -575,6 +579,8 @@ jobs: - name: Merge memory reports using jq run: | + # Github actions seems to not expand "**" in globs by default. + shopt -s globstar jq --slurp '.' ./reports/*.json | tee memory_bench.json - name: Store benchmark result @@ -621,7 +627,9 @@ jobs: - name: Merge execution reports using jq run: | - jq --slurp '.' ./reports/*.json | tee time_bench.json + # Github actions seems to not expand "**" in globs by default. + shopt -s globstar + jq --slurp '.' ./reports/*.json | tee time_bench.json - name: Store benchmark result continue-on-error: true diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index bbce41a422b..a715190732d 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -614,6 +614,8 @@ jobs: - name: Merge test reports using jq run: | + # Github actions seems to not expand "**" in globs by default. + shopt -s globstar jq --slurp '.' ./reports/*.json | tee test_bench.json - name: Store benchmark result From cdbb6f4abc10356dc6b9694892a850afe01d6598 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Thu, 6 Feb 2025 14:10:45 +0000 Subject: [PATCH 11/15] . --- .github/workflows/reports.yml | 8 ++++---- .github/workflows/test-js-packages.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index efddef9b335..4fc17601aea 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -487,7 +487,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '.' ./reports/*.json | tee time_bench.json + jq --slurp '. | flatten[]' ./reports/*.json | tee time_bench.json - name: Store benchmark result continue-on-error: true @@ -534,7 +534,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '.' ./reports/*.json | tee memory_bench.json + jq --slurp '. | flatten[]' ./reports/*.json | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -581,7 +581,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '.' ./reports/*.json | tee memory_bench.json + jq --slurp '. | flatten[]' ./reports/*.json | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -629,7 +629,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '.' ./reports/*.json | tee time_bench.json + jq --slurp '. | flatten[]' ./reports/*.json | tee time_bench.json - name: Store benchmark result continue-on-error: true diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index a715190732d..db183d32593 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -539,7 +539,7 @@ jobs: TEST_REPORT_NAME=test_report_$NAME echo "test_report_name=$TEST_REPORT_NAME" >> $GITHUB_OUTPUT - jq --null-input "{ name: \"$NAME\", value: (\"$TIME\" | tonumber), unit: \"s\" }" > $TEST_REPORT_NAME.json + jq --null-input "[{ name: \"$NAME\", value: (\"$TIME\" | tonumber), unit: \"s\" }]" > $TEST_REPORT_NAME.json if [ ! -s $output_file ]; then # The file is empty so we delete it to signal that `nargo test` failed before it could run any tests @@ -616,7 +616,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '.' ./reports/*.json | tee test_bench.json + jq --slurp '. | flatten[]' ./reports/*.json | tee test_bench.json - name: Store benchmark result continue-on-error: true From 88ea0291f03b273b23e536f1c30e85730a1703a0 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Thu, 6 Feb 2025 14:13:35 +0000 Subject: [PATCH 12/15] . --- .github/workflows/reports.yml | 8 ++++++++ .github/workflows/test-js-packages.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 4fc17601aea..a2d6ae51a84 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -471,6 +471,8 @@ jobs: contents: write steps: + - uses: actions/checkout@v4 + - name: Download initial compilation report uses: actions/download-artifact@v4 with: @@ -519,6 +521,8 @@ jobs: contents: write steps: + - uses: actions/checkout@v4 + - name: Download initial memory report uses: actions/download-artifact@v4 with: @@ -566,6 +570,8 @@ jobs: contents: write steps: + - uses: actions/checkout@v4 + - name: Download initial memory report uses: actions/download-artifact@v4 with: @@ -614,6 +620,8 @@ jobs: contents: write steps: + - uses: actions/checkout@v4 + - name: Download initial execution report uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index db183d32593..ef9fa72909a 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -606,6 +606,8 @@ jobs: contents: write steps: + - uses: actions/checkout@v4 + - name: Download matrix test reports uses: actions/download-artifact@v4 with: From f65febf2653c38b05fb54c87d42572db280efeef Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Thu, 6 Feb 2025 14:27:41 +0000 Subject: [PATCH 13/15] . --- .github/workflows/reports.yml | 8 ++++---- .github/workflows/test-js-packages.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index a2d6ae51a84..12da3dd7f8d 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -489,7 +489,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/*.json | tee time_bench.json + jq --slurp '. | flatten[]' ./reports/* | tee time_bench.json - name: Store benchmark result continue-on-error: true @@ -538,7 +538,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/*.json | tee memory_bench.json + jq --slurp '. | flatten[]' ./reports/* | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -587,7 +587,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/*.json | tee memory_bench.json + jq --slurp '. | flatten[]' ./reports/* | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -637,7 +637,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/*.json | tee time_bench.json + jq --slurp '. | flatten[]' ./reports/* | tee time_bench.json - name: Store benchmark result continue-on-error: true diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index ef9fa72909a..c62b745dd84 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -618,7 +618,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/*.json | tee test_bench.json + jq --slurp '. | flatten[]' ./reports/* | tee test_bench.json - name: Store benchmark result continue-on-error: true From 87d2b429410af35aa1533b832d13f3dbd0100fb8 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Thu, 6 Feb 2025 14:39:30 +0000 Subject: [PATCH 14/15] . --- .github/workflows/reports.yml | 4 ++++ .github/workflows/test-js-packages.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 12da3dd7f8d..ebaf03b91a6 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -484,6 +484,7 @@ jobs: with: pattern: compilation_report_* path: ./reports + merge-multiple: true - name: Merge compilation reports using jq run: | @@ -533,6 +534,7 @@ jobs: with: pattern: compilation_mem_report_* path: ./reports + merge-multiple: true - name: Merge memory reports using jq run: | @@ -582,6 +584,7 @@ jobs: with: pattern: execution_mem_report_* path: ./reports + merge-multiple: true - name: Merge memory reports using jq run: | @@ -632,6 +635,7 @@ jobs: with: pattern: execution_report_* path: ./reports + merge-multiple: true - name: Merge execution reports using jq run: | diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index c62b745dd84..26ff0477487 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -613,6 +613,7 @@ jobs: with: pattern: test_report_* path: ./reports + merge-multiple: true - name: Merge test reports using jq run: | From 83ea35f2270c70c9feaaefcad381509c27cf7bf8 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Thu, 6 Feb 2025 14:54:04 +0000 Subject: [PATCH 15/15] . --- .github/workflows/reports.yml | 8 ++++---- .github/workflows/test-js-packages.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index ebaf03b91a6..3f90b900758 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -490,7 +490,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/* | tee time_bench.json + jq --slurp '. | flatten' ./reports/* | tee time_bench.json - name: Store benchmark result continue-on-error: true @@ -540,7 +540,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/* | tee memory_bench.json + jq --slurp '. | flatten' ./reports/* | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -590,7 +590,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/* | tee memory_bench.json + jq --slurp '. | flatten' ./reports/* | tee memory_bench.json - name: Store benchmark result continue-on-error: true @@ -641,7 +641,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/* | tee time_bench.json + jq --slurp '. | flatten' ./reports/* | tee time_bench.json - name: Store benchmark result continue-on-error: true diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 26ff0477487..c67f6b324ed 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -619,7 +619,7 @@ jobs: run: | # Github actions seems to not expand "**" in globs by default. shopt -s globstar - jq --slurp '. | flatten[]' ./reports/* | tee test_bench.json + jq --slurp '. | flatten' ./reports/* | tee test_bench.json - name: Store benchmark result continue-on-error: true