Skip to content

Commit

Permalink
Merge develop, fix huge amount of conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Nov 6, 2023
2 parents cf02330 + 9c03e1c commit 94ce83e
Show file tree
Hide file tree
Showing 1,657 changed files with 262,977 additions and 67,641 deletions.
6 changes: 3 additions & 3 deletions .decent_ci-Linux.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
compilers:
- name: "gcc"
version: "11.3"
version: "11.4"
cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -DBUILD_FORTRAN:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA:STRING=$COMMIT_SHA -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
s3_upload_bucket: energyplus

- name: "gcc"
version: "11.3"
version: "11.4"
build_type: Debug
cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -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
Expand All @@ -20,7 +20,7 @@ compilers:
skip_packaging: true

- name: "gcc"
version: "11.3"
version: "11.4"
build_type: Debug
cmake_extra_flags: -DLINK_WITH_PYTHON:BOOL=ON -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
set -x
echo "Downloading MiKTeX CLI installer"
# We download from a specific miror already # TODO: Should store this setup package somewhere ourselves
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-5.2.0%2Bb8f430f-x64.zip
unzip miktexsetup-5.2.0%2Bb8f430f-x64.zip
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-5.5.0%2B1763023-x64.zip
unzip miktexsetup-5.5.0%2B1763023-x64.zip
echo "Setting up the local package directory via download"
./miktexsetup_standalone --verbose \
Expand Down
115 changes: 115 additions & 0 deletions .github/workflows/epjson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: epJSON dependency

on:
push

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_TYPE: Release

jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Setup
shell: bash
run: |
cmake -E make_directory ./build/
if [ "$RUNNER_OS" == "Windows" ]; then
echo "Setting CMAKE_GENERATOR options equivalent to ='-G \"Visual Studio 17 2022\" -A x64'"
echo CMAKE_GENERATOR='Visual Studio 17 2022' >> $GITHUB_ENV
echo CMAKE_GENERATOR_PLATFORM=x64 >> $GITHUB_ENV
choco install ninja
fi;
pip install pytest pytest-timeout
- name: Configure CMake
working-directory: ./build
run: |
cmake ../
- name: Test epjson
shell: python
run: |
from pathlib import Path
import subprocess
EP_ROOT = Path(".").resolve()
EP_BUILD_DIR = Path('./build').resolve()
EXPECTED_MSGS = ["Generating the epJSON schema!", "Generating the **embedded** epJSON schema"]
def build():
lines = subprocess.check_output(
[
"cmake",
"--build",
str(EP_BUILD_DIR),
"--config",
"Release",
"--target",
"embedded_epjson_source",
],
encoding="utf-8",
stderr=subprocess.STDOUT,
).splitlines()
return lines
IDD_IN = EP_ROOT / "idd/Energy+.idd.in"
assert IDD_IN.exists()
def ensure_target_built(lines, msg):
breakpoint
lines = [x.strip() for x in lines if "epJSON schema" in x]
errors = []
for expected_msg in EXPECTED_MSGS:
n = lines.count(expected_msg)
if n != 1:
errors.append(f"Expected 1 occurrence of '{expected_msg}', got {n}")
assert not errors, "\n -" + "\n -".join(errors)
# Build: first time: we get both
lines = build()
ensure_target_built(lines, "Failed on first build")
# Insert a fake IDD change, we should also get both
with open(IDD_IN, "r") as f:
lines = f.read().splitlines()
ori_lines = lines.copy()
for i, line in enumerate(lines):
if line.startswith(r"\group"):
lines.insert(i + 1, "")
lines.insert(i + 2, "FakeObject,")
lines.insert(i + 3, r" A1; \field Name")
break
with open(IDD_IN, "w") as f:
f.write("\n".join(lines) + "\n")
lines = build()
ensure_target_built(lines, "Failed after IDD change")
with open(IDD_IN, "w") as f:
f.write("\n".join(ori_lines) + "\n")
lines = build()
ensure_target_built(lines, "Failed after IDD change revert")
- name: Run idd_schema pytests
working-directory: ./build
run: |
pytest --verbose ../idd
17 changes: 8 additions & 9 deletions .github/workflows/mac_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
# TODO: macos-10.15 will be EOL on 8/30/22 and removed on 12/1/2022
os: [macos-10.15, macos-11, macos-12]
macos_dev_target: [10.15, 11.6, 12.1]
include:
- os: macos-10.15
allow_failure: true
macos_dev_target: 10.15
- os: macos-11
- macos_dev_target: 10.15
os: macos-11
allow_failure: false
macos_dev_target: 11.6
- os: macos-12
- macos_dev_target: 11.6
os: macos-11
allow_failure: false
- macos_dev_target: 12.1
os: macos-12
allow_failure: false
macos_dev_target: 12.1
permissions:
# Needed permission to upload the release asset
contents: write
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/windows_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
name: [x64, x86, x64_hardened]
name: [x64, x64_hardened] # removed x86 because it won't build packages now
include:
- name: x64
arch: x64
allow_failure: false
vs-generator: x64
package-arch: x86_64
enable_hardened_runtime: OFF
- name: x86
arch: x86
allow_failure: false
vs-generator: Win32
package-arch: i386
enable_hardened_runtime: OFF
# - name: x86
# arch: x86
# allow_failure: false
# vs-generator: Win32
# package-arch: i386
# enable_hardened_runtime: OFF
- name: x64_hardened
arch: x64
allow_failure: false
Expand Down Expand Up @@ -72,8 +72,8 @@ jobs:
set -x
echo "Downloading MiKTeX CLI installer"
# We download from a specific miror already # TODO: Should store this setup package somewhere ourselves
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-5.2.0%2Bb8f430f-x64.zip
unzip miktexsetup-5.2.0%2Bb8f430f-x64.zip
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-5.5.0%2B1763023-x64.zip
unzip miktexsetup-5.5.0%2B1763023-x64.zip
echo "Setting up the local package directory via download"
./miktexsetup_standalone --verbose \
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ cmake-build-*
.vs
.vscode
CMakeSettings.json
CMakeCache.txt
CMakeFiles/

