Skip to content

Commit

Permalink
Try fixing windows; add integration coverage back
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Aug 28, 2024
1 parent 5c29a53 commit c064c30
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_and_test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
52 changes: 43 additions & 9 deletions .github/workflows/debug_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit c064c30

Please sign in to comment.