diff --git a/.github/workflows/build_and_test_pr.yml b/.github/workflows/build_and_test_pr.yml index 3b93a5cc8b0..ca45f2a4230 100644 --- a/.github/workflows/build_and_test_pr.yml +++ b/.github/workflows/build_and_test_pr.yml @@ -65,11 +65,11 @@ jobs: with: python-version: ${{ env.Python_REQUIRED_VERSION }} - - name: Install Dependencies for Mac + - name: Install Dependencies for Mac # gcc13 reinstall may not be needed if: ${{ runner.os == 'macOS' }} run: | brew update - brew install gcc@13 + brew reinstall gcc@13 echo "FC=$(brew --prefix gcc@13)/bin/gfortran-13" >> $GITHUB_ENV echo MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_dev_target }} >> $GITHUB_ENV @@ -174,10 +174,12 @@ jobs: - name: Generate Artifact Summary if: always() && matrix.run_regressions && steps.regressions.outcome == 'failure' + shell: bash run: echo "$(cat ${{ github.workspace }}/regressions/summary.md)" >> $GITHUB_STEP_SUMMARY - name: Store Summary in the Environment if: always() && matrix.run_regressions && steps.regressions.outcome == 'failure' + shell: bash run: echo "R_STUFF=$(cat ${{ github.workspace }}/regressions/summary.md)" >> $GITHUB_ENV - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/debug_coverage.yml b/.github/workflows/debug_coverage.yml index 9f74202f2ca..e8766c2ab71 100644 --- a/.github/workflows/debug_coverage.yml +++ b/.github/workflows/debug_coverage.yml @@ -59,32 +59,66 @@ jobs: working-directory: ./build run: cmake --build . -j 4 - - name: Run Tests + - name: Run Unit Tests working-directory: ./build - run: ctest -E "integration.*" # unit tests only while we figure out runtime issues -E Basement -j 4 + run: ctest -E "integration.*" - - name: Generate Raw Coverage Results + - name: Generate Raw Unit Test Coverage Results working-directory: ./build run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus/ - - name: Generate Filtered Coverage Results + - name: Generate Filtered Unit Test Coverage Results working-directory: ./build run: lcov -r ./lcov.output -o lcov.output.filtered - - name: Generate HTML Coverage Results + - name: Generate HTML Unit Test Coverage Results working-directory: ./build run: genhtml ./lcov.output.filtered -o lcov-html --demangle-cpp --function-coverage | tee cover.txt - - name: Process Coverage Summary + - name: Process Unit Test Coverage Summary working-directory: ./build run: python ${{ github.workspace }}/scripts/dev/gha_coverage_summary.py - - name: Generate Artifact Summary + - name: Generate Unit Test Artifact Summary run: echo "$(cat ${{ github.workspace }}/build/cover.md)" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 with: - name: "coverage_results" + name: "unit_test_coverage_results" path: "${{ github.workspace }}/build/lcov-html" - # TODO: Check coverage amount and decide if we fail or not, could also comment on PR if low + - name: Clean Test Coverage + working-directory: ./build + run: | + find . -name "*.gcda" -type f -delete + rm lcov.output + rm lcov.output.filtered + rm -rf lcov-html + + - name: Run Integration Tests + working-directory: ./build + run: ctest -R "integration.*" + + - name: Generate Raw Integration Test Coverage Results + working-directory: ./build + run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus/ + + - name: Generate Filtered Integration Test Coverage Results + working-directory: ./build + run: lcov -r ./lcov.output -o lcov.output.filtered + + - name: Generate HTML Integration Test Coverage Results + working-directory: ./build + run: genhtml ./lcov.output.filtered -o lcov-html --demangle-cpp --function-coverage | tee cover.txt + + - name: Process Integration Test Coverage Summary + working-directory: ./build + run: python ${{ github.workspace }}/scripts/dev/gha_coverage_summary.py + + - name: Generate Integration Test Artifact Summary + run: echo "$(cat ${{ github.workspace }}/build/cover.md)" >> $GITHUB_STEP_SUMMARY + + - uses: actions/upload-artifact@v4 + with: + name: "integration_test_coverage_results" + path: "${{ github.workspace }}/build/lcov-html"