Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b98c0c0
Add RelWithDebugInfo build type to action and enable it
Myoldmopar Sep 6, 2025
83e4c30
Remove Decent CI config files
Myoldmopar Sep 6, 2025
b0c29ae
Adding more config vars to the configure-and-build action, adding upt…
Myoldmopar Sep 6, 2025
fb078aa
I guess env cannot be in the runs-on tag
Myoldmopar Sep 6, 2025
ce85e18
Temporarily disable the other PR workflows
Myoldmopar Sep 6, 2025
a2905c8
Install coverage tools, generate html, turn on non-minimal build
Myoldmopar Sep 6, 2025
293d6b9
So close; adjusting path for lcov and moving upterm for debugging
Myoldmopar Sep 6, 2025
fc82953
Turn off upterm, try cleaning up coverage results
Myoldmopar Sep 7, 2025
807c72a
Try adding a bit more error handling for lcov and genhtml
Myoldmopar Sep 7, 2025
fd22dc3
Update test_pull_request_debug.yml
Myoldmopar Sep 7, 2025
31493f3
Trimmed down test test with upterm enabled
Myoldmopar Sep 9, 2025
f76c72f
Dumb attempt, I know jmarrec has a better option
Myoldmopar Sep 12, 2025
567fe53
Merge remote-tracking branch 'origin/develop' into AddRWDBuildToGHA
Myoldmopar Sep 12, 2025
ec27e3e
Turn on most test cases, but disable the top 15 or so longest running…
Myoldmopar Sep 12, 2025
4dde722
Merge remote-tracking branch 'origin/develop' into AddRWDBuildToGHA
Myoldmopar Sep 15, 2025
a81799d
Re-enable the PR test script, and also clean up the text in the debug…
Myoldmopar Sep 15, 2025
c7c4bce
Merge remote-tracking branch 'origin/develop' into AddRWDBuildToGHA
Myoldmopar Sep 15, 2025
9e29d11
Move debug/coverage runs to just develop commits to save CI time
Myoldmopar Sep 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .decent_ci-Linux.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .decent_ci-Windows.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions .decent_ci.yaml

This file was deleted.

19 changes: 15 additions & 4 deletions .github/actions/configure-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ 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"
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"
Expand Down Expand Up @@ -50,9 +59,10 @@ 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_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 `
Expand Down Expand Up @@ -91,9 +101,10 @@ 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_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 \
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/test_pull_request_debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
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 ]
push:
branches: [ develop, AddRWDBuildToGHA ]

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: ubuntu-24.04
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: Install coverage tools
shell: bash
run: sudo apt-get update && sudo apt-get install lcov gcovr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, pip install gcovr pulls in 8.3, while apt on ubuntu 24.04 pulls in 7.0


- 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: false
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"
enable-coverage: "ON"
build-python-cli: "OFF"

- 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 }} -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
echo "::endgroup::"
echo -e "❌ ${Red}Some Tests Failed${Color_Off}"
begin_group "Re-running failed tests verbosely..."
ctest --rerun-failed -VV
echo "::endgroup::"
fi;

# 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

- 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

- name: Clean up Coverage Results
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
working-directory: ./build
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
with:
name: coverage-results
path: ./build/lcov-html
Loading