Skip to content

Commit

Permalink
Replace deprecated function (#378)
Browse files Browse the repository at this point in the history
since github CI is changing how they want environment variables stored,
I've updated the CI script to reflect these updates.
  • Loading branch information
M3CHR0M4NC3R authored Nov 25, 2024
1 parent 32998df commit ba82444
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/check_compilable_percentage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,23 @@ jobs:
run: |
current_accuracy=$(grep 'Fully successful from minimization to compilation' "$(pwd)/ASHE/logs/specimin_statistics.txt" | awk '{print $NF}' | tr -d '()%')
echo "Current accuracy: $current_accuracy"
echo "::set-output name=current_accuracy::$current_accuracy"
echo "current_accuracy=$current_accuracy" >> $GITHUB_OUTPUT
- name: Read latest run percentage from file
id: read_latest_run_percentage
run: |
if [ -f "$(pwd)/CI_Latest_run_percentage.txt" ]; then
latest_run_accuracy=$(cat "$(pwd)/CI_Latest_run_percentage.txt" | tr -d '()%')
echo "Latest run accuracy: $latest_run_accuracy"
echo "::set-output name=latest_run_accuracy::$latest_run_accuracy"
echo "latest_run_accuracy=$latest_run_accuracy" >> $GITHUB_OUTPUT
else
echo "File CI_Latest_run_percentage.txt does not exist"
exit 1
fi
- name: Validate accuracy
id: validate_accuracy
run: |
current_accuracy="${{ steps.parse_accuracy_percentage.outputs.current_accuracy }}"
latest_run_accuracy="${{ steps.read_latest_run_percentage.outputs.latest_run_accuracy }}"
run: |
if [ "$current_accuracy" != "$latest_run_accuracy" ]; then
echo "Current accuracy ($current_accuracy) does not match latest run accuracy ($latest_run_accuracy)."
exit 1
Expand Down

0 comments on commit ba82444

Please sign in to comment.