Skip to content

Commit

Permalink
Merge pull request #771 from openstudiocoalition/update-3_9_0
Browse files Browse the repository at this point in the history
Update to OS 3.9.0
  • Loading branch information
jmarrec authored Jan 6, 2025
2 parents c8c7435 + 1081619 commit 4bfb712
Show file tree
Hide file tree
Showing 39 changed files with 7,000 additions and 5,197 deletions.
47 changes: 8 additions & 39 deletions .github/workflows/app_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,8 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, macos-13, macos-arm64]
os: [ubuntu-22.04, ubuntu-24.04, windows-2022, macos-13, macos-arm64]
include:
- os: ubuntu-20.04
SELF_HOSTED: false
PLATFORM_NAME: Linux
BINARY_EXT: deb
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Linux/DEB
COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ
QT_OS_NAME: linux
QT_ARCH: gcc_64
arch: x86_64
- os: ubuntu-22.04
SELF_HOSTED: false
PLATFORM_NAME: Linux
Expand Down Expand Up @@ -81,8 +71,8 @@ jobs:
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Darwin/IFW
COMPRESSED_PKG_PATH: _CPack_Packages/Darwin/TGZ
MACOSX_DEPLOYMENT_TARGET: 11.0
SDKROOT: /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
MACOSX_DEPLOYMENT_TARGET: 13.0
SDKROOT: /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
QT_OS_NAME: mac
QT_ARCH: clang_64
arch: x86_64
Expand All @@ -93,8 +83,8 @@ jobs:
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Darwin/IFW
COMPRESSED_PKG_PATH: _CPack_Packages/Darwin/TGZ
MACOSX_DEPLOYMENT_TARGET: 12.1
SDKROOT: /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
MACOSX_DEPLOYMENT_TARGET: 13.0
SDKROOT: /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
QT_OS_NAME: mac
QT_ARCH: arm_64
arch: arm64
Expand All @@ -106,7 +96,7 @@ jobs:
- uses: actions/setup-python@v5
if: ${{ !matrix.SELF_HOSTED }}
with:
python-version: '3.8.x'
python-version: '3.12.x'

- uses: ruby/setup-ruby@v1
if: ${{ !matrix.SELF_HOSTED }}
Expand Down Expand Up @@ -194,7 +184,7 @@ jobs:
echo "/Users/irvinemac/Qt/Tools/QtInstallerFramework/4.3/bin/" >> $GITHUB_PATH
else
echo "Setting Xcode version"
sudo xcode-select -s "/Applications/Xcode_15.0.1.app/Contents/Developer/"
sudo xcode-select -s "/Applications/Xcode_15.2.app/Contents/Developer/"
echo "Using brew to install ninja"
brew install ninja md5sha1sum ccache
Expand Down Expand Up @@ -435,7 +425,7 @@ jobs:
echo "Qt $QT_VERSION already installed"
else
echo "Install aqtinstall, then install Qt $QT_VERSION for ${{ matrix.QT_OS_NAME }} ${{ matrix.QT_ARCH }}"
pip show setuptools
pip show setuptools || true
pip install setuptools --upgrade
pip3 install aqtinstall
aqt install-qt --outputdir ./build/Qt-install/ ${{ matrix.QT_OS_NAME }} desktop $QT_VERSION ${{ matrix.QT_ARCH }} -m qtwebchannel qtwebengine qtwebview qt5compat qtpositioning qtcharts
Expand Down Expand Up @@ -517,27 +507,6 @@ jobs:
conan install . --output-folder=./build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release
fi
if [ "${{ matrix.SELF_HOSTED }}" == "true" ]; then
# TODO: temp... this is unfortunate but the OS SDK arm64 rc2 package has a different sha when extracted...
# OpenStudio-3.8.0-rc2+af997f4fef-Darwin-x86_64.tar.gz on github, but when extracted it's OpenStudio-3.8.0-rc2+06d9d975e1-Darwin-arm64
cmake --preset conan-release -DQT_INSTALL_DIR:PATH=${{ env.QT_INSTALL_DIR }} \
-DBUILD_DOCUMENTATION:BOOL=${{ env.BUILD_DOCUMENTATION }} \
-DBUILD_PACKAGE:BOOL=${{ env.BUILD_PACKAGE }} \
-DCPACK_BINARY_TGZ:BOOL=ON \
-DANALYTICS_API_SECRET:STRING=${{ secrets.ANALYTICS_API_SECRET }} \
-DANALYTICS_MEASUREMENT_ID:STRING=${{ secrets.ANALYTICS_MEASUREMENT_ID }} || true
ls $(pwd)/build/OpenStudio-3.8.0 || true
OS_DIR=$(find "$(pwd)/build/OpenStudio-3.8.0" -name openstudioConfig.cmake)
OS_DIR=$(dirname $OS_DIR)
cmake --preset conan-release -DQT_INSTALL_DIR:PATH=${{ env.QT_INSTALL_DIR }} \
-DBUILD_DOCUMENTATION:BOOL=${{ env.BUILD_DOCUMENTATION }} \
-DBUILD_PACKAGE:BOOL=${{ env.BUILD_PACKAGE }} \
-DCPACK_BINARY_TGZ:BOOL=ON \
-DANALYTICS_API_SECRET:STRING=${{ secrets.ANALYTICS_API_SECRET }} \
-DANALYTICS_MEASUREMENT_ID:STRING=${{ secrets.ANALYTICS_MEASUREMENT_ID }} -Dopenstudio_DIR:PATH=$OS_DIR
fi
if [ "$RUNNER_OS" == "macOS" ]; then
cmake --preset conan-release -DQT_INSTALL_DIR:PATH=${{ env.QT_INSTALL_DIR }} \
-DBUILD_DOCUMENTATION:BOOL=${{ env.BUILD_DOCUMENTATION }} \
Expand Down
10 changes: 5 additions & 5 deletions CMake/install_codesign_script_OpenStudioApp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ endif()

