Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
macumber authored Jun 22, 2024
2 parents 88e8188 + a9b492b commit fbdc742
Show file tree
Hide file tree
Showing 49 changed files with 63,842 additions and 63,609 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/app_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [ master, develop ]
types: [ opened, reopened, synchronize, ready_for_review ]

env:
BUILD_TYPE: Release
BUILD_DOCUMENTATION: OFF
BUILD_TESTING: ON
BUILD_BENCHMARK: ON
BUILD_PACKAGE: ON
QT_VERSION: 6.6.3
QT_VERSION: 6.5.2
QT_DEBUG_PLUGINS: 1

jobs:
build:
# Note: as of 2021-01-29, this only works for push, not for pull request
# if: "!(contains(github.event.head_commit.message, 'skip') && contains(github.event.head_commit.message, 'ci'))"
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}

runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
Expand Down Expand Up @@ -130,7 +132,7 @@ jobs:
if [ "$RUNNER_OS" == "Linux" ]; then
echo "Install needed system dependencies for OPENGL (due to Qt) for Linux"
sudo apt update -qq
sudo apt install -y mesa-common-dev libglu1-mesa-dev patchelf ninja-build ccache libxkbcommon-x11-dev libgl1-mesa-dev chrpath libxcb-cursor0
sudo apt install -y mesa-common-dev libglu1-mesa-dev patchelf ninja-build ccache libxkbcommon-x11-dev libgl1-mesa-dev chrpath libxcb-icccm4 libxcb-keysyms1 libxcb-xkb1 libxcb-randr0 libxcb-shape0 libxkbcommon-x11-0 libxcb-cursor0
gcc --version
ccache --set-config=cache_dir=$CCACHE_DIR
Expand Down Expand Up @@ -226,7 +228,7 @@ jobs:
begin_group "Default profile"
if [ "${{ matrix.SELF_HOSTED }}" == "true" ]; then
export CONAN_USER_HOME=$HOME
export CONAN_USER_HOME=$HOME${DIR_SEP}actions-runner${DIR_SEP}conan-cache
else
export CONAN_USER_HOME="${{ github.workspace }}${DIR_SEP}conan-cache"
fi;
Expand Down Expand Up @@ -402,10 +404,11 @@ jobs:
if: ${{ matrix.SELF_HOSTED }}
run: |
set -x
cmake -E rm -rf ./build
cmake -E make_directory ./build
if [ "$RUNNER_OS" == "macOS" ]; then
QT_INSTALL_DIR="/Users/irvinemac/Qt/6.6.3/macos/"
QT_INSTALL_DIR="/Users/irvinemac/Qt/$QT_VERSION/macos/"
fi
echo "$QT_INSTALL_DIR/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -488,19 +491,18 @@ jobs:
conan cache clean --source --build --download --temp
ccache --show-stats -vv || ccache --show-stats || true
- name: Test bed Sign inner portable executable files and exe package (Windows 2022)
- name: Test bed Sign inner portable executable files and exe package (Windows)
working-directory: ./build
if: (matrix.os == 'windows-2022')
if: runner.os == 'Windows'
shell: powershell
run: |
$installer_exe = Get-ChildItem -Filter "${{ matrix.BINARY_PKG_PATH }}/*.${{ env.BINARY_EXT }}" -File | Select-Object -First 1 | % { $_.FullName}
echo $installer_exe
echo "$installer_exe"
- name: Sign inner portable executable files and exe package (Windows 2022)
- name: Sign inner portable executable files and exe package (Windows)
working-directory: ./build
# if: (runner.os == 'Windows')
if: contains(github.ref, 'refs/tags') && (matrix.os == 'windows-2022')
if: contains(github.ref, 'refs/tags') && (runner.os == 'Windows')
shell: powershell
run: |
# Install signpath
Expand Down Expand Up @@ -552,9 +554,15 @@ jobs:
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
Xvfb :99 &
export DISPLAY=:99
ctest -j -T test --output-on-failure --no-compress-output -C $BUILD_TYPE || true
if [ "$RUNNER_OS" == "macOS" ]; then
automationmodetool
export XVFBCMD=""
elif [ "$RUNNER_OS" == "Windows" ]; then
export XVFBCMD=""
else
export XVFBCMD="xvfb-run"
fi
$XVFBCMD ctest -j -T test --output-on-failure --no-compress-output -C $BUILD_TYPE || true
- name: Archive test results?
uses: actions/upload-artifact@v4
Expand All @@ -568,9 +576,15 @@ jobs:
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
Xvfb :99 &
export DISPLAY=:99
Products/SpacesSurfaces_Benchmark --benchmark_out_format=csv --benchmark_out='bench_results_SpacesSurfaces.csv' || true
if [ "$RUNNER_OS" == "macOS" ]; then
automationmodetool
export XVFBCMD=""
elif [ "$RUNNER_OS" == "Windows" ]; then
export XVFBCMD=""
else
export XVFBCMD="xvfb-run"
fi
$XVFBCMD Products/SpacesSurfaces_Benchmark --benchmark_out_format=csv --benchmark_out='bench_results_SpacesSurfaces.csv' || true
- name: Archive benchmark results?
uses: actions/upload-artifact@v4
Expand Down
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ if(WIN32)
# add_compile_definitions(BOOST_USE_WINDOWS_H) # Getting a confict with `typedef GUID UUID` from windows.h
add_compile_definitions(BOOST_WINAPI_DEFINE_VERSION_MACROS)
add_compile_definitions(WIN32_LEAN_AND_MEAN) # That excludes stuff that's not used too often, including the GUID stuff
# TODO: remove when possible, see https://github.com/microsoft/cpprestsdk/issues/1768
add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
endif()

