From b98c0c0ec52897f0c934e7ff92fd92b81a539648 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 12:32:37 -0500 Subject: [PATCH 01/15] Add RelWithDebugInfo build type to action and enable it --- .../actions/configure-and-build/action.yml | 7 +- .github/workflows/test_pull_request_debug.yml | 78 +++++++++++++++++++ 2 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test_pull_request_debug.yml diff --git a/.github/actions/configure-and-build/action.yml b/.github/actions/configure-and-build/action.yml index 45722c54865..76db420ad64 100644 --- a/.github/actions/configure-and-build/action.yml +++ b/.github/actions/configure-and-build/action.yml @@ -17,6 +17,9 @@ inputs: enable-pch: description: "Turn on ENABLE_PCH to have pre-compiled headers. Pass ON or OFF" default: "OFF" + build-type: + description: "The CMake build type to use, which will default to release" + default: "Release" runs: using: "composite" @@ -50,7 +53,7 @@ runs: cmake ` -G Ninja ` -DENABLE_PCH:BOOL=${{ inputs.enable-pch }} ` - -DCMAKE_BUILD_TYPE:STRING=Release ` + -DCMAKE_BUILD_TYPE:STRING=${{ inputs.build-type }} ` -DLINK_WITH_PYTHON:BOOL=ON ` -DPYTHON_CLI:BOOL=ON ` -DPython_REQUIRED_VERSION:STRING=${{ inputs.python-version }} ` @@ -91,7 +94,7 @@ runs: cmake \ -G Ninja \ -DENABLE_PCH:BOOL=${{ inputs.enable-pch }} \ - -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_BUILD_TYPE:STRING=${{ inputs.build-type }} \ -DLINK_WITH_PYTHON:BOOL=ON \ -DPYTHON_CLI:BOOL=ON \ -DPython_REQUIRED_VERSION:STRING=${{ inputs.python-version }} \ diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml new file mode 100644 index 00000000000..73e18387572 --- /dev/null +++ b/.github/workflows/test_pull_request_debug.yml @@ -0,0 +1,78 @@ +name: Debug Build and Test + +on: + pull_request: + branches: [ 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 + python-arch: x64 + os: ubuntu-24.04 + +jobs: + build_and_test: + name: Debug Testing + runs-on: ${{ env.os }} + permissions: + pull-requests: write + + steps: + + - uses: actions/checkout@v5 + + - name: Setup System + id: setup-runner + uses: ./.github/actions/setup-runner + with: + python-version: ${{ env.Python_REQUIRED_VERSION }} + python-arch: ${{ env.python-arch }} + + - name: Create Build Directory + shell: bash + run: cmake -E make_directory ./build/ + + - name: Install problem matcher + shell: bash + run: echo "::add-matcher::./.github/workflows/cpp-problem-matcher.json" + + - name: Configure and Build + id: branch_build + uses: ./.github/actions/configure-and-build + with: + enable-pch: ${{ env.ENABLE_PCH }} + minimal-targets: true + build-directory: ./build + nproc: ${{ steps.setup-runner.outputs.nproc }} + python-version: ${{ env.Python_REQUIRED_VERSION }} + python-root-dir: ${{ steps.setup-runner.outputs.python-root-dir }} + build-type: RelWithDebInfo + + - name: Remove problem matcher + shell: bash + run: echo "::remove-matcher owner=gcc-problem-matcher::" + + - name: Run Tests + working-directory: ./build + shell: bash + run: | + begin_group() { echo -e "::group::\033[93m$1\033[0m"; } + + Color_Off='\033[0m' # Text Reset + + # Regular Colors + Red='\033[0;31m' + Green='\033[0;32m' + + begin_group "Running CTests" + if ctest -j ${{ env.NPROC }}; then + echo "::endgroup::" + echo -e "✅ ${Green}All tests passed${Color_Off}" + else + echo "::endgroup::" + echo -e "❌ ${Red}Some Tests Failed${Color_Off}" + begin_group "Re-running failed tests verbosely..." + ctest --rerun-failed -VV + echo "::endgroup::" + fi; From 83e4c3042109d8c26a246afbbb8edf7d9cb59694 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 12:32:58 -0500 Subject: [PATCH 02/15] Remove Decent CI config files --- .decent_ci-Linux.yaml | 38 -------------------------------------- .decent_ci-Windows.yaml | 6 ------ .decent_ci.yaml | 12 ------------ 3 files changed, 56 deletions(-) delete mode 100644 .decent_ci-Linux.yaml delete mode 100644 .decent_ci-Windows.yaml delete mode 100644 .decent_ci.yaml diff --git a/.decent_ci-Linux.yaml b/.decent_ci-Linux.yaml deleted file mode 100644 index 2449f9e873f..00000000000 --- a/.decent_ci-Linux.yaml +++ /dev/null @@ -1,38 +0,0 @@ -compilers: - - name: "gcc" - version: "13.3" - cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -DPYTHON_CLI:BOOL=OFF -DPython_REQUIRED_VERSION:STRING=3.12.2 -DPython_ROOT_DIR:PATH=~/.pyenv/versions/3.12.2/ -DBUILD_FORTRAN:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DBUILD_PERFORMANCE_TESTS:BOOL=ON -DVALGRIND_ANALYZE_PERFORMANCE_TESTS:BOOL=ON -DENABLE_PCH:BOOL=OFF - collect_performance_results: true - skip_regression: true - s3_upload_bucket: energyplus - num_parallel_builds: 16 - - - name: "gcc" - version: "13.3" - build_type: RelWithDebInfo - cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -DPYTHON_CLI:BOOL=OFF -DPython_REQUIRED_VERSION:STRING=3.12.2 -DPython_ROOT_DIR:PATH=~/.pyenv/versions/3.12.2/ -DBUILD_FORTRAN:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA:STRING=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DENABLE_PCH:BOOL=OFF -DFORCE_DEBUG_ARITHM_GCC_OR_CLANG:BOOL=ON - coverage_enabled: true - coverage_base_dir: src/EnergyPlus - coverage_pass_limit: 41.0 - coverage_warn_limit: 40.0 - coverage_s3_bucket: energyplus - build_tag: UnitTestsCoverage - ctest_filter: -E "integration.*" - skip_regression: true - skip_packaging: true - num_parallel_builds: 14 - - - name: "gcc" - version: "13.3" - build_type: RelWithDebInfo - cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -DPYTHON_CLI:BOOL=OFF -DPython_REQUIRED_VERSION:STRING=3.12.2 -DPython_ROOT_DIR:PATH=~/.pyenv/versions/3.12.2/ -DBUILD_FORTRAN:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA:STRING=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DENABLE_PCH:BOOL=OFF -DFORCE_DEBUG_ARITHM_GCC_OR_CLANG:BOOL=ON - coverage_enabled: true - coverage_base_dir: src/EnergyPlus - coverage_pass_limit: 66.0 - coverage_warn_limit: 67.0 - coverage_s3_bucket: energyplus - build_tag: IntegrationCoverage - ctest_filter: -R "integration.*" - skip_regression: true - skip_packaging: true - num_parallel_builds: 14 diff --git a/.decent_ci-Windows.yaml b/.decent_ci-Windows.yaml deleted file mode 100644 index 0d6b529304d..00000000000 --- a/.decent_ci-Windows.yaml +++ /dev/null @@ -1,6 +0,0 @@ -compilers: - - name: Visual Studio - version: 16 - architecture: Win64 - cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_TESTING:BOOL=ON -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DLINK_WITH_PYTHON=ON -DPYTHON_CLI:BOOL=OFF -DPython_EXECUTABLE:PATH=C:/Users/elee/AppData/Local/Programs/Python/Python312/python.exe - skip_regression: true diff --git a/.decent_ci.yaml b/.decent_ci.yaml deleted file mode 100644 index a80d9aee629..00000000000 --- a/.decent_ci.yaml +++ /dev/null @@ -1,12 +0,0 @@ -results_repository : Myoldmopar/EnergyPlusBuildResults -results_path : _posts -results_base_url : https://myoldmopar.github.io/EnergyPlusBuildResults -regression_repository : NREL/EnergyPlusRegressionTool -regression_branch : main # this is the branch of NREL/EnergyPlusRegressionTool to use (usually main) -regression_baseline_default : develop # this is the NREL/EnergyPlus branch to use as the baseline for regressions -regression_baseline_develop : "" -regression_baseline_master : "" -notification_recipients: - - myoldmopar -aging_pull_requests_notification: true -aging_pull_requests_numdays: 28 From b0c29aee7e449cd682bcf6af553b630ac6ddef85 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 12:39:30 -0500 Subject: [PATCH 03/15] Adding more config vars to the configure-and-build action, adding upterm to debug --- .github/actions/configure-and-build/action.yml | 12 ++++++++++-- .github/workflows/test_pull_request_debug.yml | 7 ++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/actions/configure-and-build/action.yml b/.github/actions/configure-and-build/action.yml index 76db420ad64..5a23d11e785 100644 --- a/.github/actions/configure-and-build/action.yml +++ b/.github/actions/configure-and-build/action.yml @@ -20,6 +20,12 @@ inputs: build-type: description: "The CMake build type to use, which will default to release" default: "Release" + enable-coverage: + description: "Turn this on to set the ENABLE_COVERAGE CMake variable to ON. Pass ON or OFF." + default: "OFF" + build-python-cli: + description: "Turn on the PYTHON_CLI build configuration. Pass ON or OFF." + default: "ON" runs: using: "composite" @@ -55,7 +61,8 @@ runs: -DENABLE_PCH:BOOL=${{ inputs.enable-pch }} ` -DCMAKE_BUILD_TYPE:STRING=${{ inputs.build-type }} ` -DLINK_WITH_PYTHON:BOOL=ON ` - -DPYTHON_CLI:BOOL=ON ` + -DPYTHON_CLI:BOOL=${{ inputs.build-python-cli }} ` + -DENABLE_COVERAGE:BOOL=${{ inputs.enable-coverage }} ` -DPython_REQUIRED_VERSION:STRING=${{ inputs.python-version }} ` -DPython_ROOT_DIR:PATH=${{ inputs.python-root-dir }} ` -DBUILD_TESTING:BOOL=ON ` @@ -96,7 +103,8 @@ runs: -DENABLE_PCH:BOOL=${{ inputs.enable-pch }} \ -DCMAKE_BUILD_TYPE:STRING=${{ inputs.build-type }} \ -DLINK_WITH_PYTHON:BOOL=ON \ - -DPYTHON_CLI:BOOL=ON \ + -DPYTHON_CLI:BOOL=${{ inputs.build-python-cli }} \ + -DENABLE_COVERAGE:BOOL=${{ inputs.enable-coverage }} \ -DPython_REQUIRED_VERSION:STRING=${{ inputs.python-version }} \ -DPython_ROOT_DIR:PATH=${{ inputs.python-root-dir }} \ -DBUILD_TESTING:BOOL=ON \ diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index 73e18387572..836fe3a25dd 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -47,7 +47,9 @@ jobs: nproc: ${{ steps.setup-runner.outputs.nproc }} python-version: ${{ env.Python_REQUIRED_VERSION }} python-root-dir: ${{ steps.setup-runner.outputs.python-root-dir }} - build-type: RelWithDebInfo + build-type: "RelWithDebInfo" + enable-coverage: "ON" + build-python-cli: "OFF" - name: Remove problem matcher shell: bash @@ -76,3 +78,6 @@ jobs: ctest --rerun-failed -VV echo "::endgroup::" fi; + + - name: Setup upterm session + uses: owenthereal/action-upterm@v1 From fb078aa26311d1f7f381fa7640512845a6ff9157 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 12:42:18 -0500 Subject: [PATCH 04/15] I guess env cannot be in the runs-on tag --- .github/workflows/test_pull_request_debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index 836fe3a25dd..aa7d893f317 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -14,7 +14,7 @@ env: jobs: build_and_test: name: Debug Testing - runs-on: ${{ env.os }} + runs-on: ubuntu-24.04 permissions: pull-requests: write From ce85e180f059c7c8055c4bd39514413d163e8c31 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 12:42:52 -0500 Subject: [PATCH 05/15] Temporarily disable the other PR workflows --- .../{test_pull_requests.yml => test_pull_requests.unused} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test_pull_requests.yml => test_pull_requests.unused} (100%) diff --git a/.github/workflows/test_pull_requests.yml b/.github/workflows/test_pull_requests.unused similarity index 100% rename from .github/workflows/test_pull_requests.yml rename to .github/workflows/test_pull_requests.unused From a2905c8c810e2188f33aa54f094d430b8c0e361d Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 15:14:53 -0500 Subject: [PATCH 06/15] Install coverage tools, generate html, turn on non-minimal build --- .github/workflows/test_pull_request_debug.yml | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index aa7d893f317..c51cd9bbeb5 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -29,6 +29,10 @@ jobs: python-version: ${{ env.Python_REQUIRED_VERSION }} python-arch: ${{ env.python-arch }} + - name: Install coverage tools + shell: bash + run: sudo apt-get update && sudo apt-get install lcov gcovr + - name: Create Build Directory shell: bash run: cmake -E make_directory ./build/ @@ -42,7 +46,7 @@ jobs: uses: ./.github/actions/configure-and-build with: enable-pch: ${{ env.ENABLE_PCH }} - minimal-targets: true + minimal-targets: false build-directory: ./build nproc: ${{ steps.setup-runner.outputs.nproc }} python-version: ${{ env.Python_REQUIRED_VERSION }} @@ -79,5 +83,21 @@ jobs: echo "::endgroup::" fi; + - name: Prepare Coverage Results + shell: bash + working-directory: ./build + run: lcov --capture --directory ../src/EnergyPlus/CMakeFiles/energypluslib.dir/ --output-file coverage.info + + - name: Generate HTML Coverage Package + shell: bash + working-directory: ./build + run: genhtml coverage.info --output-directory out + + - name: Upload folder as artifact + uses: actions/upload-artifact@v4 + with: + name: coverage-results + path: ./build/out + - name: Setup upterm session uses: owenthereal/action-upterm@v1 From 293d6b97ab656897978c6c6f0cfc4eec399e131e Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 17:45:58 -0500 Subject: [PATCH 07/15] So close; adjusting path for lcov and moving upterm for debugging --- .github/workflows/test_pull_request_debug.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index c51cd9bbeb5..d36196bf040 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -83,10 +83,13 @@ jobs: echo "::endgroup::" fi; + - name: Setup upterm session + uses: owenthereal/action-upterm@v1 + - name: Prepare Coverage Results shell: bash working-directory: ./build - run: lcov --capture --directory ../src/EnergyPlus/CMakeFiles/energypluslib.dir/ --output-file coverage.info + run: lcov --capture --directory ./src/EnergyPlus/CMakeFiles/energypluslib.dir/ --output-file coverage.info - name: Generate HTML Coverage Package shell: bash @@ -98,6 +101,3 @@ jobs: with: name: coverage-results path: ./build/out - - - name: Setup upterm session - uses: owenthereal/action-upterm@v1 From fc82953acfbfd526c5895626970ac9c123e36f98 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sat, 6 Sep 2025 21:55:16 -0500 Subject: [PATCH 08/15] Turn off upterm, try cleaning up coverage results --- .github/workflows/test_pull_request_debug.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index d36196bf040..0b583581f2c 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -83,21 +83,26 @@ jobs: echo "::endgroup::" fi; - - name: Setup upterm session - uses: owenthereal/action-upterm@v1 +# - name: Setup upterm session +# uses: owenthereal/action-upterm@v1 - - name: Prepare Coverage Results + - name: Prepare Initial Coverage Results shell: bash working-directory: ./build - run: lcov --capture --directory ./src/EnergyPlus/CMakeFiles/energypluslib.dir/ --output-file coverage.info + run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus + + - name: Clean up Coverage Results + shell: bash + working-directory: ./build + run: lcov -r ./lcov.output `pwd`/\* -o ./lcov.output.filtered - name: Generate HTML Coverage Package shell: bash working-directory: ./build - run: genhtml coverage.info --output-directory out + run: genhtml ./lcov.output.filtered -o lcov-html --demangle-cpp --function-coverage - name: Upload folder as artifact uses: actions/upload-artifact@v4 with: name: coverage-results - path: ./build/out + path: ./build/lcov-html From 807c72a1151df3e40ac74d740ffaa8e62dc4a814 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sun, 7 Sep 2025 07:39:58 -0500 Subject: [PATCH 09/15] Try adding a bit more error handling for lcov and genhtml --- .github/workflows/test_pull_request_debug.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index 0b583581f2c..53a3f763c99 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -89,17 +89,17 @@ jobs: - name: Prepare Initial Coverage Results shell: bash working-directory: ./build - run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus + run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus -–ignore-errors source - name: Clean up Coverage Results shell: bash working-directory: ./build - run: lcov -r ./lcov.output `pwd`/\* -o ./lcov.output.filtered + run: lcov -r ./lcov.output `pwd`/\* -o ./lcov.output.filtered -–ignore-errors source - name: Generate HTML Coverage Package shell: bash working-directory: ./build - run: genhtml ./lcov.output.filtered -o lcov-html --demangle-cpp --function-coverage + run: genhtml ./lcov.output.filtered -o lcov-html --demangle-cpp --function-coverage --synthesize-missing - name: Upload folder as artifact uses: actions/upload-artifact@v4 From fd22dc397ab45512701b2ab7f0b17e7bf5c94e30 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Sun, 7 Sep 2025 10:57:21 -0500 Subject: [PATCH 10/15] Update test_pull_request_debug.yml --- .github/workflows/test_pull_request_debug.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index 53a3f763c99..f460c6c4bbf 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -89,12 +89,12 @@ jobs: - name: Prepare Initial Coverage Results shell: bash working-directory: ./build - run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus -–ignore-errors source + run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus --ignore-errors source - name: Clean up Coverage Results shell: bash working-directory: ./build - run: lcov -r ./lcov.output `pwd`/\* -o ./lcov.output.filtered -–ignore-errors source + run: lcov -r ./lcov.output `pwd`/\* -o ./lcov.output.filtered --ignore-errors source - name: Generate HTML Coverage Package shell: bash From 31493f31e7d5d4daa4c3c8e6ab952e9458fbc2af Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 9 Sep 2025 14:44:14 -0600 Subject: [PATCH 11/15] Trimmed down test test with upterm enabled --- .github/workflows/test_pull_request_debug.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index f460c6c4bbf..af136503ede 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -72,7 +72,7 @@ jobs: Green='\033[0;32m' begin_group "Running CTests" - if ctest -j ${{ env.NPROC }}; then + if ctest -j ${{ env.NPROC }} -R 1ZoneUncontrolled; then echo "::endgroup::" echo -e "✅ ${Green}All tests passed${Color_Off}" else @@ -83,8 +83,8 @@ jobs: echo "::endgroup::" fi; -# - name: Setup upterm session -# uses: owenthereal/action-upterm@v1 + - name: Setup upterm session + uses: owenthereal/action-upterm@v1 - name: Prepare Initial Coverage Results shell: bash From f76c72ff547734d5a3567d1e813227d127b273e6 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 12 Sep 2025 11:57:30 -0500 Subject: [PATCH 12/15] Dumb attempt, I know jmarrec has a better option --- .github/workflows/test_pull_request_debug.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index af136503ede..fcfa1c63955 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -83,23 +83,29 @@ jobs: echo "::endgroup::" fi; - - name: Setup upterm session - uses: owenthereal/action-upterm@v1 +# - name: Setup upterm session +# uses: owenthereal/action-upterm@v1 - name: Prepare Initial Coverage Results shell: bash working-directory: ./build - run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus --ignore-errors source + run: lcov -c -d . -o lcov.raw.info --base-directory ../src/EnergyPlus --ignore-errors source,mismatch + #run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus --ignore-errors source + + - name: Why does it have src/src/? + shell: bash + working-directory: ./build + run: sed -i 's#/src/src/#/src/#g' lcov.raw.info - name: Clean up Coverage Results shell: bash working-directory: ./build - run: lcov -r ./lcov.output `pwd`/\* -o ./lcov.output.filtered --ignore-errors source + run: lcov -e lcov.raw.info "*/EnergyPlus/src/EnergyPlus/*" -o lcov.filtered.info - name: Generate HTML Coverage Package shell: bash working-directory: ./build - run: genhtml ./lcov.output.filtered -o lcov-html --demangle-cpp --function-coverage --synthesize-missing + run: genhtml lcov.filtered.info -o lcov-html --title "EnergyPlus Coverage" --synthesize-missing --ignore-errors source - name: Upload folder as artifact uses: actions/upload-artifact@v4 From ec27e3ec1da43dcffb1c577a472305c93152a91d Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 12 Sep 2025 14:11:03 -0500 Subject: [PATCH 13/15] Turn on most test cases, but disable the top 15 or so longest running ones --- .github/workflows/test_pull_request_debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index fcfa1c63955..de4d72c03d0 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -72,7 +72,7 @@ jobs: Green='\033[0;32m' begin_group "Running CTests" - if ctest -j ${{ env.NPROC }} -R 1ZoneUncontrolled; then + if ctest -j ${{ env.NPROC }} -E "integration\.HospitalLowEnergy|integration\.DirectIndirectEvapCoolersVSAS|integration\.HospitalBaselineReheatReportEMS|integration\.HospitalBaseline|integration\.ASHRAE901_ApartmentHighRise_STD2019_Denver|integration\.RefBldgOutPatientNew2004_Chicago|integration\.UnitarySystem_MultiSpeedDX_EconoStaging|integration\.ASHRAE901_OutPatientHealthCare_STD2019_Denver|integration\.UnitaryHybridAC_DedicatedOutsideAir|integration\.RefrigeratedWarehouse|integration\.RefBldgSecondarySchoolNew2004_Chicago|integration\.LgOffVAVusingBasement|integration\.EcoroofOrlando|integration\._5ZoneAirCooled_LeapYear_annual|integration\.EcoroofOrlando_NoSitePrec|integration\._5ZoneAirCooled_annual"; then echo "::endgroup::" echo -e "✅ ${Green}All tests passed${Color_Off}" else From a81799d1d2f64c1936dbad126551baae2b393467 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Mon, 15 Sep 2025 09:35:33 -0500 Subject: [PATCH 14/15] Re-enable the PR test script, and also clean up the text in the debug workflow --- .github/workflows/test_pull_request_debug.yml | 11 +++++++---- ...st_pull_requests.unused => test_pull_requests.yml} | 0 2 files changed, 7 insertions(+), 4 deletions(-) rename .github/workflows/{test_pull_requests.unused => test_pull_requests.yml} (100%) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index de4d72c03d0..cf9e886d9b7 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -83,16 +83,18 @@ jobs: echo "::endgroup::" fi; -# - name: Setup upterm session -# uses: owenthereal/action-upterm@v1 + # I fully acknowledge that there is a better way to get coverage results + # I tried running some of the tips from Julien, but could not get them to work fully + # The series of steps here are hacky, but pretty much works, so I'm leaving it. + # When the next person gets here to clean this up, don't forget to add a message to the GITHUB_STEP_SUMMARY + # And even better would be to post a message as a PR comment like we do for regressions. - name: Prepare Initial Coverage Results shell: bash working-directory: ./build run: lcov -c -d . -o lcov.raw.info --base-directory ../src/EnergyPlus --ignore-errors source,mismatch - #run: lcov -c -d . -o ./lcov.output --no-external --base-directory ../src/EnergyPlus --ignore-errors source - - name: Why does it have src/src/? + - name: Why does it have src/src/? I don't know, but remove it! shell: bash working-directory: ./build run: sed -i 's#/src/src/#/src/#g' lcov.raw.info @@ -101,6 +103,7 @@ jobs: shell: bash working-directory: ./build run: lcov -e lcov.raw.info "*/EnergyPlus/src/EnergyPlus/*" -o lcov.filtered.info + # could also run lcov -r to remove some of the generated files, like the embedded schema cc file - name: Generate HTML Coverage Package shell: bash diff --git a/.github/workflows/test_pull_requests.unused b/.github/workflows/test_pull_requests.yml similarity index 100% rename from .github/workflows/test_pull_requests.unused rename to .github/workflows/test_pull_requests.yml From 9e29d117d3952effc649aa67b8410af3aa780ae6 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Mon, 15 Sep 2025 15:42:46 -0500 Subject: [PATCH 15/15] Move debug/coverage runs to just develop commits to save CI time --- .github/workflows/test_pull_request_debug.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pull_request_debug.yml b/.github/workflows/test_pull_request_debug.yml index cf9e886d9b7..35038762727 100644 --- a/.github/workflows/test_pull_request_debug.yml +++ b/.github/workflows/test_pull_request_debug.yml @@ -1,8 +1,12 @@ name: Debug Build and Test +# run this on all commits to the develop branch +# once a large runner, or a self-hosted runner, is available, re-enable for all pull requests on: - pull_request: - branches: [ develop ] + # pull_request: + # branches: [ develop ] + push: + branches: [ develop, AddRWDBuildToGHA ] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}