Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into PLHPReportingIssue
Browse files Browse the repository at this point in the history
  • Loading branch information
dareumnam committed Aug 4, 2023
2 parents 82695cf + b1b4068 commit 62ae824
Show file tree
Hide file tree
Showing 411 changed files with 48,150 additions and 37,656 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
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/Python311/python.exe -DPython_EXECUTABLE:PATH=C:/Users/elee/AppData/Local/Programs/Python/Python311/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_EXECUTABLE:PATH=C:/Users/elee/AppData/Local/Programs/Python/Python311/python.exe
skip_regression: true
109 changes: 109 additions & 0 deletions .github/workflows/epjson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
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;
- 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")
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ testfiles/*.htm
# this is autogenerated in the src dir
doc/title.tex

# ignore Energy+.schema.epJSON while it is auto-generated from IDD
Energy+.schema.epJSON.in

# ignore the doxygen and sphinx built API docs
doc/readthedocs/doxygen/_build
doc/readthedocs/sphinx/_build
Expand Down Expand Up @@ -88,3 +85,7 @@ CMakeSettings.json

# py2app puts things inside dist/ and build/, build/ is already ignored, just add dist/
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
23 changes: 5 additions & 18 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,8 +11,6 @@ cmake_policy(SET CMP0048 NEW) # handling project_version_* variables

project(EnergyPlus)

cmake_minimum_required(VERSION 3.17)

if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER "3.0")
cmake_policy(SET CMP0054 NEW) # CMake 3.1 added this policy
endif()
Expand Down Expand Up @@ -283,9 +283,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 All @@ -298,15 +295,6 @@ endif()
# E+ required libraries
add_subdirectory(idd)

execute_process(
COMMAND ${Python_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/dev/generate_epJSON_schema/generate_epJSON_schema.py" "${PROJECT_SOURCE_DIR}"
TIMEOUT 30
RESULT_VARIABLE generate_epJSON_schema_result)
if(${generate_epJSON_schema_result} MATCHES ".*timeout.*")
message(FATAL_ERROR "Generating epJSON Schema from IDD failed: ${generate_epJSON_schema_result}")
endif()
configure_file(idd/Energy+.idd.in "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.idd")
configure_file(idd/Energy+.schema.epJSON.in "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.schema.epJSON")
configure_file(idd/BasementGHT.idd "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/BasementGHT.idd")
configure_file(idd/SlabGHT.idd "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SlabGHT.idd")

Expand All @@ -322,7 +310,6 @@ configure_file("workflows/transition.py" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/work
# of course E+ itself
add_subdirectory(src/EnergyPlus)
set_target_properties(airflownetworklib PROPERTIES FOLDER "Internal")
set_target_properties(GenerateEmbeddedEpJSONSchema PROPERTIES FOLDER "Internal")
set_target_properties(energyplusparser PROPERTIES FOLDER "Internal")

if(BUILD_TESTING)
Expand Down Expand Up @@ -371,9 +358,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: 1 addition & 2 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,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
Loading

0 comments on commit 62ae824

Please sign in to comment.