Skip to content

Commit

Permalink
ci: Fix cycle regression checker (#188)
Browse files Browse the repository at this point in the history
* ci: Fix cycle regression checker

* Test workflow

* Prep for review
  • Loading branch information
samuelburnham authored and tchataigner committed Sep 27, 2024
1 parent 91f0f94 commit 48dd311
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
for test_name in ${{ env.TESTS }}; do
cargo nextest run --verbose --release --profile ci ${{ env.FEATURES }} --package ${{ matrix.package }}-lc --no-capture -E "test($test_name)" 2>&1 | tee out.txt
num_cycles=$(cat out.txt | grep -o 'finished execution clk = [0-9]\+' | awk -F'= ' '{ print $2 }')
num_cycles=$(cat out.txt | grep -o 'summary: cycles=[0-9]\+' | awk -F'=' '{ print $2 }')
CYCLE_COUNTS=$(echo $CYCLE_COUNTS | jq -c ". += [{\"${test_name}\": \"$num_cycles\"}]")
done
Expand All @@ -250,10 +250,9 @@ jobs:
REGRESSION="false"
set -o pipefail
# TODO: Remove hardcoded test names
for test_name in ${{ env.TESTS }}; do
cargo nextest run --verbose --release --profile ci ${{ env.FEATURES }} --package ${{ matrix.package }}-lc --no-capture -E "test($test_name)" 2>&1 | tee out.txt
num_cycles_base=$(cat out.txt | grep -o 'finished execution clk = [0-9]\+' | awk -F'= ' '{ print $2 }')
num_cycles_base=$(cat out.txt | grep -o 'summary: cycles=[0-9]\+' | awk -F'=' '{ print $2 }')
num_cycles_pr=$(echo "$CYCLE_COUNTS" | jq ".[$counter] | to_entries | .[0].value")
echo "$test_name summary"
echo "Base = $num_cycles_base cycles, PR = ${num_cycles_pr:1:-1} cycles"
Expand Down

0 comments on commit 48dd311

Please sign in to comment.