Skip to content

Commit

Permalink
changed variable names in ci script to be more clear, added steps to …
Browse files Browse the repository at this point in the history
…output resultsto github
  • Loading branch information
M3CHR0M4NC3R committed Nov 13, 2024
1 parent ac49fbe commit 8ead209
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/check_compilable_percentage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,34 +98,46 @@ jobs:
$(pwd)/CI_repository_list.csv \
$(pwd)/ASHE/CI_REPO_CLONE_SPACE \
$(pwd)/ASHE/src/main/resources/config.properties
- name: Translate results
run: |
python3 ashe_scripts/specimin_get_run_results.py ASHE/logs/app.log
cat ASHE/logs/app.log
- name: Show only successful minimizations
run: |
grep 'full_success' ASHE/logs/specimin_run_results.txt
- name: Show only failed minimizations
run: |
grep 'failed_minimization' ASHE/logs/specimin_run_results.txt
- name: Show only failed compilations
run: |
grep 'failed_compilation' ASHE/logs/specimin_run_results.txt
- name: Parse accuracy percentage
id: parse_accuracy_percentage
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"
current_run_accuracy=$(grep 'Fully successful from minimization to compilation' "$(pwd)/ASHE/logs/specimin_statistics.txt" | awk '{print $NF}' | tr -d '()%')
echo "Current run accuracy: $current_run_accuracy"
echo "::set-output name=current_run_accuracy::$current_run_accuracy"
- name: Read latest run percentage from file
id: read_latest_run_percentage
id: constant_saved_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"
if [ -f "$(pwd)/CI_constant_saved_run_percentage" ]; then
constant_saved_run_percentage=$(cat "$(pwd)/CI_constant_saved_run_percentage" | tr -d '()%')
echo "Constant saved run accuracy: $constant_saved_run_percentage"
echo "::set-output name=constant_saved_run_percentage::$latest_run_accuracy"
else
echo "File CI_Latest_run_percentage.txt does not exist"
echo "File CI_constant_saved_run_percentage 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 }}"
current_run_accuracy="${{ steps.parse_accuracy_percentage.outputs.current_run_accuracy }}"
constant_saved_run_percentage="${{ steps.constant_saved_run_percentage.outputs.latest_run_accuracy }}"
if [ "$current_accuracy" != "$latest_run_accuracy" ]; then
echo "Current accuracy ($current_accuracy) does not match latest run accuracy ($latest_run_accuracy)."
if [ "$current_run_accuracy" != "$constant_saved_run_percentage" ]; then
echo "Current accuracy ($current_run_accuracy) does not match latest run accuracy ($constant_saved_run_percentage)."
exit 1
else
echo "Accuracy validation passed."
Expand Down

0 comments on commit 8ead209

Please sign in to comment.