# Check version of gcc
Expand Down Expand Up @@ -508,9 +510,18 @@ if(UNIX)
endif()

# Qt
# e.g. QT_INSTALL_DIR = C:/Qt/6.6.3/msvc2019_64
# e.g. QT_INSTALL_DIR = C:/Qt/6.5.2/msvc2019_64
set(QT_INSTALL_DIR "" CACHE PATH "Path to Qt Install")
set(QT_VERSION "6.6.3")
set(QT_VERSION "6.5.2" CACHE STRING "Qt target version, defaults to 6.5.2")

# For AboutBox, but also validates that the version is valid
string(REGEX MATCH "^([0-9]+\\.[0-9]+)"
QT_VERSION_MAJOR_MINOR ${QT_VERSION})
if(NOT QT_VERSION_MAJOR_MINOR)
message(FATAL_ERROR "Failed to match QT_VERSION=${QT_VERSION}")
endif()
set(QT_DOC_LINK "https://doc.qt.io/qt-${QT_VERSION_MAJOR_MINOR}/qtmodules.html")


# TODO: how to set OPENSSL_ROOT_DIR to a generator expression?
set(OPENSSL_ROOT_DIR ${CONAN_OPENSSL_ROOT_RELEASE})
Expand All @@ -534,7 +545,7 @@ find_file(qweb_resources NAMES qtwebengine_resources.pak PATHS "${QT_INSTALL_DIR
find_file(qweb_resources_devtools NAMES qtwebengine_devtools_resources.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
find_file(qweb_resources_100 NAMES qtwebengine_resources_100p.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
find_file(qweb_resources_200 NAMES qtwebengine_resources_200p.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
find_file(qweb_resources_v8_context_snapshot NAMES v8_context_snapshot.bin PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)
#find_file(qweb_resources_v8_context_snapshot NAMES v8_context_snapshot.bin PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH)

# QT_WEB_LIBS are linked by OS App and openstudio_lib but not by openstudio_modeleditor.so or openstudio_modeleditor
list(APPEND QT_WEB_LIBS Qt6::WebEngineCore)
Expand Down Expand Up @@ -608,7 +619,7 @@ if(WIN32)
endif()

if(UNIX AND NOT APPLE)
# Apparently libqxcb.so depends on libQt6OpenGL.so in Qt 6.6.3 (it depended on libGL on 5.15.0 but not OpenGL)
# Apparently libqxcb.so depends on libQt6OpenGL.so in Qt 6 (it depended on libGL on 5.15.0 but not OpenGL)
find_package(Qt6OpenGL ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_LIBS Qt6::OpenGL)
endif()
Expand Down
16 changes: 8 additions & 8 deletions FindOpenStudioSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,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 "-rc2")
set(OPENSTUDIO_VERSION_PRERELEASE "")
# Enter SHA, always, eg "+79857912c4"
set(OPENSTUDIO_VERSION_SHA "+af997f4fef")
set(OPENSTUDIO_VERSION_SHA "+f953b6fcaf")

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

elseif(UNIX)
set(OPENSTUDIO_PLATFORM "${LSB_RELEASE_ID_SHORT}-${LSB_RELEASE_VERSION_SHORT}-${ARCH}")
if(LSB_RELEASE_VERSION_SHORT MATCHES "22.04")
if (ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH 57b2a8e706999a6eb1acbfbacf13241a)
set(OPENSTUDIO_EXPECTED_HASH ff544a9dfa4846de6af959a0c1ec926d)
else()
set(OPENSTUDIO_EXPECTED_HASH 6b81e79fe69d0860d94922967b881855)
set(OPENSTUDIO_EXPECTED_HASH b14c71b37a01040f3216abc68488ed62)
endif()
elseif(LSB_RELEASE_VERSION_SHORT MATCHES "20.04")
set(OPENSTUDIO_EXPECTED_HASH 171510ee1a23d0542d0f71a9388d3bc3)
set(OPENSTUDIO_EXPECTED_HASH 98539ab193b15a140146add5e089900c)
else()
message(FATAL_ERROR "OpenStudio SDK no longer provides packages for Ubuntu 18.04")
endif()

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

Expand Down
2 changes: 1 addition & 1 deletion ProjectMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ macro(CREATE_TEST_TARGETS BASE_NAME SRC DEPENDENCIES)
endif()

target_link_libraries(${BASE_NAME}_tests
gtest::gtest
GTest::gtest
${ALL_DEPENDENCIES}
)

Expand Down
4 changes: 2 additions & 2 deletions ci/clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ then
fi

# first find if any files changed
num=$(git diff $PR_BRANCH_NAME $TARGET_BRANCH_NAME --name-only | /bin/grep '.*\.\(cpp\|c\|cxx\|cxx.in\|hpp\|h\|hxx\|hxx.in\)$' | wc -l | tr -d '[:space:]')
num=$(git diff $PR_BRANCH_NAME $TARGET_BRANCH_NAME --name-only | grep '.*\.\(cpp\|c\|cxx\|cxx.in\|hpp\|h\|hxx\|hxx.in\)$' | wc -l | tr -d '[:space:]')
if [ $num -eq 0 ]
then
echo "No files of type (cpp, c, cxx, cxx.in, hpp, h, hxx, hxx.in) changed. Skipping clang-formatting"
exit 0
fi

git diff $PR_BRANCH_NAME $TARGET_BRANCH_NAME --name-only | /bin/grep '.*\.\(cpp\|c\|cxx\|cxx.in\|hpp\|h\|hxx\|hxx.in\)$' | xargs clang-format -style=file -i -fallback-style=none
git diff $PR_BRANCH_NAME $TARGET_BRANCH_NAME --name-only | grep '.*\.\(cpp\|c\|cxx\|cxx.in\|hpp\|h\|hxx\|hxx.in\)$' | xargs clang-format -style=file -i -fallback-style=none

# clang-format will auto correct files so prepare the diff and use this as artifact
git diff > clang_format.patch
Expand Down
9 changes: 5 additions & 4 deletions conan.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"websocketpp/0.8.2#842a0419153a8aa52f3ea3a1da557d38%1695972005.713",
"tinygltf/2.5.0#65c28d0a4c3cbd4ef92b08b59df769da%1701621757.442",
"termcap/1.3.1#1986f84bf21dd07ea774b027a3201fcb%1678542508.75",
"swig/4.1.1#8f418438101ef7712d52a9fe739d32f9%1707838298.077707",
"swig/4.1.1#8f418438101ef7712d52a9fe739d32f9%1707838669.551",
"stb/cci.20230920#9792498b81cf34a90138d239e36b0bf8%1700546289.605",
"sqlite3/3.38.5#4b875d4249cdfb4c1235e6b3ea6c18e7%1676251415.466",
"ruby/3.2.2#7a66613b28107b3318a6ff60701c1b6b%1707386606.655",
"ruby/3.2.2#e349279c358fd8f54d83446a3af8ecfe%1718616192.725",
"readline/8.2#5618fbfed2466d9dc0fa8834faf06a6a%1702837438.071",
"pugixml/1.12.1#d0378a7e4e32d2d379c3a272269e4330%1691917297.122",
"pcre2/10.42#74a354d74d291503aadffe6453d976f5%1694473548.558",
Expand Down Expand Up @@ -55,5 +55,6 @@
"boost/1.83.0": [
"boost/1.79.0#d8a5b9e748e4152d6f489d7d87a1f129"
]
}
}
},
"config_requires": []
}
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class OpenStudioAppBuildRecipe(ConanFile):
}

def requirements(self):
self.requires("ruby/3.2.2")
self.requires("ruby/3.2.2#e349279c358fd8f54d83446a3af8ecfe%1718616192.725")

if is_apple_os(self):
self.requires(
Expand Down
2 changes: 1 addition & 1 deletion developer/ruby/GitHubIssueStats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def print_issue(issue)
if !ENV['GITHUB_TOKEN'].nil?
token = ENV['GITHUB_TOKEN']
@github = Github.new oauth_token: token
elsif File.exists?(Dir.home + '/github_config.yml')
elsif File.exist?(Dir.home + '/github_config.yml')
github_options = YAML.load_file(Dir.home + '/github_config.yml')
token = github_options['oauth_token']
@github = Github.new oauth_token: token
Expand Down
Loading

0 comments on commit fbdc742

Please sign in to comment.