diff --git a/.github/workflows/debug_coverage.yml b/.github/workflows/debug_coverage.yml index e8766c2ab71..f550815390f 100644 --- a/.github/workflows/debug_coverage.yml +++ b/.github/workflows/debug_coverage.yml @@ -86,39 +86,3 @@ jobs: with: name: "unit_test_coverage_results" path: "${{ github.workspace }}/build/lcov-html" - - - 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" diff --git a/.github/workflows/debug_integration.yml b/.github/workflows/debug_integration.yml new file mode 100644 index 00000000000..2da6a5eb862 --- /dev/null +++ b/.github/workflows/debug_integration.yml @@ -0,0 +1,63 @@ +name: Debug Build with Coverage + +on: + pull_request: + branches: [ develop ] # run this on any PR pointing to develop + push: + branches: [ develop ] # also run this on any commit to develop + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FC: gfortran-13 + Python_REQUIRED_VERSION: 3.12.3 # 3.12.2 not available on Ubuntu 24 GHA + shell: bash + +jobs: + run_debug_coverage: + runs-on: ubuntu-24.04 + permissions: + pull-requests: write + steps: + + - name: Set up Python ${{ env.Python_REQUIRED_VERSION }} + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.Python_REQUIRED_VERSION }} + + - name: Install Dependencies for Linux + run: | + sudo apt-get update + sudo apt-get install libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev lcov gcovr + # https://github.com/actions/runner-images/issues/10025 + echo "FC=gfortran-13" >> $GITHUB_ENV + + - uses: actions/checkout@v4 + + - name: Create Build Directory + run: cmake -E make_directory ./build/ + + - name: Configure CMake + working-directory: ./build + run: > + cmake + -G "Unix Makefiles" + -DCMAKE_BUILD_TYPE:STRING=Debug + -DLINK_WITH_PYTHON:BOOL=ON + -DPython_REQUIRED_VERSION:STRING=${{ steps.setup-python.outputs.python-version }} + -DPython_ROOT_DIR:PATH=$RUNNER_TOOL_CACHE/Python/${{ steps.setup-python.outputs.python-version }}/x64/ + -DBUILD_TESTING:BOOL=ON + -DBUILD_FORTRAN:BOOL=ON + -DBUILD_PACKAGE:BOOL=OFF + -DDOCUMENTATION_BUILD:STRING=DoNotBuild + -DENABLE_OPENMP:BOOL=OFF + -DUSE_OpenMP:BOOL=OFF + ../ + + - name: Build + working-directory: ./build + run: cmake --build . -j 4 + + - name: Run Integration Tests + working-directory: ./build + run: ctest -R "integration.*"