# vim temp file:
*.swp
Expand All @@ -89,3 +91,4 @@ dist
# if you generate sphinx docs, it builds a dummy version of the schema in the idd folder, just ignore it
/idd/Energy+.schema.epJSON
/idd/Energy+.schema.epJSON.in
design/FY2023/earth_tube_solution_space_diagram.pdf
22 changes: 15 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cmake_minimum_required(VERSION 3.17)

# Use ccache if available, has to be before "project()"
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
Expand All @@ -9,7 +11,14 @@ cmake_policy(SET CMP0048 NEW) # handling project_version_* variables

project(EnergyPlus)

cmake_minimum_required(VERSION 3.17)
# Raise an error if attempting to compile on macOS older than 10.15 - it does not work
if (APPLE)
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not set. Please set CMAKE_OSX_DEPLOYMENT_TARGET to 10.15 or greater and try again.")
elseif (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.15")
message(FATAL_ERROR "The minimum required version for macOS is 10.15, however CMAKE_OSX_DEPLOYMENT_TARGET is set to ${CMAKE_OSX_DEPLOYMENT_TARGET}.")
endif()
endif()

if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER "3.0")
cmake_policy(SET CMP0054 NEW) # CMake 3.1 added this policy
Expand Down Expand Up @@ -44,6 +53,8 @@ if(ENABLE_PCH)
)
endif()

option(ENABLE_UNITY "Enable Unity Build" OFF)

add_library(project_fp_options INTERFACE)

add_library(project_warnings INTERFACE)
Expand Down Expand Up @@ -283,9 +294,6 @@ target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third
target_include_directories(project_options INTERFACE "${kiva_BINARY_DIR}/src/libkiva")
target_include_directories(project_options SYSTEM INTERFACE "${kiva_SOURCE_DIR}/vendor/boost-1.61.0/")

add_subdirectory(scripts/dev/generate_embeddable_epJSON_schema)
set_target_properties(generate_embeddable_epJSON_schema PROPERTIES FOLDER "Internal")

target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP)
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP/include)

