diff --git a/.github/workflows/check_compilable_percentage.yml b/.github/workflows/check_compilable_percentage.yml index 35d2e7eb..a3a9494a 100644 --- a/.github/workflows/check_compilable_percentage.yml +++ b/.github/workflows/check_compilable_percentage.yml @@ -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."