set(FILES_TO_SIGN
EnergyPlus/ExpandObjects
EnergyPlus/energyplus-24.1.0
EnergyPlus/energyplus-24.2.0
EnergyPlus/energyplus.1
EnergyPlus/libenergyplusapi.24.1.0.dylib
EnergyPlus/libenergyplusapi.24.2.0.dylib
EnergyPlus/libintl.8.dylib
EnergyPlus/libpython3.8.dylib
EnergyPlus/libpython3.12.dylib
Ruby/openstudio.bundle

Radiance/bin/vinfo
Expand Down Expand Up @@ -284,8 +284,8 @@ foreach(path ${FILES_TO_SIGN})
list(APPEND _FULL_PATHS "${CMAKE_INSTALL_PREFIX}/${path}")
endforeach()

file(GLOB_RECURSE _PYTHON_SOS "${CMAKE_INSTALL_PREFIX}/EnergyPlus/python_standard_lib/**/*.so")
file(GLOB _numpy_dylibs "${CMAKE_INSTALL_PREFIX}/EnergyPlus/python_standard_lib/numpy/.dylibs/*.dylib")
file(GLOB_RECURSE _PYTHON_SOS "${CMAKE_INSTALL_PREFIX}/EnergyPlus/python_lib/**/*.so")
file(GLOB _numpy_dylibs "${CMAKE_INSTALL_PREFIX}/EnergyPlus/python_lib/numpy/.dylibs/*.dylib")
list (APPEND _PYTHON_SOS ${_numpy_dylibs})

print_relative_paths(PREFIX "FULL_PATHS=" ABSOLUTE_PATHS ${_FULL_PATHS})
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "C compiler cache used")
endif()

project(OpenStudioApplication VERSION 1.8.0)
project(OpenStudioApplication VERSION 1.9.0)

# Check system info globally so we can use it everywhere after: Has to be done before FindOpenStudioSDK.cmake
if(APPLE)
Expand Down Expand Up @@ -272,7 +272,7 @@ endif()

# TODO: Modify the more specific variables as needed to indicate prerelease, etc
# Keep in beta in-between release cycles. Set to empty string (or comment out) for official)
set(PROJECT_VERSION_PRERELEASE "")
set(PROJECT_VERSION_PRERELEASE "rc1")

