From 29937ea94bbeccd9b865cc558d481e798bce3899 Mon Sep 17 00:00:00 2001 From: Alex Chapin Date: Mon, 5 Jan 2026 10:24:29 -0500 Subject: [PATCH 1/5] fix: Add @loader_path/../lib to CMAKE_INSTALL_RPATH for macOS bundle --- .github/workflows/full-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/full-build.yml b/.github/workflows/full-build.yml index aa958f179e..7d17107844 100644 --- a/.github/workflows/full-build.yml +++ b/.github/workflows/full-build.yml @@ -813,7 +813,7 @@ jobs: -DCPACK_BINARY_IFW:BOOL=ON \ -DBUILD_PYTHON_BINDINGS:BOOL=ON \ -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ - -DCMAKE_INSTALL_RPATH="@loader_path;@executable_path" \ + -DCMAKE_INSTALL_RPATH="@loader_path;@executable_path;@loader_path/../lib" \ -DPYTHON_VERSION:STRING=${{ env.PYTHON_REQUIRED_VERSION }} \ -DPython_ROOT_DIR:PATH="$(dirname $(dirname $SYSTEM_PYTHON_PATH))" \ ../${{ env.OPENSTUDIO_SOURCE }} From b3e42a8f7244957c855259039d96a6836a886558 Mon Sep 17 00:00:00 2001 From: Alex Chapin Date: Mon, 5 Jan 2026 10:30:52 -0500 Subject: [PATCH 2/5] fix: Add macOS version specification to CMake build options --- .github/workflows/full-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/full-build.yml b/.github/workflows/full-build.yml index 7d17107844..ba605f6495 100644 --- a/.github/workflows/full-build.yml +++ b/.github/workflows/full-build.yml @@ -759,6 +759,7 @@ jobs: -c tools.cmake.cmaketoolchain:generator=Ninja \ -s compiler.cppstd=20 \ -s build_type=${{ env.BUILD_TYPE }} \ + -s os.version=${{ matrix.macos_dev_target }} \ -o readline/*:with_library=termcap - name: Locate Ruby From ced398174c8763635e2e6cc649ad94967ed1c92a Mon Sep 17 00:00:00 2001 From: Alex Chapin Date: Tue, 6 Jan 2026 11:40:46 -0500 Subject: [PATCH 3/5] fix: Update conan install command to include swig and modify Jenkins library reference for macOS --- .github/workflows/incremental-build.yml | 2 +- Jenkinsfile_develop_osx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 49f26c2574..6d955ddff3 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -100,7 +100,7 @@ jobs: conan profile detect fi - conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing --build=boost --build=fmt --build=cpprestsdk -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 + conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing --build=boost --build=fmt --build=cpprestsdk --build=swig -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 - name: Locate Ruby run: | diff --git a/Jenkinsfile_develop_osx b/Jenkinsfile_develop_osx index d7d18e8711..783f70c10f 100644 --- a/Jenkinsfile_develop_osx +++ b/Jenkinsfile_develop_osx @@ -1,6 +1,6 @@ //Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs -@Library('cbci_shared_libs') _ +@Library('cbci_shared_libs@osx_cert_fix') _ // Build for PR to develop branch only. if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { From 24c7987eac01982e332542944bf35c85c003dfd5 Mon Sep 17 00:00:00 2001 From: Alex Chapin Date: Tue, 6 Jan 2026 11:58:13 -0500 Subject: [PATCH 4/5] fix: Correct SWIG_DIR environment variable and create symlink for SWIG executable in incremental build --- .github/workflows/incremental-build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 6d955ddff3..514a95de5d 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -96,6 +96,9 @@ jobs: # Force remove all to ensure rebuild with correct ABI conan remove "*" -c || true + # Fix SWIG_DIR env var being set to an invalid path by conan + export SWIG_DIR="" + if [ ! -f "${{ env.DOCKER_ROOT }}/.conan2/profiles/default" ]; then conan profile detect fi @@ -112,6 +115,16 @@ jobs: working-directory: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }} run: | . ./conanbuild.sh + # Create a symlink to the swig executable in a standard path if it exists in conan cache + # This helps when the long conan path is causing issues or not being picked up correctly + SWIG_BIN=$(find /github/home/.conan2 -name swig -type f -executable | head -n 1) + if [ ! -z "$SWIG_BIN" ]; then + echo "Found SWIG at $SWIG_BIN" + mkdir -p $HOME/bin + ln -sf $SWIG_BIN $HOME/bin/swig + export PATH=$HOME/bin:$PATH + fi + cmake -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ From 5db173908ea91755070c5982faefa7e7a51f3753 Mon Sep 17 00:00:00 2001 From: Alex Chapin Date: Tue, 6 Jan 2026 14:00:34 -0500 Subject: [PATCH 5/5] fix: Add SWIG_EXECUTABLE argument to CMake configuration for incremental build --- .github/workflows/incremental-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 514a95de5d..08610701bf 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -123,11 +123,13 @@ jobs: mkdir -p $HOME/bin ln -sf $SWIG_BIN $HOME/bin/swig export PATH=$HOME/bin:$PATH + SWIG_EXEC_ARG="-DSWIG_EXECUTABLE=$HOME/bin/swig" fi cmake -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ + $SWIG_EXEC_ARG \ -DBUILD_TESTING:BOOL=ON \ -DCPACK_BINARY_DEB:BOOL=ON \ -DCPACK_BINARY_TGZ:BOOL=ON \