Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into 10742-vertical-bli…
Browse files Browse the repository at this point in the history
…nd-warning
  • Loading branch information
Myoldmopar committed Oct 15, 2024
2 parents 4c180e9 + 1a9d150 commit 6acb0e7
Show file tree
Hide file tree
Showing 880 changed files with 127,122 additions and 1,094 deletions.
6 changes: 3 additions & 3 deletions .decent_ci-Linux.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
compilers:
- name: "gcc"
version: "11.4"
cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -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
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

- name: "gcc"
version: "11.4"
build_type: RelWithDebInfo
cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -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
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
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 41.0
Expand All @@ -23,7 +23,7 @@ compilers:
- name: "gcc"
version: "11.4"
build_type: RelWithDebInfo
cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -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
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
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 66.0
Expand Down
2 changes: 1 addition & 1 deletion .decent_ci-Windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ 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_EXECUTABLE:PATH=C:/Users/elee/AppData/Local/Programs/Python/Python312/python.exe
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
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
path: ./dist

- name: Deploy on Test PyPi
uses: pypa/[email protected].1
uses: pypa/[email protected].3
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/release_linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Releases
name: Linux Releases

on:
push:
Expand Down Expand Up @@ -70,7 +70,8 @@ jobs:
shell: bash
run: |
cmake -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \
-DLINK_WITH_PYTHON:BOOL=ON -DPython_REQUIRED_VERSION:STRING=${{ steps.setup-python.outputs.python-version }} \
-DLINK_WITH_PYTHON:BOOL=ON -DPYTHON_CLI: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_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON \
-DDOCUMENTATION_BUILD:STRING="BuildWithAll" -DTEX_INTERACTION:STRING="batchmode" -DENABLE_PCH:BOOL=OFF \
Expand Down Expand Up @@ -127,16 +128,10 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
name: [20, 22, 24]
include:
- name: 20
os: ubuntu-20.04
test_key: ubuntu2004
- name: 22
os: ubuntu-22.04
- os: ubuntu-22.04
test_key: ubuntu2204
- name: 24
os: ubuntu-24.04
- os: ubuntu-24.04
test_key: ubuntu2404

steps:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release_mac.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Releases
name: Mac Releases

on:
push:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
echo "Installing gcc@13 for gfortran support of -static-libquadmath"
brew list gcc@13 || brew install gcc@13
which gfortran-13 || echo "FC=$(brew --prefix gcc@13)/bin/gfortran-13" >> $GITHUB_ENV
brew install ninja
brew install ninja tcl-tk
- name: Create Build Directory
run: cmake -E make_directory ./build/
Expand All @@ -150,7 +150,8 @@ jobs:
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${{ matrix.macos_dev_target }} \
-DLINK_WITH_PYTHON:BOOL=ON -DPython_REQUIRED_VERSION:STRING=${{ steps.setup-python.outputs.python-version }} \
-DLINK_WITH_PYTHON:BOOL=ON -DPYTHON_CLI: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 }}/${{ matrix.python-arch }}/ \
-DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON \
-DDOCUMENTATION_BUILD:STRING=$DOCUMENTATION_BUILD -DTEX_INTERACTION:STRING="batchmode" \
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Releases
name: Windows Releases

on:
push:
Expand Down Expand Up @@ -134,7 +134,8 @@ jobs:
run: |
set -x
cmake -G "Visual Studio 16 2019" -A ${{ matrix.vs-generator }} \
-DLINK_WITH_PYTHON:BOOL=ON -DPython_REQUIRED_VERSION:STRING=${{ steps.setup-python.outputs.python-version }} \
-DLINK_WITH_PYTHON:BOOL=ON -DPYTHON_CLI: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 }}/${{ matrix.arch }}/ \
-DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON \
-DENABLE_HARDENED_RUNTIME:BOOL=${{ matrix.enable_hardened_runtime }} \
Expand Down
34 changes: 2 additions & 32 deletions .github/workflows/test_code_integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
code_integrity_checks:
name: Static Code Analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -33,44 +33,14 @@ jobs:

- name: Install cppcheck
if: always()
run: |
mkdir cppcheck
cd cppcheck
wget https://github.com/danmar/cppcheck/archive/2.10.tar.gz
tar xfz 2.10.tar.gz
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../cppcheck-2.10/
make -j $(nproc)
sudo make install
cd ..
rm -Rf cppcheck
- name: Cache cppcheck-build-directory
if: always()
id: cppcheckcache
uses: actions/cache@v4
with:
path: .cppcheck-build-dir/
key: cppcheckcache

- name: cppcheck-build-directory not found
# If the build cache wasn't found in the cache
if: always() && steps.cppcheckcache.outputs.cache-hit != 'true'
run: mkdir .cppcheck-build-dir

- name: cppcheck-build-directory was found
# If the build cache wasn't found in the cache
if: always() && steps.cppcheckcache.outputs.cache-hit == 'true'
run: ls .cppcheck-build-dir/ || true
run: sudo apt-get install cppcheck

