Skip to content

Commit

Permalink
chore(ci): Unify compilation/execution report jobs that take averages…
Browse files Browse the repository at this point in the history
… with single runs (#7048)
  • Loading branch information
vezenovm authored Jan 13, 2025
1 parent c3f8a46 commit 1e64f8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 44 deletions.
45 changes: 13 additions & 32 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,17 @@ jobs:
matrix:
include:
# - project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-contracts, is_library: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-private, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-public, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-merge, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner, num_runs: 5 }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail, num_runs: 5 }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset, num_runs: 5 }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-private, num_runs: 5 }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-public, num_runs: 5 }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-merge, num_runs: 5 }
#- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-empty }
#- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-single-tx }
#- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-merge, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-root, take_average: true }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-merge, num_runs: 5 }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-root, num_runs: 5 }

name: External repo compilation and execution reports - ${{ matrix.project.repo }}/${{ matrix.project.path }}
steps:
Expand Down Expand Up @@ -344,41 +344,22 @@ jobs:
path: test-repo
ref: ${{ matrix.project.ref }}

- name: Generate compilation report without averages
- name: Generate compilation report
working-directory: ./test-repo/${{ matrix.project.path }}
if: ${{ !matrix.project.take_average }}
run: |
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
touch parse_time.sh
chmod +x parse_time.sh
cp /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
./compilation_report.sh 1
- name: Generate compilation report with averages
working-directory: ./test-repo/${{ matrix.project.path }}
if: ${{ matrix.project.take_average }}
run: |
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
touch parse_time.sh
chmod +x parse_time.sh
cp /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
./compilation_report.sh 1 1
./compilation_report.sh 1 ${{ matrix.project.num_runs }}
- name: Generate execution report without averages
- name: Generate execution report
working-directory: ./test-repo/${{ matrix.project.path }}
if: ${{ !matrix.project.is_library && !matrix.project.take_average }}
run: |
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
mv /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
./execution_report.sh 1
- name: Generate execution report with averages
working-directory: ./test-repo/${{ matrix.project.path }}
if: ${{ !matrix.project.is_library && matrix.project.take_average }}
if: ${{ !matrix.project.is_library }}
run: |
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
mv /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
./execution_report.sh 1 1
./execution_report.sh 1 ${{ matrix.project.num_runs }}
- name: Move compilation report
id: compilation_report
Expand Down
8 changes: 1 addition & 7 deletions test_programs/compilation_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,9 @@ for dir in ${tests_to_profile[@]}; do
PACKAGE_NAME=$(basename $current_dir)
fi

NUM_RUNS=1
NUM_RUNS=$2
TOTAL_TIME=0

# Passing a second argument will take an average of five runs
# rather than
if [ "$2" == "1" ]; then
NUM_RUNS=5
fi

for ((i = 1; i <= NUM_RUNS; i++)); do
NOIR_LOG=trace NARGO_LOG_DIR=./tmp nargo compile --force --silence-warnings
done
Expand Down
6 changes: 1 addition & 5 deletions test_programs/execution_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ for dir in ${tests_to_profile[@]}; do
fi


NUM_RUNS=1
NUM_RUNS=$2
TOTAL_TIME=0

if [ "$2" == "1" ]; then
NUM_RUNS=5
fi

for ((i = 1; i <= NUM_RUNS; i++)); do
NOIR_LOG=trace NARGO_LOG_DIR=./tmp nargo execute --silence-warnings
Expand Down

0 comments on commit 1e64f8a

Please sign in to comment.