# OpenStudio version: Only include Major.Minor.Patch, eg "3.0.0", even if you have a prerelease tag
set(OPENSTUDIOAPPLICATION_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
Expand Down Expand Up @@ -798,7 +798,7 @@ install(IMPORTED_RUNTIME_ARTIFACTS openstudio::pythonengine DESTINATION ${LIB_DE

# TODO: we should probably just install the **entire** OS SDK bin/ directory...
if(WIN32)
install(PROGRAMS $<$<CONFIG:Debug>:${openstudio_ROOT_DIR}/bin/python38_d.dll>$<$<CONFIG:Release>:${openstudio_ROOT_DIR}/bin/python38.dll>$<$<CONFIG:RelWithDebInfo>:${openstudio_ROOT_DIR}/bin/python38.dll>$<$<CONFIG:MinSizeRel>:${openstudio_ROOT_DIR}/bin/python38.dll> DESTINATION bin COMPONENT "CLI")
install(PROGRAMS $<$<CONFIG:Debug>:${openstudio_ROOT_DIR}/bin/python312_d.dll>$<$<CONFIG:Release>:${openstudio_ROOT_DIR}/bin/python312.dll>$<$<CONFIG:RelWithDebInfo>:${openstudio_ROOT_DIR}/bin/python312.dll>$<$<CONFIG:MinSizeRel>:${openstudio_ROOT_DIR}/bin/python312.dll> DESTINATION bin COMPONENT "CLI")
endif()

# install(PROGRAMS ${OS_CLI_IMPORTED_PATH} DESTINATION bin COMPONENT "CLI" RENAME "${OS_CLI_IMPORTED_NAME}")
Expand Down
24 changes: 11 additions & 13 deletions FindOpenStudioSDK.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
set(OPENSTUDIO_VERSION_MAJOR 3)
set(OPENSTUDIO_VERSION_MINOR 8)
set(OPENSTUDIO_VERSION_MINOR 9)
set(OPENSTUDIO_VERSION_PATCH 0)
set(OPENSTUDIO_VERSION "${OPENSTUDIO_VERSION_MAJOR}.${OPENSTUDIO_VERSION_MINOR}.${OPENSTUDIO_VERSION_PATCH}")

#If this is an official release, leave this "", otherwise put for eg '-rc1'
set(OPENSTUDIO_VERSION_PRERELEASE "")
# Enter SHA, always, eg "+79857912c4"
set(OPENSTUDIO_VERSION_SHA "+f953b6fcaf")
set(OPENSTUDIO_VERSION_SHA "+c77fbb9569")

# Paths where the cmake-downloaded archives will be put
set(OPENSTUDIO_ARCHIVE_DIR "${PROJECT_BINARY_DIR}/OpenStudio-${OPENSTUDIO_VERSION}")
Expand All @@ -17,34 +17,32 @@ set(OPENSTUDIO_EXT "tar.gz")
if(APPLE)
set(OPENSTUDIO_PLATFORM "Darwin-${ARCH}")
if(ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH 0e983b1a7bd2eed2b27c866125e0716b)
set(OPENSTUDIO_EXPECTED_HASH b373b0f23b529f9764464aae13725558)
else()
set(OPENSTUDIO_EXPECTED_HASH 8be3effb0599888511958999774df569)
set(OPENSTUDIO_EXPECTED_HASH 39c5ae27eeb840472e36b728ab906315)
endif()

elseif(UNIX)
set(OPENSTUDIO_PLATFORM "${LSB_RELEASE_ID_SHORT}-${LSB_RELEASE_VERSION_SHORT}-${ARCH}")
if(LSB_RELEASE_VERSION_SHORT MATCHES "24.04")
set(OPENSTUDIO_PLATFORM "${LSB_RELEASE_ID_SHORT}-22.04-${ARCH}")
#set(OPENSTUDIO_PLATFORM "${LSB_RELEASE_ID_SHORT}-22.04-${ARCH}")
if (ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH ff544a9dfa4846de6af959a0c1ec926d)
set(OPENSTUDIO_EXPECTED_HASH 4c35af3cc4e8d7b1aed2dd98b678a243)
else()
set(OPENSTUDIO_EXPECTED_HASH b14c71b37a01040f3216abc68488ed62)
set(OPENSTUDIO_EXPECTED_HASH 256d18d2d7036883823f2aeae180dfaa)
endif()
elseif(LSB_RELEASE_VERSION_SHORT MATCHES "22.04")
if (ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH ff544a9dfa4846de6af959a0c1ec926d)
set(OPENSTUDIO_EXPECTED_HASH fd1ba05628eb55b3bb72923a8395e267)
else()
set(OPENSTUDIO_EXPECTED_HASH b14c71b37a01040f3216abc68488ed62)
set(OPENSTUDIO_EXPECTED_HASH 67522b9a1ba5749cf0b3cf101a6131cf)
endif()
elseif(LSB_RELEASE_VERSION_SHORT MATCHES "20.04")
set(OPENSTUDIO_EXPECTED_HASH 98539ab193b15a140146add5e089900c)
else()
message(FATAL_ERROR "OpenStudio SDK no longer provides packages for Ubuntu 18.04")
message(FATAL_ERROR "OpenStudio SDK no longer provides packages for Ubuntu 20.04 or older")
endif()

elseif(WIN32)
set(OPENSTUDIO_EXPECTED_HASH 26395d446a91a0042d3976cabd0fb5ab)
set(OPENSTUDIO_EXPECTED_HASH c3a1ec4bc98d7418780a702036ce0edb)
set(OPENSTUDIO_PLATFORM "Windows")
endif()

Expand Down
6 changes: 3 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def generate(self):
tc.cache_variables["CPACK_SOURCE_ZIP"] = False

v = sys.version_info
if (v.major, v.minor) == (3, 8):
if (v.major, v.minor) == (3, 12):
python_version = f"{v.major}.{v.minor}.{v.micro}"
self.output.info(
f"Setting PYTHON_VERSION and Python_ROOT_DIR from your current python: {python_version}, '{sys.base_prefix}'"
Expand All @@ -105,8 +105,8 @@ def generate(self):
tc.cache_variables["Python_ROOT_DIR"] = str(Path(sys.base_prefix))
else:
self.output.warning(
"Your current python is not in the 3.8.x range, which is what we target.\n"
"Your current python is not in the 3.12.x range, which is what we target.\n"
"You'll need to pass it properly when configuring CMake\n"
"via -DPYTHON_VERSION:STRING='3.8.xx' and -DPython_ROOT_DIR:PATH='/path/to/python3.8/'"
"via -DPYTHON_VERSION:STRING='3.12.xx' and -DPython_ROOT_DIR:PATH='/path/to/python3.8/'"
)
tc.generate()
Loading

0 comments on commit 4bfb712

Please sign in to comment.