- name: Run CppCheck
id: cpp_check_run
if: always()
# TODO: Evaluate the long list of flags here
run: >
cppcheck
--cppcheck-build-dir=.cppcheck-build-dir
-D__cppcheck__ -UEP_Count_Calls -DEP_NO_OPENGL -UGROUND_PLOT -DLINK_WITH_PYTHON -DMSVC_DEBUG -DSKYLINE_MATRIX_REMOVE_ZERO_COLUMNS -U_OPENMP -Ugeneratetestdata
-DEP_cache_GlycolSpecificHeat -DEP_cache_PsyTsatFnPb -UEP_nocache_Psychrometrics -UEP_psych_errors -UEP_psych_stats
--force
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/test_develop_commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Develop Branch Testing

on:
push:
branches: [ develop ] # run this on all commits to the develop branch
branches: [ develop, fixPythonEngineBuild ] # run this on all commits to the develop branch

defaults:
run:
Expand Down Expand Up @@ -58,13 +58,13 @@ jobs:
# nproc: 4
# pretty: "Standard Build on Windows VS 2022"
# alternate: false
# - os: ubuntu-24.04
# arch: x86_64
# python-arch: x64
# generator: "Unix Makefiles"
# nproc: 4
# pretty: "Alternate Build on Ubuntu 24.04"
# alternate: true
- os: ubuntu-24.04
arch: x86_64
python-arch: x64
generator: "Unix Makefiles"
nproc: 4
pretty: "Alternate Build on Ubuntu 24.04"
alternate: true

steps:

Expand Down Expand Up @@ -106,6 +106,7 @@ jobs:
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${{ matrix.macos_dev_target }}
-DLINK_WITH_PYTHON:BOOL=ON
-DPYTHON_CLI: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 }}/${{ matrix.python-arch }}/
-DBUILD_TESTING:BOOL=ON
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
if: runner.os == 'macOS'
run: |
brew update
brew install tcl-tk
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 @@ -94,6 +95,7 @@ jobs:
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${{ matrix.macos_dev_target }}
-DLINK_WITH_PYTHON:BOOL=ON
-DPYTHON_CLI: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 }}/${{ matrix.python-arch }}/
-DBUILD_TESTING:BOOL=ON
Expand Down Expand Up @@ -139,6 +141,7 @@ jobs:
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${{ matrix.macos_dev_target }}
-DLINK_WITH_PYTHON:BOOL=ON
-DPYTHON_CLI: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 }}/${{ matrix.python-arch }}/
-DBUILD_TESTING:BOOL=ON
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ endif()
# If LINK_WITH_PYTHON, also request the Development (libs) at the same time, to ensure consistent version between interpreter and Development
# and ask for at least 3.8 (for the PyConfig stuff).
if(LINK_WITH_PYTHON)
option(PYTHON_CLI "Build the Auxiliary CLI to Call Python Utilities" OFF)
# find_package(Python) has the problem that on github actions in particular it'll pick up the most recent python (eg 3.9) from the tool cache
# even if you have used the setup-python action and set it to 3.8, so we make the exact version required
set(Python_REQUIRED_VERSION "" CACHE STRING "The specific Python version you want to link to (Optional)")
Expand Down
10 changes: 9 additions & 1 deletion cmake/PythonCopyStandardLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# this script must be called with two args:
# 1 - the path to the EnergyPlus executable in the install-tree, which is used to determine where to copy the library
# since this is in the install-tree, you'll need to use a cmake generator expression
# 2 - name of the folder to create to store the copied in python standard library, usually python_standard_library
# 2 - name of the folder to create to store the copied in python standard library, usually python_lib
import ctypes
import os
import platform
Expand All @@ -85,6 +85,8 @@
ctypes_package_dir = os.path.dirname(ctypes_import_file)
standard_lib_dir = os.path.dirname(ctypes_package_dir)

print(f"PYTHON: Analyzing standard library directory at {standard_lib_dir}")

if os.path.exists(target_dir):
# Let's check the library files to see if the ABI matches
# Otherwise if you build with say python 3.8 initially, and then switch to
Expand Down Expand Up @@ -117,6 +119,12 @@ def find_libs(dir_path):
dll_dir = os.path.join(python_root_dir, 'DLLs')
shutil.copytree(dll_dir, target_dir, dirs_exist_ok=True)

# And also on Windows, we now need the grab the Tcl/Tk folder that contains config, scripts, and blobs
if platform.system() == 'Windows':
python_root_dir = os.path.dirname(standard_lib_dir)
tcl_dir = os.path.join(python_root_dir, 'tcl')
shutil.copytree(tcl_dir, target_dir, dirs_exist_ok=True)

# then I'm going to try to clean up any __pycache__ folders in the target dir to reduce installer size
for root, dirs, _ in os.walk(target_dir):
for this_dir in dirs:
Expand Down
Loading

5 comments on commit 6acb0e7

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

10742-vertical-blind-warning (Myoldmopar) - Win64-Windows-10-VisualStudio-16: Build Failed

Failures:\n

API Test Summary

  • Failed: 10
  • notrun: 5

ConvertInputFormat Test Summary

  • Failed: 4
  • notrun: 1

integration Test Summary

  • Passed: 2
  • Failed: 796

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

10742-vertical-blind-warning (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2916 of 2916 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

10742-vertical-blind-warning (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2098 of 2098 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

10742-vertical-blind-warning (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

10742-vertical-blind-warning (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2894 of 2894 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.