Expand Down Expand Up @@ -361,9 +369,9 @@ if(BUILD_FORTRAN)
PROJECT Transition
CMAKE_COMMAND_LINE ${TRANSITION_EXTRA_FLAGS}
NO_EXTERNAL_INSTALL)
file(COPY "idd/V23-1-0-Energy+.idd" DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
configure_file(idd/Energy+.idd.in "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/V23-2-0-Energy+.idd")
file(COPY "src/Transition/SupportFiles/Report Variables 23-1-0 to 23-2-0.csv" DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
file(COPY "${PREVIOUS_IDD}" DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
configure_file(idd/Energy+.idd.in "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/V${CMAKE_VERSION_MAJOR}-${CMAKE_VERSION_MINOR}-${CMAKE_VERSION_PATCH}-Energy+.idd")
file(COPY "src/Transition/SupportFiles/Report Variables ${PREV_RELEASE_MAJOR}-${PREV_RELEASE_MINOR}-${PREV_RELEASE_PATCH} to ${CMAKE_VERSION_MAJOR}-${CMAKE_VERSION_MINOR}-${CMAKE_VERSION_PATCH}.csv" DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
cmake_add_fortran_subdirectory(
src/Basement
PROJECT Basement
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Every commit and every release of EnergyPlus undergoes rigorous testing.
The testing consists of building EnergyPlus, of course, then there are unit tests, integration tests, API tests, and regression tests.
Since 2014, most of the testing has been performed by our bots ([Tik-Tok](https://github.com/nrel-bot), [Gort](https://github.com/nrel-bot-2), and [Marvin](https://github.com/nrel-bot-3)), using a fork of the [Decent CI](https://github.com/lefticus/decent_ci) continuous integration system.
We are now adapting our efforts to use the Github Actions system to handle more of our testing processes.
In the meantime, while Decent CI is still handling the regression and bulkier testing, results from Decent CI are still available on the testing [dashboard](http://nrel.github.io/EnergyPlusBuildResults/).
In the meantime, while Decent CI is still handling the regression and bulkier testing, results from Decent CI are still available on the testing [dashboard](https://myoldmopar.github.io/EnergyPlusBuildResults/).

## Releases

Expand Down
3 changes: 2 additions & 1 deletion cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()

# Make sure expat is compiled as a static library
target_compile_definitions(project_options INTERFACE -DXML_STATIC)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
option(BUILD_TIME_TRACE "Enable -ftime-trace for investigating build times on clang" OFF)
mark_as_advanced(BUILD_TIME_TRACE)
if (BUILD_TIME_TRACE)
Expand All @@ -24,6 +24,7 @@ if(MSVC AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")) # Visual C++ (VS
target_compile_options(project_options INTERFACE /EHsc)
target_compile_options(project_options INTERFACE /MP) # Enables multi-processor compilation of source within a single project
target_compile_options(project_options INTERFACE /Zc:externConstexpr) # allows constexpr to be extern'd in headers, which is part of the standard, and supported by default on non-vs compilers
target_compile_options(project_options INTERFACE /utf-8) # Specifies both the source character set and the execution character set as UTF-8

# string(REGEX REPLACE "/W3" "/W1" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"
# )# Increase to /W2 then /W3 as more serious warnings are addressed (using regex to avoid VC override warnings)
Expand Down
17 changes: 2 additions & 15 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#elseif(APPLE)
#set(CPACK_GENERATOR "IFW;TGZ")
#elseif(UNIX)
#set(CPACK_GENERATOR "STGZ;TGZ")
#set(CPACK_GENERATOR "IFW;STGZ;TGZ")
#endif()

# So instead, let's cache the default value we want for the individual options for CPACK_BINARY_<GenName>
Expand All @@ -34,25 +34,13 @@ if(UNIX)
set(CPACK_BINARY_PRODUCTBUILD OFF CACHE BOOL "Recommended OFF")

else()
# TODO: Make IFW recommended? Deprecate STGZ?
set(CPACK_BINARY_IFW ON CACHE BOOL "Enable to build IFW package, which is the recommended method")
set(CPACK_BINARY_STGZ ON CACHE BOOL "Enable to build a Linux sh installer script, which is the legacy method")

# Unix (non Apple CACHE BOOL) specific option to turn off
set(CPACK_BINARY_TZ OFF CACHE BOOL "Recommended OFF")
endif()

# TODO: the "FORCE" is temporary to avoid people having an existing build directory miss the fact that the recommended method changed
# TODO: remove after next release
if(UNIX AND NOT APPLE)
if(NOT CPACK_BINARY_IFW)
set(CPACK_BINARY_STGZ OFF CACHE BOOL "This was the legacy method on Linux, superseded by IFW" FORCE)
set(CPACK_BINARY_IFW ON CACHE BOOL "Enable to build IFW package, which is the recommend method" FORCE)
message("Switching from STGZ to IFW as the supported generator has changed on Linux")
endif()
endif()
# END TODO

# Tar.gz for inclusion in other programs for eg
set(CPACK_BINARY_TGZ ON CACHE BOOL "Enable to build a tar.gz package, recommended for an official release")

Expand Down Expand Up @@ -374,8 +362,7 @@ set(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/release/readme.html")

install(FILES "${PROJECT_SOURCE_DIR}/bin/CurveFitTools/IceStorageCurveFitTool.xlsm" DESTINATION "PreProcess/HVACCurveFitTool/")
install(FILES "${PROJECT_SOURCE_DIR}/bin/CurveFitTools/CurveFitTool.xlsm" DESTINATION "PreProcess/HVACCurveFitTool/")
install(FILES "${PROJECT_SOURCE_DIR}/idd/V23-1-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater/")
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater/" RENAME "V23-2-0-Energy+.idd")
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater/" RENAME "V${CMAKE_VERSION_MAJOR}-${CMAKE_VERSION_MINOR}-${CMAKE_VERSION_PATCH}-Energy+.idd")

# Workflow stuff, takes about 40KB, so not worth it proposing to not install it
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/workflows/app_g_postprocess.py" DESTINATION "workflows/") # COMPONENT Workflows)
Expand Down
10 changes: 5 additions & 5 deletions cmake/Version.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set(CMAKE_VERSION_MAJOR 23)
set(CMAKE_VERSION_MINOR 2)
set(CMAKE_VERSION_MAJOR 24)
set(CMAKE_VERSION_MINOR 1)
set(CMAKE_VERSION_PATCH 0)

set(CMAKE_PROJECTED_RELEASE_DATE "30 September 2023")
set(CMAKE_PROJECTED_RELEASE_DATE "31 March 2024")

set(PREV_RELEASE_MAJOR 23)
set(PREV_RELEASE_MINOR 1)
set(PREV_RELEASE_MINOR 2)
set(PREV_RELEASE_PATCH 0)
set(PREV_RELEASE_SHA "87ed919")
set(PREV_RELEASE_SHA "7636e6b")

set(ENERGYPLUS_VERSION "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}")

Expand Down
Loading

0 comments on commit 94ce83e

Please sign in to comment.