From cd60a53632422cc744abfc8e0737ff266c002f02 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Wed, 25 Jun 2025 14:22:25 -0600 Subject: [PATCH 01/94] testing out linux incremental build --- .github/workflows/incremental-build.yml | 99 +++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/incremental-build.yml diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml new file mode 100644 index 00000000000..2ba03920c33 --- /dev/null +++ b/.github/workflows/incremental-build.yml @@ -0,0 +1,99 @@ +name: Build and Test (Ubuntu 22.04) + +on: + pull_request: + push: + +jobs: + build: + if: contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') + runs-on: Linux + + env: + CONAN_USER_HOME: /home/runner/.conan2 + AWS_REGION: us-west-2 + CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + CONAN_DOCKER_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 + OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio + BRANCH_NAME: ${{ github.ref_name }} + + container: # Define the Docker container for the job. All subsequent steps run inside it. + image: kuangwenyi/openstudio-cmake-tools:jammy + options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally + volumes: + - ${{env.CONAN_HOST_VOLUME}}:${{env.CONAN_DOCKER_VOLUME}} + - ${{env.OPENSTUDIO_HOST_VOLUME}}:${{env.OPENSTUDIO_DOCKER_VOLUME}} + + steps: + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Enviroment display + run: | + pip install conan + + - name: Cmake Setup + run: | + # Set up git and fetch PR head, then detect conan profile and install dependencies + echo $PWD + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }} + git config --global --add safe.directory "${linux_source}" && \ + git config user.email "cicommercialbuilding@gmail.com" && \ + git config user.name "ci-commercialbuildings" && \ + git fetch origin && \ + git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ + git checkout origin/pr/${{env.BRANCH_NAME}} && \ + conan profile detect && \ + conan install . --output-folder=../${build_folder} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + +# # - name: Install dependencies and configure with CMake +# # run: | +# # echo $PWD +# # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }} +# # mkdir -p OS-build-release-v2 +# # cd OS-build-release-v2 +# # conan install ../OpenStudio --output-folder=. --build=missing \ +# # -c tools.cmake.cmaketoolchain:generator=Ninja \ +# # -s compiler.cppstd=20 -s build_type=Release +# # source ./conanbuild.sh +# cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ +# -DCMAKE_BUILD_TYPE=Release \ +# -DBUILD_TESTING=ON -DCPACK_BINARY_DEB=ON -DCPACK_BINARY_TGZ=ON \ +# -DBUILD_PYTHON_BINDINGS=ON -DBUILD_CLI=ON -DPYTHON_VERSION=3.12.2 \ +# ../OpenStudio + +# - name: Build with Ninja +# run: | +# cd OS-build-release-v2 +# source ./conanbuild.sh +# ninja -j 2 package + + # - name: Run CTests with retries + # run: | + # cd OS-build-release-v2 + # ctest -j 2 -T test --no-compress-output --output-on-failure || \ + # ctest -T test -j 2 --rerun-failed --no-compress-output --output-on-failure || \ + # ctest -T test -j 2 --rerun-failed --no-compress-output -VV + + # - name: Upload build artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: ubuntu-2204-artifacts + # path: | + # OS-build-release-v2/*.deb + # OS-build-release-v2/_CPack_Packages/Linux/TGZ/*.tar.gz + + # - name: Upload to S3 + # if: github.event_name == 'pull_request' + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # run: | + # sudo apt-get install -y awscli + # cd OS-build-release-v2 + # BRANCH=${{ github.head_ref }} + # aws s3 cp *.deb s3://openstudio-ci-builds/$BRANCH/ --acl public-read + # aws s3 cp _CPack_Packages/Linux/TGZ/*.tar.gz s3://openstudio-ci-builds/$BRANCH/ --acl public-read From 44e7a5254912e98bea4701af984533cfc05ff6d2 Mon Sep 17 00:00:00 2001 From: tijcolem Date: Wed, 25 Jun 2025 14:25:56 -0600 Subject: [PATCH 02/94] formatting --- .github/workflows/incremental-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 2ba03920c33..1d13f31c1d4 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -22,8 +22,8 @@ jobs: image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally volumes: - - ${{env.CONAN_HOST_VOLUME}}:${{env.CONAN_DOCKER_VOLUME}} - - ${{env.OPENSTUDIO_HOST_VOLUME}}:${{env.OPENSTUDIO_DOCKER_VOLUME}} + - ${{ env.CONAN_HOST_VOLUME }}:${{ env.CONAN_DOCKER_VOLUME }} + - ${{ env.OPENSTUDIO_HOST_VOLUME }}:${{ env.OPENSTUDIO_DOCKER_VOLUME }} steps: - name: Setup Python From 9b98c4387fab58656caa009b52e447785d0aa71c Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 14:45:21 -0600 Subject: [PATCH 03/94] Fix Docker volume paths and command formatting in incremental build workflow Quote Docker volume paths to handle special characters and fix git safe.directory path. Also improve formatting of git commands and use explicit build folder name instead of variable. --- .github/workflows/incremental-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1d13f31c1d4..f54ae924923 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -22,8 +22,8 @@ jobs: image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally volumes: - - ${{ env.CONAN_HOST_VOLUME }}:${{ env.CONAN_DOCKER_VOLUME }} - - ${{ env.OPENSTUDIO_HOST_VOLUME }}:${{ env.OPENSTUDIO_DOCKER_VOLUME }} + - "${{ env.CONAN_HOST_VOLUME }}:${{ env.CONAN_DOCKER_VOLUME }}" + - "${{ env.OPENSTUDIO_HOST_VOLUME }}:${{ env.OPENSTUDIO_DOCKER_VOLUME }}" steps: - name: Setup Python @@ -40,14 +40,14 @@ jobs: # Set up git and fetch PR head, then detect conan profile and install dependencies echo $PWD cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }} - git config --global --add safe.directory "${linux_source}" && \ + git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}" && \ git config user.email "cicommercialbuilding@gmail.com" && \ git config user.name "ci-commercialbuildings" && \ git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - git checkout origin/pr/${{env.BRANCH_NAME}} && \ + git checkout origin/pr/${{ env.BRANCH_NAME }} && \ conan profile detect && \ - conan install . --output-folder=../${build_folder} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + conan install . --output-folder=../OS-build-release --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release # # - name: Install dependencies and configure with CMake # # run: | From 39455036b42e35ff6200bd03555e274f9270f6a1 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 14:50:43 -0600 Subject: [PATCH 04/94] fix: update volume mounting in incremental build workflow Comment out unused environment variables and directly specify volume paths in the container configuration for better clarity and maintainability. --- .github/workflows/incremental-build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index f54ae924923..00186b69bd0 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -12,18 +12,18 @@ jobs: env: CONAN_USER_HOME: /home/runner/.conan2 AWS_REGION: us-west-2 - CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data - CONAN_DOCKER_VOLUME: /srv/data/jenkins/docker-volumes/conan-data - OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 - OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio + # CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + # CONAN_DOCKER_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + # OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 + # OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio BRANCH_NAME: ${{ github.ref_name }} - + container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally volumes: - - "${{ env.CONAN_HOST_VOLUME }}:${{ env.CONAN_DOCKER_VOLUME }}" - - "${{ env.OPENSTUDIO_HOST_VOLUME }}:${{ env.OPENSTUDIO_DOCKER_VOLUME }}" + - "/srv/data/jenkins/docker-volumes/conan-data:/home/ubuntu/conan-data" + - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/home/ubuntu/OpenStudio" steps: - name: Setup Python From fb57ba42a9412a3727f8cf289a8061199f362ae8 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 14:59:54 -0600 Subject: [PATCH 05/94] added pwd and ls commands --- .github/workflows/incremental-build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 00186b69bd0..e84b4a880bb 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -12,10 +12,10 @@ jobs: env: CONAN_USER_HOME: /home/runner/.conan2 AWS_REGION: us-west-2 - # CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data - # CONAN_DOCKER_VOLUME: /srv/data/jenkins/docker-volumes/conan-data - # OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 - # OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio + CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + CONAN_DOCKER_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 + OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio BRANCH_NAME: ${{ github.ref_name }} container: # Define the Docker container for the job. All subsequent steps run inside it. @@ -40,6 +40,7 @@ jobs: # Set up git and fetch PR head, then detect conan profile and install dependencies echo $PWD cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }} + echo $PWD && ls -la git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}" && \ git config user.email "cicommercialbuilding@gmail.com" && \ git config user.name "ci-commercialbuildings" && \ From 435a2b2c340b17600c9061aeb068f5efa68ef97b Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:07:33 -0600 Subject: [PATCH 06/94] Update Docker volume paths and build output directory Update container paths to use consistent environment variables and change the Conan build output directory from OS-build-release to OS-build-release-v2. Add OPENSTUDIO_SOURCE_VOLUME variable for better path management. --- .github/workflows/incremental-build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index e84b4a880bb..bad8b1a357f 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -13,9 +13,10 @@ jobs: CONAN_USER_HOME: /home/runner/.conan2 AWS_REGION: us-west-2 CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data - CONAN_DOCKER_VOLUME: /srv/data/jenkins/docker-volumes/conan-data + CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio + OPENSTUDIO_SOURCE_VOLUME: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/OpenStudio BRANCH_NAME: ${{ github.ref_name }} container: # Define the Docker container for the job. All subsequent steps run inside it. @@ -39,16 +40,16 @@ jobs: run: | # Set up git and fetch PR head, then detect conan profile and install dependencies echo $PWD - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }} + cd ${{ env.OPENSTUDIO_SOURCE_VOLUME }} echo $PWD && ls -la - git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}" && \ + git config --global --add safe.directory "${{ env.OPENSTUDIO_SOURCE_VOLUME }}" && \ git config user.email "cicommercialbuilding@gmail.com" && \ git config user.name "ci-commercialbuildings" && \ git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ git checkout origin/pr/${{ env.BRANCH_NAME }} && \ conan profile detect && \ - conan install . --output-folder=../OS-build-release --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release # # - name: Install dependencies and configure with CMake # # run: | From 6f5cadf1c064065c12cbb63b763aa003814e88cf Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:10:01 -0600 Subject: [PATCH 07/94] Fix OpenStudio source volume path in incremental build workflow Simplify the Docker volume configuration by directly specifying the full path to the OpenStudio source volume instead of using a derived environment variable. --- .github/workflows/incremental-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index bad8b1a357f..8fd64ea951e 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -15,8 +15,7 @@ jobs: CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 - OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio - OPENSTUDIO_SOURCE_VOLUME: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/OpenStudio + OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio BRANCH_NAME: ${{ github.ref_name }} container: # Define the Docker container for the job. All subsequent steps run inside it. From 70dee16b4e9b9b425f745a48adca1b1ba7c715ce Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:23:21 -0600 Subject: [PATCH 08/94] remove jenkinsfiles --- Jenkinsfile_develop_code_coverage | 11 ----------- Jenkinsfile_develop_osx | 10 ---------- Jenkinsfile_develop_ubuntu_2204 | 11 ----------- Jenkinsfile_develop_ubuntu_2404 | 11 ----------- Jenkinsfile_develop_windows | 10 ---------- 5 files changed, 53 deletions(-) delete mode 100644 Jenkinsfile_develop_code_coverage delete mode 100644 Jenkinsfile_develop_osx delete mode 100644 Jenkinsfile_develop_ubuntu_2204 delete mode 100644 Jenkinsfile_develop_ubuntu_2404 delete mode 100644 Jenkinsfile_develop_windows diff --git a/Jenkinsfile_develop_code_coverage b/Jenkinsfile_develop_code_coverage deleted file mode 100644 index f9a8a06e091..00000000000 --- a/Jenkinsfile_develop_code_coverage +++ /dev/null @@ -1,11 +0,0 @@ - -//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs - -@Library('cbci_shared_libs') _ - -// Build for PR to develop branch only. -if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { - - openstudio_incremental_code_coverage() - -} diff --git a/Jenkinsfile_develop_osx b/Jenkinsfile_develop_osx deleted file mode 100644 index d7d18e8711f..00000000000 --- a/Jenkinsfile_develop_osx +++ /dev/null @@ -1,10 +0,0 @@ -//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs - -@Library('cbci_shared_libs') _ - -// Build for PR to develop branch only. -if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { - - openstudio_incremental_develop_osx() - -} diff --git a/Jenkinsfile_develop_ubuntu_2204 b/Jenkinsfile_develop_ubuntu_2204 deleted file mode 100644 index 25b53af792d..00000000000 --- a/Jenkinsfile_develop_ubuntu_2204 +++ /dev/null @@ -1,11 +0,0 @@ - -//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs - -@Library('cbci_shared_libs') _ - -// Build for PR to develop branch only. -if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { - - openstudio_incremental_develop_ubuntu_2204() - -} diff --git a/Jenkinsfile_develop_ubuntu_2404 b/Jenkinsfile_develop_ubuntu_2404 deleted file mode 100644 index 97371474dbf..00000000000 --- a/Jenkinsfile_develop_ubuntu_2404 +++ /dev/null @@ -1,11 +0,0 @@ - -//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs - -@Library('cbci_shared_libs') _ - -// Build for PR to develop branch only. -if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { - - openstudio_incremental_develop_ubuntu_2404() - -} diff --git a/Jenkinsfile_develop_windows b/Jenkinsfile_develop_windows deleted file mode 100644 index cb285700d5a..00000000000 --- a/Jenkinsfile_develop_windows +++ /dev/null @@ -1,10 +0,0 @@ -//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs - -@Library('cbci_shared_libs') _ - -// Build for PR to develop branch only. -if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { - - openstudio_incremental_develop_windows() - -} From eb47f52f881825415896d8e1dc04d85bba4ddf53 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:28:35 -0600 Subject: [PATCH 09/94] Add debug output for branch name in incremental build workflow Print the BRANCH_NAME environment variable to help with troubleshooting the GitHub Actions workflow execution context. --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 8fd64ea951e..f768042e8cf 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -39,6 +39,7 @@ jobs: run: | # Set up git and fetch PR head, then detect conan profile and install dependencies echo $PWD + echo ${{ env.BRANCH_NAME }} cd ${{ env.OPENSTUDIO_SOURCE_VOLUME }} echo $PWD && ls -la git config --global --add safe.directory "${{ env.OPENSTUDIO_SOURCE_VOLUME }}" && \ From e9e523005748571a39f4c18bab86aee71d5d137c Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:31:15 -0600 Subject: [PATCH 10/94] fix: Use head_ref for PR builds in incremental workflow Update branch name variable to properly handle pull request builds by using github.head_ref when available, falling back to github.ref_name for direct branch builds. --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index f768042e8cf..59902151ee9 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,7 +16,7 @@ jobs: CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio - BRANCH_NAME: ${{ github.ref_name }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy From 223ad26c3c7adf2704e95ce0962ebb0d837cea58 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:35:44 -0600 Subject: [PATCH 11/94] Update PR number extraction in incremental build workflow Replace BRANCH_NAME with PR_NUMBER environment variable and improve extraction logic to handle both pull request numbers and branch name formats. --- .github/workflows/incremental-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 59902151ee9..eaf479678de 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,7 +16,7 @@ jobs: CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + PR_NUMBER: ${{ github.event.pull_request.number || split(github.ref_name, '/')[0] }} container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -39,7 +39,7 @@ jobs: run: | # Set up git and fetch PR head, then detect conan profile and install dependencies echo $PWD - echo ${{ env.BRANCH_NAME }} + echo ${{ env.PR_NUMBER }} cd ${{ env.OPENSTUDIO_SOURCE_VOLUME }} echo $PWD && ls -la git config --global --add safe.directory "${{ env.OPENSTUDIO_SOURCE_VOLUME }}" && \ @@ -47,7 +47,7 @@ jobs: git config user.name "ci-commercialbuildings" && \ git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - git checkout origin/pr/${{ env.BRANCH_NAME }} && \ + git checkout origin/pr/${{ env.PR_NUMBER }} && \ conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From e7f9700e750755d024e273e2abe7ec146d671910 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:37:29 -0600 Subject: [PATCH 12/94] Update PR_NUMBER environment variable in incremental build workflow Use github.ref instead of the previous complex expression for better reference handling in the CI pipeline. --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index eaf479678de..451f7280142 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,7 +16,7 @@ jobs: CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio - PR_NUMBER: ${{ github.event.pull_request.number || split(github.ref_name, '/')[0] }} + PR_NUMBER: ${{ github.ref }} container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy From 0391dc491b0e76d516a1983ba072cfc1f15e76a2 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:39:14 -0600 Subject: [PATCH 13/94] Fix PR number extraction in incremental build workflow Update the PR_NUMBER environment variable to correctly extract the pull request number from GitHub event context, falling back to github.ref when not available. --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 451f7280142..285fc8be7dc 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,7 +16,7 @@ jobs: CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio - PR_NUMBER: ${{ github.ref }} + PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy From c0cb20baafbcaf998852a34ff6245977565dddd4 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:43:48 -0600 Subject: [PATCH 14/94] Remove Conan environment variables and update volume mount path Updates the incremental build workflow by removing unnecessary Conan-related environment variables and fixing the volume mount path to use /home/root instead of /home/ubuntu/conan-data. --- .github/workflows/incremental-build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 285fc8be7dc..51a8bc1d8d2 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -10,10 +10,6 @@ jobs: runs-on: Linux env: - CONAN_USER_HOME: /home/runner/.conan2 - AWS_REGION: us-west-2 - CONAN_HOST_VOLUME: /srv/data/jenkins/docker-volumes/conan-data - CONAN_DOCKER_VOLUME: /home/conan-data OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} @@ -22,7 +18,7 @@ jobs: image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally volumes: - - "/srv/data/jenkins/docker-volumes/conan-data:/home/ubuntu/conan-data" + - "/srv/data/jenkins/docker-volumes/conan-data:/home/root" - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/home/ubuntu/OpenStudio" steps: From 1f2c9533318c910d985742f9384a1c51067e4f62 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:45:15 -0600 Subject: [PATCH 15/94] Remove unnecessary pip install conan step from incremental build workflow --- .github/workflows/incremental-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 51a8bc1d8d2..634c5cdac64 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -26,10 +26,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.12' - - - name: Enviroment display - run: | - pip install conan - name: Cmake Setup run: | From 1ac5d3d9e251fad2a09841c7dfebb583a5e7337b Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:48:02 -0600 Subject: [PATCH 16/94] Add whoami command to debug CI environment in incremental build workflow --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 634c5cdac64..47881d565d3 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -40,6 +40,7 @@ jobs: git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ git checkout origin/pr/${{ env.PR_NUMBER }} && \ + echo whoami conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 2be29ee219b688411a9bcb4e4fe63932e34b30bd Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:48:51 -0600 Subject: [PATCH 17/94] fix: remove echo from whoami command in incremental build workflow --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 47881d565d3..97340e900c2 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -40,7 +40,7 @@ jobs: git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ git checkout origin/pr/${{ env.PR_NUMBER }} && \ - echo whoami + whoami conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 37eb69049ccdc998bfdab7d1fb9adcbb27923c3b Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:50:53 -0600 Subject: [PATCH 18/94] Add disk space and home directory checks to CI workflow Add diagnostic commands to display available disk space and list home directory contents in the incremental build workflow, helping to troubleshoot CI environment issues. --- .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 97340e900c2..e038965eb17 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -41,6 +41,8 @@ jobs: git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ git checkout origin/pr/${{ env.PR_NUMBER }} && \ whoami + df -h + ls -la /github/home conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From efae7f87f1e398b609df7bc8c99b27bb98a25b8a Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 15:53:56 -0600 Subject: [PATCH 19/94] Add debug commands to incremental build workflow Add ls command to check /home/root directory and tail command to prevent workflow from exiting prematurely during troubleshooting. --- .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 e038965eb17..406fde60829 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -43,6 +43,8 @@ jobs: whoami df -h ls -la /github/home + ls -la /home/root + tail -f /dev/null conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 0dab21eb4c97e2ff393a75fea4109f499da737c2 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:00:34 -0600 Subject: [PATCH 20/94] Update Conan cache volume mapping in incremental build workflow Map the Conan 2 cache directory correctly to preserve cache between builds --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 406fde60829..2cf541fe431 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -18,7 +18,7 @@ jobs: image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally volumes: - - "/srv/data/jenkins/docker-volumes/conan-data:/home/root" + - "/srv/data/jenkins/docker-volumes/conan-data/.conan2:/github/home/.conan2" # Conan cache - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/home/ubuntu/OpenStudio" steps: From ece9fd086b7a1c504f7281a8c88b92fd3110a6d0 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:04:54 -0600 Subject: [PATCH 21/94] Remove debug tail command from incremental build workflow The workflow no longer needs the `tail -f /dev/null` command that was likely used for debugging purposes. --- .github/workflows/incremental-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 2cf541fe431..7baad3cc470 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -44,7 +44,6 @@ jobs: df -h ls -la /github/home ls -la /home/root - tail -f /dev/null conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 6cf90ccb76e5682394b3adfa5761db3e6ab7df76 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:06:10 -0600 Subject: [PATCH 22/94] Comment out conan profile detect in incremental build workflow The change disables the automatic profile detection step in the Conan package manager configuration, while preserving the rest of the installation process. --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 7baad3cc470..c959e758727 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -44,7 +44,7 @@ jobs: df -h ls -la /github/home ls -la /home/root - conan profile detect && \ + # conan profile detect && \ conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release # # - name: Install dependencies and configure with CMake From 66744f026a44310b0c332314f077f1817d08432f Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:38:58 -0600 Subject: [PATCH 23/94] Update incremental build workflow with improved Docker volume structure Refactor GitHub workflow by introducing environment variables for Docker volumes and paths. Enable CMake configuration step with detailed build options for OpenStudio. Fix directory structure references for better maintainability. --- .github/workflows/incremental-build.yml | 54 ++++++++++++------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index c959e758727..28330df609d 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -11,7 +11,9 @@ jobs: env: OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 - OPENSTUDIO_SOURCE_VOLUME: /home/ubuntu/OpenStudio/OpenStudio + OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio + OPENSTUDIO_SOURCE_NAME: OpenStudio + OPENSTUDIO_BUILD_NAME: OS-build-release-v2 PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} container: # Define the Docker container for the job. All subsequent steps run inside it. @@ -30,38 +32,36 @@ jobs: - name: Cmake Setup run: | # Set up git and fetch PR head, then detect conan profile and install dependencies - echo $PWD - echo ${{ env.PR_NUMBER }} - cd ${{ env.OPENSTUDIO_SOURCE_VOLUME }} - echo $PWD && ls -la - git config --global --add safe.directory "${{ env.OPENSTUDIO_SOURCE_VOLUME }}" && \ + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} + git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ git config user.email "cicommercialbuilding@gmail.com" && \ git config user.name "ci-commercialbuildings" && \ git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ git checkout origin/pr/${{ env.PR_NUMBER }} && \ - whoami - df -h - ls -la /github/home - ls -la /home/root - # conan profile detect && \ - conan install . --output-folder=../OS-build-release-v2 --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release -# # - name: Install dependencies and configure with CMake -# # run: | -# # echo $PWD -# # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }} -# # mkdir -p OS-build-release-v2 -# # cd OS-build-release-v2 -# # conan install ../OpenStudio --output-folder=. --build=missing \ -# # -c tools.cmake.cmaketoolchain:generator=Ninja \ -# # -s compiler.cppstd=20 -s build_type=Release -# # source ./conanbuild.sh -# cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ -# -DCMAKE_BUILD_TYPE=Release \ -# -DBUILD_TESTING=ON -DCPACK_BINARY_DEB=ON -DCPACK_BINARY_TGZ=ON \ -# -DBUILD_PYTHON_BINDINGS=ON -DBUILD_CLI=ON -DPYTHON_VERSION=3.12.2 \ -# ../OpenStudio + - name: Install dependencies and configure with CMake + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + source ./conanbuild.sh + cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ + -DCPACK_BINARY_TGZ:BOOL=ON \ + -DCPACK_BINARY_IFW:BOOL=OFF \ + -DCPACK_BINARY_NSIS:BOOL=OFF \ + -DCPACK_BINARY_RPM:BOOL=OFF \ + -DCPACK_BINARY_STGZ:BOOL=OFF \ + -DCPACK_BINARY_TBZ2:BOOL=OFF \ + -DCPACK_BINARY_TXZ:BOOL=OFF \ + -DCPACK_BINARY_TZ:BOOL=OFF \ + -DBUILD_PYTHON_BINDINGS:BOOL=ON \ + -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ + -DPYTHON_VERSION:STRING=3.12.2 \ + -DBUILD_RUBY_BINDINGS:BOOL=ON \ + -DBUILD_CLI:BOOL=ON \ + ../${{ OPENSTUDIO_SOURCE_NAME }} # - name: Build with Ninja # run: | From 04e455846faad8d715b77a6fe6b7b47b76d7d074 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:40:54 -0600 Subject: [PATCH 24/94] Fix environment variable reference in incremental build workflow Correct the reference to OPENSTUDIO_SOURCE_NAME by adding the 'env.' prefix to properly access the environment variable in the CMake configuration step. --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 28330df609d..8a8efeaeb6f 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -61,7 +61,7 @@ jobs: -DPYTHON_VERSION:STRING=3.12.2 \ -DBUILD_RUBY_BINDINGS:BOOL=ON \ -DBUILD_CLI:BOOL=ON \ - ../${{ OPENSTUDIO_SOURCE_NAME }} + ../${{ env.OPENSTUDIO_SOURCE_NAME }} # - name: Build with Ninja # run: | From 4cd0efbbda1d0e2a394a4b1fc09622b03c69bf8a Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:44:49 -0600 Subject: [PATCH 25/94] Fix indentation in CMake configuration command Corrects the indentation of the CMake command in the incremental build workflow, improving readability while maintaining the same functionality. --- .github/workflows/incremental-build.yml | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 8a8efeaeb6f..65765ce9d28 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -45,23 +45,23 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} source ./conanbuild.sh - cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ - -DCPACK_BINARY_TGZ:BOOL=ON \ - -DCPACK_BINARY_IFW:BOOL=OFF \ - -DCPACK_BINARY_NSIS:BOOL=OFF \ - -DCPACK_BINARY_RPM:BOOL=OFF \ - -DCPACK_BINARY_STGZ:BOOL=OFF \ - -DCPACK_BINARY_TBZ2:BOOL=OFF \ - -DCPACK_BINARY_TXZ:BOOL=OFF \ - -DCPACK_BINARY_TZ:BOOL=OFF \ - -DBUILD_PYTHON_BINDINGS:BOOL=ON \ - -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ - -DPYTHON_VERSION:STRING=3.12.2 \ - -DBUILD_RUBY_BINDINGS:BOOL=ON \ - -DBUILD_CLI:BOOL=ON \ - ../${{ env.OPENSTUDIO_SOURCE_NAME }} + cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ + -DCPACK_BINARY_TGZ:BOOL=ON \ + -DCPACK_BINARY_IFW:BOOL=OFF \ + -DCPACK_BINARY_NSIS:BOOL=OFF \ + -DCPACK_BINARY_RPM:BOOL=OFF \ + -DCPACK_BINARY_STGZ:BOOL=OFF \ + -DCPACK_BINARY_TBZ2:BOOL=OFF \ + -DCPACK_BINARY_TXZ:BOOL=OFF \ + -DCPACK_BINARY_TZ:BOOL=OFF \ + -DBUILD_PYTHON_BINDINGS:BOOL=ON \ + -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ + -DPYTHON_VERSION:STRING=3.12.2 \ + -DBUILD_RUBY_BINDINGS:BOOL=ON \ + -DBUILD_CLI:BOOL=ON \ + ../${{ env.OPENSTUDIO_SOURCE_NAME }} # - name: Build with Ninja # run: | From d825b84a98523a37e173c72bfa3763fe18dedf6a Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:47:56 -0600 Subject: [PATCH 26/94] Comment out Python setup step in incremental build workflow The change removes the Python setup step from the GitHub Actions workflow by commenting it out, as it may not be necessary for the incremental build process. --- .github/workflows/incremental-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 65765ce9d28..702818b8925 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -24,10 +24,10 @@ jobs: - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/home/ubuntu/OpenStudio" steps: - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' + # - name: Setup Python + # uses: actions/setup-python@v5 + # with: + # python-version: '3.12' - name: Cmake Setup run: | From a368077ec18bd121aeb29b443d64fb89e2272812 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:49:37 -0600 Subject: [PATCH 27/94] Add debugging pause in incremental build workflow Add tail -f /dev/null command to pause execution in the GitHub workflow, allowing for debugging and investigation of the build environment before proceeding with the build process. --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 702818b8925..c2114377541 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -44,6 +44,7 @@ jobs: - name: Install dependencies and configure with CMake run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + tail -f /dev/null source ./conanbuild.sh cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE:STRING=Release \ From 55ab4321a7d52d8273440d8080e7991701668726 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:54:15 -0600 Subject: [PATCH 28/94] Fix CMake command formatting in incremental build workflow Improve readability of the CMake command by breaking it into multiple lines with proper line continuation using backslashes. --- .github/workflows/incremental-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index c2114377541..75c60cb5fd8 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -46,7 +46,8 @@ jobs: cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} tail -f /dev/null source ./conanbuild.sh - cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake + cmake -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ -DCPACK_BINARY_TGZ:BOOL=ON \ From f9f7288721b7417a2227cc630dd801bd4a93ca9d Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:54:57 -0600 Subject: [PATCH 29/94] Remove debug tail command from incremental build workflow The change removes an unnecessary `tail -f /dev/null` command from the GitHub Actions workflow that was likely used for debugging purposes. --- .github/workflows/incremental-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 75c60cb5fd8..1f8be8d22c9 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -44,7 +44,6 @@ jobs: - name: Install dependencies and configure with CMake run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - tail -f /dev/null source ./conanbuild.sh cmake -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ From e9d33e60163f9b602dd75b3ce36fd8d9fabb371c Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:57:36 -0600 Subject: [PATCH 30/94] Add printenv command to incremental build workflow for debugging --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1f8be8d22c9..ef2c4d9faa1 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -45,6 +45,7 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} source ./conanbuild.sh + printenv cmake -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ From 313c7999c3f796868e54edc9fe82c6beab13fe37 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:58:43 -0600 Subject: [PATCH 31/94] Comment out cmake configuration in incremental build workflow The change temporarily disables the cmake configuration step in the GitHub Actions incremental build workflow by commenting out the entire cmake command and its parameters. --- .github/workflows/incremental-build.yml | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index ef2c4d9faa1..5508db85445 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -46,24 +46,24 @@ jobs: cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} source ./conanbuild.sh printenv - cmake -G Ninja \ - -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ - -DCPACK_BINARY_TGZ:BOOL=ON \ - -DCPACK_BINARY_IFW:BOOL=OFF \ - -DCPACK_BINARY_NSIS:BOOL=OFF \ - -DCPACK_BINARY_RPM:BOOL=OFF \ - -DCPACK_BINARY_STGZ:BOOL=OFF \ - -DCPACK_BINARY_TBZ2:BOOL=OFF \ - -DCPACK_BINARY_TXZ:BOOL=OFF \ - -DCPACK_BINARY_TZ:BOOL=OFF \ - -DBUILD_PYTHON_BINDINGS:BOOL=ON \ - -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ - -DPYTHON_VERSION:STRING=3.12.2 \ - -DBUILD_RUBY_BINDINGS:BOOL=ON \ - -DBUILD_CLI:BOOL=ON \ - ../${{ env.OPENSTUDIO_SOURCE_NAME }} + # cmake -G Ninja \ + # -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ + # -DCMAKE_BUILD_TYPE:STRING=Release \ + # -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ + # -DCPACK_BINARY_TGZ:BOOL=ON \ + # -DCPACK_BINARY_IFW:BOOL=OFF \ + # -DCPACK_BINARY_NSIS:BOOL=OFF \ + # -DCPACK_BINARY_RPM:BOOL=OFF \ + # -DCPACK_BINARY_STGZ:BOOL=OFF \ + # -DCPACK_BINARY_TBZ2:BOOL=OFF \ + # -DCPACK_BINARY_TXZ:BOOL=OFF \ + # -DCPACK_BINARY_TZ:BOOL=OFF \ + # -DBUILD_PYTHON_BINDINGS:BOOL=ON \ + # -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ + # -DPYTHON_VERSION:STRING=3.12.2 \ + # -DBUILD_RUBY_BINDINGS:BOOL=ON \ + # -DBUILD_CLI:BOOL=ON \ + # ../${{ env.OPENSTUDIO_SOURCE_NAME }} # - name: Build with Ninja # run: | From 4c73b47e6b1494873532325279fd55c8dfcbda64 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 16:59:52 -0600 Subject: [PATCH 32/94] Comment out conanbuild.sh sourcing in incremental build workflow The change temporarily disables the sourcing of conanbuild.sh in the GitHub Actions workflow, adding an ls command to inspect directory contents instead. This appears to be a debugging change to troubleshoot build issues. --- .github/workflows/incremental-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 5508db85445..cdce0f30649 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -44,7 +44,8 @@ jobs: - name: Install dependencies and configure with CMake run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - source ./conanbuild.sh + ls -la + # source ./conanbuild.sh printenv # cmake -G Ninja \ # -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ From 4a17bd52f60977c2adb3bee3b11b5b22829d79ab Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 17:01:14 -0600 Subject: [PATCH 33/94] fix: source conanbuild.sh in incremental build workflow Uncomment the sourcing of conanbuild.sh script and add a command to display its contents for debugging purposes in the CI workflow. --- .github/workflows/incremental-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index cdce0f30649..e7dd3fea10b 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -45,7 +45,8 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} ls -la - # source ./conanbuild.sh + cat ./conanbuild.sh + . ./conanbuild.sh printenv # cmake -G Ninja \ # -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ From bc9976f4e0c12feb559558964dea4f1c9f1e945b Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 17:02:27 -0600 Subject: [PATCH 34/94] Uncomment CMake configuration in incremental build workflow Remove debug commands and enable the previously commented CMake configuration step in the GitHub Actions workflow. --- .github/workflows/incremental-build.yml | 39 ++++++++++++------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index e7dd3fea10b..f520f76c913 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -44,28 +44,25 @@ jobs: - name: Install dependencies and configure with CMake run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ls -la - cat ./conanbuild.sh . ./conanbuild.sh - printenv - # cmake -G Ninja \ - # -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ - # -DCMAKE_BUILD_TYPE:STRING=Release \ - # -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ - # -DCPACK_BINARY_TGZ:BOOL=ON \ - # -DCPACK_BINARY_IFW:BOOL=OFF \ - # -DCPACK_BINARY_NSIS:BOOL=OFF \ - # -DCPACK_BINARY_RPM:BOOL=OFF \ - # -DCPACK_BINARY_STGZ:BOOL=OFF \ - # -DCPACK_BINARY_TBZ2:BOOL=OFF \ - # -DCPACK_BINARY_TXZ:BOOL=OFF \ - # -DCPACK_BINARY_TZ:BOOL=OFF \ - # -DBUILD_PYTHON_BINDINGS:BOOL=ON \ - # -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ - # -DPYTHON_VERSION:STRING=3.12.2 \ - # -DBUILD_RUBY_BINDINGS:BOOL=ON \ - # -DBUILD_CLI:BOOL=ON \ - # ../${{ env.OPENSTUDIO_SOURCE_NAME }} + cmake -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ + -DCPACK_BINARY_TGZ:BOOL=ON \ + -DCPACK_BINARY_IFW:BOOL=OFF \ + -DCPACK_BINARY_NSIS:BOOL=OFF \ + -DCPACK_BINARY_RPM:BOOL=OFF \ + -DCPACK_BINARY_STGZ:BOOL=OFF \ + -DCPACK_BINARY_TBZ2:BOOL=OFF \ + -DCPACK_BINARY_TXZ:BOOL=OFF \ + -DCPACK_BINARY_TZ:BOOL=OFF \ + -DBUILD_PYTHON_BINDINGS:BOOL=ON \ + -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ + -DPYTHON_VERSION:STRING=3.12.2 \ + -DBUILD_RUBY_BINDINGS:BOOL=ON \ + -DBUILD_CLI:BOOL=ON \ + ../${{ env.OPENSTUDIO_SOURCE_NAME }} # - name: Build with Ninja # run: | From f7f622bb12dd893aa0b4f1862526ab3921177313 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 17:10:14 -0600 Subject: [PATCH 35/94] Uncomment and update Ninja build step in incremental workflow Enable the previously commented out Ninja build step and improve it by using dynamic CPU core allocation and proper environment variable references for build directories. --- .github/workflows/incremental-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index f520f76c913..1dff15e68ce 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -64,11 +64,11 @@ jobs: -DBUILD_CLI:BOOL=ON \ ../${{ env.OPENSTUDIO_SOURCE_NAME }} -# - name: Build with Ninja -# run: | -# cd OS-build-release-v2 -# source ./conanbuild.sh -# ninja -j 2 package + - name: Build with Ninja + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + source ./conanbuild.sh + ninja -j $(( $(nproc) - 1 )) package # - name: Run CTests with retries # run: | From 4f01c15ec77183630c4d1cd3067e442402803897 Mon Sep 17 00:00:00 2001 From: anchapin Date: Wed, 25 Jun 2025 17:12:14 -0600 Subject: [PATCH 36/94] fix: use dot operator instead of source in build script --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1dff15e68ce..3f5b1559855 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -67,7 +67,7 @@ jobs: - name: Build with Ninja run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - source ./conanbuild.sh + . ./conanbuild.sh ninja -j $(( $(nproc) - 1 )) package # - name: Run CTests with retries From 5b8668115bd339c44f15d2a5dcfaec99d288e26b Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 08:41:13 -0600 Subject: [PATCH 37/94] Using 80% of the cores instead of max-1 since last time it crashed --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 3f5b1559855..e6d35eeeace 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -68,7 +68,7 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} . ./conanbuild.sh - ninja -j $(( $(nproc) - 1 )) package + ninja -j $(( ($(nproc) * 80 + 50) / 100 )) package # - name: Run CTests with retries # run: | From 460450244dfcf6aa04f20f4a33de5978c37f70b9 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 08:55:20 -0600 Subject: [PATCH 38/94] fix: use MAX_SAFE_THREADS variable for Ninja and CTest parallelism --- .github/workflows/incremental-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index e6d35eeeace..42e6bf9122a 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -15,6 +15,7 @@ jobs: OPENSTUDIO_SOURCE_NAME: OpenStudio OPENSTUDIO_BUILD_NAME: OS-build-release-v2 PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} + MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -68,14 +69,14 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} . ./conanbuild.sh - ninja -j $(( ($(nproc) * 80 + 50) / 100 )) package + ninja -j ${{ env.MAX_SAFE_THREADS }} package - # - name: Run CTests with retries - # run: | - # cd OS-build-release-v2 - # ctest -j 2 -T test --no-compress-output --output-on-failure || \ - # ctest -T test -j 2 --rerun-failed --no-compress-output --output-on-failure || \ - # ctest -T test -j 2 --rerun-failed --no-compress-output -VV + - name: Run CTests with retries + run: | + cd OS-build-release-v2 + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV # - name: Upload build artifacts # uses: actions/upload-artifact@v4 From 6e7e02e391aec795fe77c4e8e8cf0a88d440e0fa Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 09:00:49 -0600 Subject: [PATCH 39/94] fix: update CTest directory path to use environment variables --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 42e6bf9122a..4e2052cc4ca 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -73,7 +73,7 @@ jobs: - name: Run CTests with retries run: | - cd OS-build-release-v2 + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV From 724bd01066f9d3c1745823c76acc8489478ca94d Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 09:17:51 -0600 Subject: [PATCH 40/94] fix: update CTest command and enable artifact upload in incremental build workflow --- .github/workflows/incremental-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 4e2052cc4ca..6c86bb06662 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -77,14 +77,15 @@ jobs: ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV + continue-on-error: true - # - name: Upload build artifacts - # uses: actions/upload-artifact@v4 - # with: - # name: ubuntu-2204-artifacts - # path: | - # OS-build-release-v2/*.deb - # OS-build-release-v2/_CPack_Packages/Linux/TGZ/*.tar.gz + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: ubuntu-2204-artifacts + path: | + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz # - name: Upload to S3 # if: github.event_name == 'pull_request' From b894aaeb65fe602a616aa2d167ee3e0490adf811 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 13:36:07 -0600 Subject: [PATCH 41/94] fix: update CTest directory path and enhance test result handling in incremental build workflow --- .github/workflows/incremental-build.yml | 40 +++++++++++++------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 6c86bb06662..a8cc8b8eec1 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,6 +16,7 @@ jobs: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) + CTEST_DIR: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -25,10 +26,10 @@ jobs: - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/home/ubuntu/OpenStudio" steps: - # - name: Setup Python - # uses: actions/setup-python@v5 - # with: - # python-version: '3.12' + - name: Cleanup ctest directory + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + rm -rf ${{ env.CTEST_DIR }} - name: Cmake Setup run: | @@ -74,11 +75,22 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV + tail -f /dev/null & + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_DIR } || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_DIR } || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${ env.CTEST_DIR } continue-on-error: true + - name: Run CTest and Generate JUnit XML + run: | + cd build + ctest --output-junit ctest-results.xml --test-dir . # Or adjust path based on your project + if: always() # Ensure this step runs even if tests fail + - name: Publish Test Results + uses: test-summary/action@v2 # Or choose a different test reporting action + with: + paths: "build/ctest-results.xml" # Path to the generated JUnit XML file + if: always() # Ensure this step runs even if tests fail - name: Upload build artifacts uses: actions/upload-artifact@v4 with: @@ -86,15 +98,5 @@ jobs: path: | ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz - - # - name: Upload to S3 - # if: github.event_name == 'pull_request' - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # run: | - # sudo apt-get install -y awscli - # cd OS-build-release-v2 - # BRANCH=${{ github.head_ref }} - # aws s3 cp *.deb s3://openstudio-ci-builds/$BRANCH/ --acl public-read - # aws s3 cp _CPack_Packages/Linux/TGZ/*.tar.gz s3://openstudio-ci-builds/$BRANCH/ --acl public-read + env: + NODE_TLS_REJECT_UNAUTHORIZED: '0' From 04692675eabbe804ca5f3f1b144cff0098c2d8f9 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 13:38:51 -0600 Subject: [PATCH 42/94] fix: update CTest results directory variable and cleanup step --- .github/workflows/incremental-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index a8cc8b8eec1..774703ab81a 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,7 +16,7 @@ jobs: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) - CTEST_DIR: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing + CTEST_RESULTS: Testing container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -29,7 +29,7 @@ jobs: - name: Cleanup ctest directory run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - rm -rf ${{ env.CTEST_DIR }} + rm -rf ${{ env.CTEST_RESULTS }} - name: Cmake Setup run: | @@ -76,9 +76,9 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} tail -f /dev/null & - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_DIR } || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_DIR } || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${ env.CTEST_DIR } + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } continue-on-error: true - name: Run CTest and Generate JUnit XML run: | From d149a52bf40783439e5bd54e85cd249d8c45881b Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 13:47:21 -0600 Subject: [PATCH 43/94] fix: streamline CTest execution and remove redundant steps in incremental build workflow --- .github/workflows/incremental-build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 774703ab81a..00eb79ee942 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -75,22 +75,17 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - tail -f /dev/null & ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } || \ ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } || \ ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } + if: always() continue-on-error: true - - name: Run CTest and Generate JUnit XML - run: | - cd build - ctest --output-junit ctest-results.xml --test-dir . # Or adjust path based on your project - if: always() # Ensure this step runs even if tests fail - name: Publish Test Results uses: test-summary/action@v2 # Or choose a different test reporting action with: paths: "build/ctest-results.xml" # Path to the generated JUnit XML file - if: always() # Ensure this step runs even if tests fail + - name: Upload build artifacts uses: actions/upload-artifact@v4 with: From 12413ae223a4510ca1376e62800d6ef07c8cb482 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 13:56:17 -0600 Subject: [PATCH 44/94] fix: correct CMake options and improve CTest execution flow in incremental build workflow --- .github/workflows/incremental-build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 00eb79ee942..f8363dbf21a 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -50,7 +50,8 @@ jobs: cmake -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DBUILD_TESTING:BOOL=ON-DCPACK_BINARY_DEB:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCPACK_BINARY_DEB:BOOL=ON \ -DCPACK_BINARY_TGZ:BOOL=ON \ -DCPACK_BINARY_IFW:BOOL=OFF \ -DCPACK_BINARY_NSIS:BOOL=OFF \ @@ -75,9 +76,9 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${ env.CTEST_RESULTS } + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${{ env.CTEST_RESULTS }} || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${{ env.CTEST_RESULTS }} || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${{ env.CTEST_RESULTS }} if: always() continue-on-error: true From 7defb8ea1f659174d348350978ce128db8a6e53e Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:06:46 -0600 Subject: [PATCH 45/94] fix: update CTest results handling and cleanup process in incremental build workflow --- .github/workflows/incremental-build.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index f8363dbf21a..6ccb4d65657 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,7 +16,6 @@ jobs: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) - CTEST_RESULTS: Testing container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -29,7 +28,7 @@ jobs: - name: Cleanup ctest directory run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - rm -rf ${{ env.CTEST_RESULTS }} + rm -rf Testing - name: Cmake Setup run: | @@ -76,16 +75,15 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${{ env.CTEST_RESULTS }} || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit ctest-results.xml --test-dir ${{ env.CTEST_RESULTS }} || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit ctest-results.xml --test-dir ${{ env.CTEST_RESULTS }} - if: always() + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV continue-on-error: true - name: Publish Test Results uses: test-summary/action@v2 # Or choose a different test reporting action with: - paths: "build/ctest-results.xml" # Path to the generated JUnit XML file + paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/**/*.xml" # Path to the generated JUnit XML file - name: Upload build artifacts uses: actions/upload-artifact@v4 From dbdafa10c1e171eb18ec73ed015d17e9df9dde49 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:22:17 -0600 Subject: [PATCH 46/94] fix: update CTest execution to include JUnit output and modify test result publishing --- .github/workflows/incremental-build.yml | 106 ++++++++++++------------ 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 6ccb4d65657..892ddaaa3ba 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -30,67 +30,67 @@ jobs: cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} rm -rf Testing - - name: Cmake Setup - run: | - # Set up git and fetch PR head, then detect conan profile and install dependencies - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} - git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ - git config user.email "cicommercialbuilding@gmail.com" && \ - git config user.name "ci-commercialbuildings" && \ - git fetch origin && \ - git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - git checkout origin/pr/${{ env.PR_NUMBER }} && \ - conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + # - name: Cmake Setup + # run: | + # # Set up git and fetch PR head, then detect conan profile and install dependencies + # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} + # git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ + # git config user.email "cicommercialbuilding@gmail.com" && \ + # git config user.name "ci-commercialbuildings" && \ + # git fetch origin && \ + # git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ + # git checkout origin/pr/${{ env.PR_NUMBER }} && \ + # conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - - name: Install dependencies and configure with CMake - run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - . ./conanbuild.sh - cmake -G Ninja \ - -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DBUILD_TESTING:BOOL=ON \ - -DCPACK_BINARY_DEB:BOOL=ON \ - -DCPACK_BINARY_TGZ:BOOL=ON \ - -DCPACK_BINARY_IFW:BOOL=OFF \ - -DCPACK_BINARY_NSIS:BOOL=OFF \ - -DCPACK_BINARY_RPM:BOOL=OFF \ - -DCPACK_BINARY_STGZ:BOOL=OFF \ - -DCPACK_BINARY_TBZ2:BOOL=OFF \ - -DCPACK_BINARY_TXZ:BOOL=OFF \ - -DCPACK_BINARY_TZ:BOOL=OFF \ - -DBUILD_PYTHON_BINDINGS:BOOL=ON \ - -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ - -DPYTHON_VERSION:STRING=3.12.2 \ - -DBUILD_RUBY_BINDINGS:BOOL=ON \ - -DBUILD_CLI:BOOL=ON \ - ../${{ env.OPENSTUDIO_SOURCE_NAME }} + # - name: Install dependencies and configure with CMake + # run: | + # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + # . ./conanbuild.sh + # cmake -G Ninja \ + # -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ + # -DCMAKE_BUILD_TYPE:STRING=Release \ + # -DBUILD_TESTING:BOOL=ON \ + # -DCPACK_BINARY_DEB:BOOL=ON \ + # -DCPACK_BINARY_TGZ:BOOL=ON \ + # -DCPACK_BINARY_IFW:BOOL=OFF \ + # -DCPACK_BINARY_NSIS:BOOL=OFF \ + # -DCPACK_BINARY_RPM:BOOL=OFF \ + # -DCPACK_BINARY_STGZ:BOOL=OFF \ + # -DCPACK_BINARY_TBZ2:BOOL=OFF \ + # -DCPACK_BINARY_TXZ:BOOL=OFF \ + # -DCPACK_BINARY_TZ:BOOL=OFF \ + # -DBUILD_PYTHON_BINDINGS:BOOL=ON \ + # -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ + # -DPYTHON_VERSION:STRING=3.12.2 \ + # -DBUILD_RUBY_BINDINGS:BOOL=ON \ + # -DBUILD_CLI:BOOL=ON \ + # ../${{ env.OPENSTUDIO_SOURCE_NAME }} - - name: Build with Ninja - run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - . ./conanbuild.sh - ninja -j ${{ env.MAX_SAFE_THREADS }} package + # - name: Build with Ninja + # run: | + # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + # . ./conanbuild.sh + # ninja -j ${{ env.MAX_SAFE_THREADS }} package - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/ctest-results.xml continue-on-error: true - name: Publish Test Results - uses: test-summary/action@v2 # Or choose a different test reporting action + uses: EnricoMi/publish-unit-test-result-action/composite@v2 # Or choose a different test reporting action with: - paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/**/*.xml" # Path to the generated JUnit XML file + paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/ctest-results.xml" # Path to the generated JUnit XML file - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: ubuntu-2204-artifacts - path: | - ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb - ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz - env: - NODE_TLS_REJECT_UNAUTHORIZED: '0' + # - name: Upload build artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: ubuntu-2204-artifacts + # path: | + # ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb + # ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz + # env: + # NODE_TLS_REJECT_UNAUTHORIZED: '0' From 21f7798c0dd3334eabe475bf53fab47fb5bb475e Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:30:30 -0600 Subject: [PATCH 47/94] fix: update CTest execution commands and modify test result publishing in incremental build workflow; remove macOS and Windows workflow files --- .github/workflows/incremental-build.yml | 13 ++++++++----- .github/workflows/mac.yml | 25 ------------------------- .github/workflows/windows.yml | 24 ------------------------ 3 files changed, 8 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/mac.yml delete mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 892ddaaa3ba..bb6a67bc1cb 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -75,15 +75,18 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/ctest-results.xml + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV + # ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ + # ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ + # ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/ctest-results.xml continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action/composite@v2 # Or choose a different test reporting action + uses: EnricoMi/publish-unit-test-result-action/linux@2 with: - paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/ctest-results.xml" # Path to the generated JUnit XML file + files: Testing/**/*.xml # - name: Upload build artifacts # uses: actions/upload-artifact@v4 diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml deleted file mode 100644 index 58a20a57211..00000000000 --- a/.github/workflows/mac.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Test Self-hosted Runner -on: push - -jobs: - test-self-hosted: - runs-on: macOS - env: - BRANCH_NAME: ${{ github.ref_name }} - BUILD_NUMBER: ${{ github.run_number }} - DEPLOY_PATH: ${{ github.repository }}/${{ github.ref_name }}/${{ github.run_number }} # Path for S3 deployment - S3_BUCKET: ext-gem-dashboard - - steps: - - name: Checkout Repository - # The repository will be checked out inside the 'nrel/openstudio:3.10.0' container - uses: actions/checkout@v4 # Use v4 for better security and features - with: - submodules: true # Set to true if your repository uses Git submodules - - - name: Test bash command - shell: bash - run: | - conan --version - cmake --version - ninja --version \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index f1621fc0481..00000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Test Self-hosted Runner -on: push - -jobs: - test-self-hosted: - runs-on: windows - env: - BRANCH_NAME: ${{ github.ref_name }} - BUILD_NUMBER: ${{ github.run_number }} - DEPLOY_PATH: ${{ github.repository }}/${{ github.ref_name }}/${{ github.run_number }} # Path for S3 deployment - S3_BUCKET: ext-gem-dashboard - - steps: - - name: Checkout Repository - # The repository will be checked out inside the 'nrel/openstudio:3.10.0' container - uses: actions/checkout@v4 # Use v4 for better security and features - with: - submodules: true # Set to true if your repository uses Git submodules - - - name: Test cmd command - shell: cmd - run: | - conan --version - cmake --version From d78b2dd470d51b132c9e365d7a6c09b026a8dd53 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:33:43 -0600 Subject: [PATCH 48/94] fix: update test result publishing action to use version v2 in incremental build workflow --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index bb6a67bc1cb..1092228d29c 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -84,7 +84,7 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action/linux@2 + uses: EnricoMi/publish-unit-test-result-action/linux@v2 with: files: Testing/**/*.xml From 4deee6120be1000173601dcd3ea02d05e5eb297a Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:37:12 -0600 Subject: [PATCH 49/94] fix: update test result publishing action to use version v2 --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1092228d29c..b99c7413d64 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -84,7 +84,7 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action/linux@v2 + uses: EnricoMi/publish-unit-test-result-action@v2 with: files: Testing/**/*.xml From 3cdecd3ffa42642a96bef76c660193462725d9eb Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:38:02 -0600 Subject: [PATCH 50/94] fix: update test result publishing action to use composite version v2 --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index b99c7413d64..b4e0b321802 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -84,7 +84,7 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 + uses: EnricoMi/publish-unit-test-result-action/composite@v2 with: files: Testing/**/*.xml From 5ceb7bc3270ad286162feb726fc59b7d23048f93 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:40:26 -0600 Subject: [PATCH 51/94] fix: enhance CTest execution to include JUnit output and update test result publishing action --- .github/workflows/incremental-build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index b4e0b321802..b6da5a71ded 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -75,18 +75,18 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV - # ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ - # ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ - # ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/ctest-results.xml + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/ctest-results.xml continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action/composite@v2 + uses: EnricoMi/publish-unit-test-result-action@v2 + if: (!cancelled()) with: files: Testing/**/*.xml + check_name: "CTest Results" + comment_title: "CTest Results" # - name: Upload build artifacts # uses: actions/upload-artifact@v4 From 91c349d7e21cbf48631a57ed608581e55a4b8bab Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:42:05 -0600 Subject: [PATCH 52/94] fix: update permissions in incremental build workflow and specify action version for test results publishing --- .github/workflows/incremental-build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index b6da5a71ded..81f61f83b1d 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -9,6 +9,12 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') runs-on: Linux + permissions: + contents: read + issues: read + checks: write + pull-requests: write + env: OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio @@ -81,7 +87,7 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 + uses: EnricoMi/publish-unit-test-result-action/linux@v2 if: (!cancelled()) with: files: Testing/**/*.xml From ee9901482e853e2cd99048e8e10c4596314c3ae8 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:44:52 -0600 Subject: [PATCH 53/94] fix: update test results publishing action to use mikepenz/action-junit-report and enhance report options --- .github/workflows/incremental-build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 81f61f83b1d..b23083ec0fe 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -87,12 +87,16 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action/linux@v2 + uses: mikepenz/action-junit-report@v4 if: (!cancelled()) with: - files: Testing/**/*.xml - check_name: "CTest Results" - comment_title: "CTest Results" + report_paths: Testing/**/*.xml + check_name: CTest Results + fail_on_failure: false + require_tests: false + annotate_only: false + detailed_summary: true + include_passed: true # - name: Upload build artifacts # uses: actions/upload-artifact@v4 From 71bc96f14bf1fe31cc5ffccf714f85762f860869 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 14:46:15 -0600 Subject: [PATCH 54/94] fix: update test results publishing action to use dorny/test-reporter and enhance report options --- .github/workflows/incremental-build.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index b23083ec0fe..8e9d14af01a 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -87,16 +87,15 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: mikepenz/action-junit-report@v4 + uses: dorny/test-reporter@v1 if: (!cancelled()) with: - report_paths: Testing/**/*.xml - check_name: CTest Results - fail_on_failure: false - require_tests: false - annotate_only: false - detailed_summary: true - include_passed: true + name: CTest Results + path: Testing/**/*.xml + reporter: java-junit + fail-on-error: false + only-summary: false + max-annotations: 50 # - name: Upload build artifacts # uses: actions/upload-artifact@v4 From 76a30d623ae7117218ac16923d5ed8c2043217ae Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 15:00:39 -0600 Subject: [PATCH 55/94] fix: enable CMake setup step and update test results path in incremental build workflow --- .github/workflows/incremental-build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 8e9d14af01a..dde836f7e63 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -36,17 +36,17 @@ jobs: cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} rm -rf Testing - # - name: Cmake Setup - # run: | - # # Set up git and fetch PR head, then detect conan profile and install dependencies - # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} - # git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ - # git config user.email "cicommercialbuilding@gmail.com" && \ - # git config user.name "ci-commercialbuildings" && \ - # git fetch origin && \ - # git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - # git checkout origin/pr/${{ env.PR_NUMBER }} && \ - # conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + - name: Cmake Setup + run: | + # Set up git and fetch PR head, then detect conan profile and install dependencies + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} + git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ + git config user.email "cicommercialbuilding@gmail.com" && \ + git config user.name "ci-commercialbuildings" && \ + git fetch origin && \ + git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ + git checkout origin/pr/${{ env.PR_NUMBER }} && \ + conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release # - name: Install dependencies and configure with CMake # run: | @@ -91,7 +91,7 @@ jobs: if: (!cancelled()) with: name: CTest Results - path: Testing/**/*.xml + path: Testing/ctest-results.xml reporter: java-junit fail-on-error: false only-summary: false From 7db95a1df637fb2760d439c655dbd044583562d3 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 15:08:26 -0600 Subject: [PATCH 56/94] fix: update test results publishing action to use mikepenz/action-junit-report and enhance report options --- .github/workflows/incremental-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index dde836f7e63..2a96ae41f62 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -87,15 +87,16 @@ jobs: continue-on-error: true - name: Publish Test Results - uses: dorny/test-reporter@v1 + uses: mikepenz/action-junit-report@v4 if: (!cancelled()) with: - name: CTest Results - path: Testing/ctest-results.xml - reporter: java-junit - fail-on-error: false - only-summary: false - max-annotations: 50 + report_paths: Testing/ctest-results.xml + check_name: CTest Results + fail_on_failure: false + require_tests: false + annotate_only: false + detailed_summary: true + include_passed: true # - name: Upload build artifacts # uses: actions/upload-artifact@v4 From 5ffcc90ad4e66bfd508ece77b6b6addbdf1055a2 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 15:15:46 -0600 Subject: [PATCH 57/94] fix: update CTest command to improve output handling and adjust report paths for test results --- .github/workflows/incremental-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 2a96ae41f62..721f3fd8791 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -81,16 +81,16 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/ctest-results.xml || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/ctest-results.xml + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit continue-on-error: true - name: Publish Test Results uses: mikepenz/action-junit-report@v4 if: (!cancelled()) with: - report_paths: Testing/ctest-results.xml + report_paths: Testing/**/*.xml check_name: CTest Results fail_on_failure: false require_tests: false From 8763daab0414e495d5abe783c3350ca599485684 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 15:18:31 -0600 Subject: [PATCH 58/94] fix: enhance CTest execution by creating separate directories for test results and improving output handling --- .github/workflows/incremental-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 721f3fd8791..3fcb5b2f9e6 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -81,9 +81,10 @@ jobs: - name: Run CTests with retries run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit + mkdir -p Testing/run1 Testing/run2 Testing/run3 + ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/run2/results.xml || \ + ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml continue-on-error: true - name: Publish Test Results From 455e3dd559e542492825f7b0b8102442c784463f Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 15:27:59 -0600 Subject: [PATCH 59/94] fix: enhance CTest execution by adding debugging steps and organizing test results into separate directories --- .github/workflows/incremental-build.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 3fcb5b2f9e6..266f81199da 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -82,11 +82,24 @@ jobs: run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} mkdir -p Testing/run1 Testing/run2 Testing/run3 - ctest -j ${{ env.MAX_SAFE_THREADS }} -T test --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/run2/results.xml || \ - ctest -T test -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml + ctest -j ${{ env.MAX_SAFE_THREADS }} --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml || \ + ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/run2/results.xml || \ + ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml continue-on-error: true + - name: Debug - List Testing directory contents + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + echo "Contents of Testing directory:" + find Testing -name "*.xml" -type f 2>/dev/null || echo "No XML files found" + ls -la Testing/ 2>/dev/null || echo "Testing directory not found" + if [ -d Testing ]; then + echo "Testing subdirectories:" + find Testing -type d + echo "All files in Testing:" + find Testing -type f + fi + - name: Publish Test Results uses: mikepenz/action-junit-report@v4 if: (!cancelled()) From 4763af3a62b1469ba8648fefb65ba33a9b6e5ee6 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 15:44:52 -0600 Subject: [PATCH 60/94] fix: update incremental build workflow to correct volume paths and enhance artifact upload process --- .github/workflows/incremental-build.yml | 117 +++++++++++------------- 1 file changed, 53 insertions(+), 64 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 266f81199da..7a3ed3dca25 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,8 +16,7 @@ jobs: pull-requests: write env: - OPENSTUDIO_HOST_VOLUME: /srv/data/jenkins/docker-volumes/ubuntu-2204 - OPENSTUDIO_DOCKER_VOLUME: /home/ubuntu/OpenStudio + OPENSTUDIO_DOCKER_VOLUME: /github/home/OpenStudio OPENSTUDIO_SOURCE_NAME: OpenStudio OPENSTUDIO_BUILD_NAME: OS-build-release-v2 PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} @@ -26,9 +25,9 @@ jobs: container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally - volumes: + volumes: # envs don't work in volume definition for containers - "/srv/data/jenkins/docker-volumes/conan-data/.conan2:/github/home/.conan2" # Conan cache - - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/home/ubuntu/OpenStudio" + - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/github/home/OpenStudio" steps: - name: Cleanup ctest directory @@ -48,35 +47,35 @@ jobs: git checkout origin/pr/${{ env.PR_NUMBER }} && \ conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - # - name: Install dependencies and configure with CMake - # run: | - # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - # . ./conanbuild.sh - # cmake -G Ninja \ - # -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ - # -DCMAKE_BUILD_TYPE:STRING=Release \ - # -DBUILD_TESTING:BOOL=ON \ - # -DCPACK_BINARY_DEB:BOOL=ON \ - # -DCPACK_BINARY_TGZ:BOOL=ON \ - # -DCPACK_BINARY_IFW:BOOL=OFF \ - # -DCPACK_BINARY_NSIS:BOOL=OFF \ - # -DCPACK_BINARY_RPM:BOOL=OFF \ - # -DCPACK_BINARY_STGZ:BOOL=OFF \ - # -DCPACK_BINARY_TBZ2:BOOL=OFF \ - # -DCPACK_BINARY_TXZ:BOOL=OFF \ - # -DCPACK_BINARY_TZ:BOOL=OFF \ - # -DBUILD_PYTHON_BINDINGS:BOOL=ON \ - # -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ - # -DPYTHON_VERSION:STRING=3.12.2 \ - # -DBUILD_RUBY_BINDINGS:BOOL=ON \ - # -DBUILD_CLI:BOOL=ON \ - # ../${{ env.OPENSTUDIO_SOURCE_NAME }} + - name: Install dependencies and configure with CMake + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + . ./conanbuild.sh + cmake -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DBUILD_TESTING:BOOL=ON \ + -DCPACK_BINARY_DEB:BOOL=ON \ + -DCPACK_BINARY_TGZ:BOOL=ON \ + -DCPACK_BINARY_IFW:BOOL=OFF \ + -DCPACK_BINARY_NSIS:BOOL=OFF \ + -DCPACK_BINARY_RPM:BOOL=OFF \ + -DCPACK_BINARY_STGZ:BOOL=OFF \ + -DCPACK_BINARY_TBZ2:BOOL=OFF \ + -DCPACK_BINARY_TXZ:BOOL=OFF \ + -DCPACK_BINARY_TZ:BOOL=OFF \ + -DBUILD_PYTHON_BINDINGS:BOOL=ON \ + -DBUILD_PYTHON_PIP_PACKAGE:BOOL=OFF \ + -DPYTHON_VERSION:STRING=3.12.2 \ + -DBUILD_RUBY_BINDINGS:BOOL=ON \ + -DBUILD_CLI:BOOL=ON \ + ../${{ env.OPENSTUDIO_SOURCE_NAME }} - # - name: Build with Ninja - # run: | - # cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - # . ./conanbuild.sh - # ninja -j ${{ env.MAX_SAFE_THREADS }} package + - name: Build with Ninja + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} + . ./conanbuild.sh + ninja -j ${{ env.MAX_SAFE_THREADS }} package - name: Run CTests with retries run: | @@ -87,37 +86,27 @@ jobs: ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml continue-on-error: true - - name: Debug - List Testing directory contents - run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - echo "Contents of Testing directory:" - find Testing -name "*.xml" -type f 2>/dev/null || echo "No XML files found" - ls -la Testing/ 2>/dev/null || echo "Testing directory not found" - if [ -d Testing ]; then - echo "Testing subdirectories:" - find Testing -type d - echo "All files in Testing:" - find Testing -type f - fi + # Tried to publish test results EnricoMipublish-unit-test-result-action and dorny/test-reporter@v1 and nothing worked + # mikepenz/action-junit-report@v4 also doesn't work. TODO: either fix this or make a custom solution if this functionality is needed + # - name: Publish Test Results + # uses: mikepenz/action-junit-report@v4 + # if: (!cancelled()) + # with: + # report_paths: Testing/**/*.xml + # check_name: CTest Results + # fail_on_failure: false + # require_tests: false + # annotate_only: false + # detailed_summary: true + # include_passed: true - - name: Publish Test Results - uses: mikepenz/action-junit-report@v4 - if: (!cancelled()) + - name: Upload build artifacts + uses: actions/upload-artifact@v4 with: - report_paths: Testing/**/*.xml - check_name: CTest Results - fail_on_failure: false - require_tests: false - annotate_only: false - detailed_summary: true - include_passed: true - - # - name: Upload build artifacts - # uses: actions/upload-artifact@v4 - # with: - # name: ubuntu-2204-artifacts - # path: | - # ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb - # ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz - # env: - # NODE_TLS_REJECT_UNAUTHORIZED: '0' + name: ubuntu-2204-artifacts + path: | + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/**/*.xml + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz + env: + NODE_TLS_REJECT_UNAUTHORIZED: '0' From f9f7e774927afb402754848d973c55e1c5fe6859 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 16:22:42 -0600 Subject: [PATCH 61/94] fix: update test results publishing action to correctly reference result paths and enhance report options --- .github/workflows/incremental-build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 7a3ed3dca25..d0fd84353a8 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -88,24 +88,24 @@ jobs: # Tried to publish test results EnricoMipublish-unit-test-result-action and dorny/test-reporter@v1 and nothing worked # mikepenz/action-junit-report@v4 also doesn't work. TODO: either fix this or make a custom solution if this functionality is needed - # - name: Publish Test Results - # uses: mikepenz/action-junit-report@v4 - # if: (!cancelled()) - # with: - # report_paths: Testing/**/*.xml - # check_name: CTest Results - # fail_on_failure: false - # require_tests: false - # annotate_only: false - # detailed_summary: true - # include_passed: true + - name: Publish Test Results + uses: mikepenz/action-junit-report@v4 + if: (!cancelled()) + with: + report_paths: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml + check_name: CTest Results + fail_on_failure: false + require_tests: false + annotate_only: false + detailed_summary: true + include_passed: true - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: ubuntu-2204-artifacts path: | - ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/**/*.xml + # ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz env: From 2734fb38598288a4ed27584fe1d4d50302e1fb52 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 16:39:10 -0600 Subject: [PATCH 62/94] fix: update test results publishing step to use test-summary action for improved reporting --- .github/workflows/incremental-build.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index d0fd84353a8..902010896e6 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -86,19 +86,11 @@ jobs: ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml continue-on-error: true - # Tried to publish test results EnricoMipublish-unit-test-result-action and dorny/test-reporter@v1 and nothing worked - # mikepenz/action-junit-report@v4 also doesn't work. TODO: either fix this or make a custom solution if this functionality is needed - - name: Publish Test Results - uses: mikepenz/action-junit-report@v4 - if: (!cancelled()) + - name: Test Summary + uses: test-summary/action@v2 with: - report_paths: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml - check_name: CTest Results - fail_on_failure: false - require_tests: false - annotate_only: false - detailed_summary: true - include_passed: true + paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml" # Path to your JUnit output file + if: always() # Ensure this step runs even if tests fail - name: Upload build artifacts uses: actions/upload-artifact@v4 From e3d30108559638b2fa843029c18c79bd8b8a8438 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 17:17:30 -0600 Subject: [PATCH 63/94] fix: update incremental build workflow to improve job conditions and streamline dependency installation --- .github/workflows/incremental-build.yml | 70 ++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 902010896e6..80844e16f54 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -6,8 +6,8 @@ on: jobs: build: - if: contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') - runs-on: Linux + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') + runs-on: ubuntu-22.04 permissions: contents: read @@ -16,40 +16,37 @@ jobs: pull-requests: write env: - OPENSTUDIO_DOCKER_VOLUME: /github/home/OpenStudio - OPENSTUDIO_SOURCE_NAME: OpenStudio OPENSTUDIO_BUILD_NAME: OS-build-release-v2 - PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally - volumes: # envs don't work in volume definition for containers - - "/srv/data/jenkins/docker-volumes/conan-data/.conan2:/github/home/.conan2" # Conan cache - - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/github/home/OpenStudio" + + defaults: + run: + working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} steps: - - name: Cleanup ctest directory - run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} - rm -rf Testing - - - name: Cmake Setup + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for all branches and tags + + - name: Cache Conan packages + uses: actions/cache@v4 + with: + path: /github/home/.conan2 + key: ${{ runner.os }}-conan-${{ hashFiles('**/conanfile.py') }} + restore-keys: | + ${{ runner.os }}-conan- + + - name: Install dependencies run: | - # Set up git and fetch PR head, then detect conan profile and install dependencies - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} - git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ - git config user.email "cicommercialbuilding@gmail.com" && \ - git config user.name "ci-commercialbuildings" && \ - git fetch origin && \ - git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - git checkout origin/pr/${{ env.PR_NUMBER }} && \ - conan install . --output-folder=../${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - - name: Install dependencies and configure with CMake + - name: Configure with CMake run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} . ./conanbuild.sh cmake -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \ @@ -69,17 +66,15 @@ jobs: -DPYTHON_VERSION:STRING=3.12.2 \ -DBUILD_RUBY_BINDINGS:BOOL=ON \ -DBUILD_CLI:BOOL=ON \ - ../${{ env.OPENSTUDIO_SOURCE_NAME }} + .. - name: Build with Ninja run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} . ./conanbuild.sh ninja -j ${{ env.MAX_SAFE_THREADS }} package - name: Run CTests with retries run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }} mkdir -p Testing/run1 Testing/run2 Testing/run3 ctest -j ${{ env.MAX_SAFE_THREADS }} --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml || \ ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/run2/results.xml || \ @@ -89,16 +84,21 @@ jobs: - name: Test Summary uses: test-summary/action@v2 with: - paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml" # Path to your JUnit output file - if: always() # Ensure this step runs even if tests fail + paths: "${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml" # Path to your JUnit output file + output: "${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md" + if: always() + + - name: Upload test summary + uses: actions/upload-artifact@v4 + with: + name: test-summary + path: ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md + if: always() - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: ubuntu-2204-artifacts path: | - # ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml - ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb - ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz - env: - NODE_TLS_REJECT_UNAUTHORIZED: '0' + ${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb + ${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz From 6a4e9d3d4b41b8f6cd7de386cf3cff9f1af30e5d Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 17:22:51 -0600 Subject: [PATCH 64/94] fix: streamline incremental build workflow by removing defaults and ensuring correct working directories for steps --- .github/workflows/incremental-build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 80844e16f54..1baec423c2c 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -23,10 +23,6 @@ jobs: image: kuangwenyi/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally - defaults: - run: - working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -41,11 +37,15 @@ jobs: restore-keys: | ${{ runner.os }}-conan- + - name: Create build directory + run: mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} + - name: Install dependencies run: | conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - name: Configure with CMake + working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} run: | . ./conanbuild.sh cmake -G Ninja \ @@ -69,11 +69,13 @@ jobs: .. - name: Build with Ninja + working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} run: | . ./conanbuild.sh ninja -j ${{ env.MAX_SAFE_THREADS }} package - name: Run CTests with retries + working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} run: | mkdir -p Testing/run1 Testing/run2 Testing/run3 ctest -j ${{ env.MAX_SAFE_THREADS }} --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml || \ From 4adc7e4c578e51ac940cf70f6d48108eeaaa31a8 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 17:26:42 -0600 Subject: [PATCH 65/94] fix: add conan profile detection step before installing dependencies --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1baec423c2c..713f98fb244 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -42,6 +42,7 @@ jobs: - name: Install dependencies run: | + conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - name: Configure with CMake From 7b3b17bb61bce36417a33718fc690adb87e3aee5 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 17:32:47 -0600 Subject: [PATCH 66/94] fix: add conan remote configuration before installing dependencies --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 713f98fb244..01ce67cad9d 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -42,6 +42,7 @@ jobs: - name: Install dependencies run: | + conan remote add conancenter https://center.conan.io conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From a8dda8e8d5eb0f1577f0491945cf9de57aca2ecf Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 17:38:12 -0600 Subject: [PATCH 67/94] fix: enforce conan remote addition with --force flag for dependency installation --- .github/workflows/incremental-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 01ce67cad9d..3650b5ab686 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -3,6 +3,8 @@ name: Build and Test (Ubuntu 22.04) on: pull_request: push: + branches: + - main jobs: build: @@ -42,7 +44,7 @@ jobs: - name: Install dependencies run: | - conan remote add conancenter https://center.conan.io + conan remote add conancenter https://center.conan.io --force conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 285fdf55235307d7efe5ff00b8dd7340c4ec161d Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 17:41:06 -0600 Subject: [PATCH 68/94] fix: enhance incremental build workflow by adding ccache installation and default compiler setup --- .github/workflows/incremental-build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 3650b5ab686..35e7aeb0ed5 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -20,6 +20,7 @@ jobs: env: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) + CMAKE_CXX_COMPILER_LAUNCHER: ccache container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -31,6 +32,26 @@ jobs: with: fetch-depth: 0 # Fetch all history for all branches and tags + - name: Clean workspace + run: git clean -fdx + + - name: Install ccache + run: apt-get update && apt-get install -y ccache + + - name: Set default compiler + run: | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 + sudo update-alternatives --set gcc /usr/bin/gcc-11 + + - name: Cache ccache + uses: actions/cache@v4 + with: + path: /root/.ccache + key: ${{ runner.os }}-ccache-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-ccache- + - name: Cache Conan packages uses: actions/cache@v4 with: @@ -45,6 +66,7 @@ jobs: - name: Install dependencies run: | conan remote add conancenter https://center.conan.io --force + conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan --force conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 253d7f9c5bdef6e90937fc7d9dfcc9008a2c2b76 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:09:29 -0600 Subject: [PATCH 69/94] fix: enhance incremental build workflow with improved error handling for CTests and cache build directory --- .github/workflows/incremental-build.yml | 58 ++++++++++++++++++++++--- .gitignore | 1 + 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 35e7aeb0ed5..08fe72c3888 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -21,6 +21,7 @@ jobs: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) CMAKE_CXX_COMPILER_LAUNCHER: ccache + MAKEFLAGS: "-j$(( ($(nproc) * 80 + 50) / 100 ))" container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy @@ -60,6 +61,15 @@ jobs: restore-keys: | ${{ runner.os }}-conan- + - name: Cache build directory + uses: actions/cache@v4 + with: + path: ${{ env.OPENSTUDIO_BUILD_NAME }} + key: ${{ runner.os }}-build-${{ github.head_ref || github.ref_name }}-${{ hashFiles('**/*.cpp', '**/*.hpp', '**/CMakeLists.txt', 'src/**/*', 'conanfile.py') }} + restore-keys: | + ${{ runner.os }}-build-${{ github.head_ref || github.ref_name }}- + ${{ runner.os }}-build- + - name: Create build directory run: mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} @@ -100,13 +110,45 @@ jobs: . ./conanbuild.sh ninja -j ${{ env.MAX_SAFE_THREADS }} package - - name: Run CTests with retries + - name: Run CTests with enhanced error handling working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} run: | - mkdir -p Testing/run1 Testing/run2 Testing/run3 - ctest -j ${{ env.MAX_SAFE_THREADS }} --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml || \ - ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/run2/results.xml || \ - ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml + set +e # Don't exit on first failure + mkdir -p Testing/run{1,2,3} + + echo "Starting first test run..." + ctest -j ${{ env.MAX_SAFE_THREADS }} --no-compress-output --output-on-failure --output-junit Testing/run1/results.xml + RESULT1=$? + + if [ $RESULT1 -ne 0 ]; then + echo "First test run failed (exit code: $RESULT1), retrying failed tests..." + ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output --output-on-failure --output-junit Testing/run2/results.xml + RESULT2=$? + + if [ $RESULT2 -ne 0 ]; then + echo "Second test run failed (exit code: $RESULT2), final attempt with verbose output..." + ctest -j ${{ env.MAX_SAFE_THREADS }} --rerun-failed --no-compress-output -VV --output-junit Testing/run3/results.xml + RESULT3=$? + else + RESULT3=0 + fi + else + echo "First test run passed" + RESULT2=0 + RESULT3=0 + fi + + # Report results + echo "Test run results: Run1=$RESULT1, Run2=$RESULT2, Run3=$RESULT3" + + # Set job status based on results + if [ $RESULT1 -eq 0 ] || [ $RESULT2 -eq 0 ] || [ $RESULT3 -eq 0 ]; then + echo "Tests passed (some may have required retries)" + exit 0 + else + echo "All test attempts failed" + exit 1 + fi continue-on-error: true - name: Test Summary @@ -123,10 +165,12 @@ jobs: path: ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md if: always() - - name: Upload build artifacts + - name: Upload build artifacts with metadata uses: actions/upload-artifact@v4 with: - name: ubuntu-2204-artifacts + name: ubuntu-2204-${{ github.head_ref || github.ref_name }}-${{ github.sha }} path: | ${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb ${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz + retention-days: 30 + if: always() diff --git a/.gitignore b/.gitignore index a1ea0bbe9d7..d3402355131 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ junit.xml .cppcheck*/ CMakeUserPresets.json +.env \ No newline at end of file From 741fb3c64e8e9b3a85136fa25957f023295aa127 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:15:22 -0600 Subject: [PATCH 70/94] fix: add safe directory configuration to clean workspace step --- .github/workflows/incremental-build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 08fe72c3888..9b7581ab550 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -34,7 +34,10 @@ jobs: fetch-depth: 0 # Fetch all history for all branches and tags - name: Clean workspace - run: git clean -fdx + run: | + # make safe repository + git config --global --add safe.directory /__w/OpenStudio/OpenStudio + git clean -fdx - name: Install ccache run: apt-get update && apt-get install -y ccache From 92bf723ce88085ba64b0833c1733673df4fa5bb8 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:19:11 -0600 Subject: [PATCH 71/94] fix: resolve Kitware GPG key issue for ccache installation --- .github/workflows/incremental-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 9b7581ab550..e743336fa60 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -40,7 +40,11 @@ jobs: git clean -fdx - name: Install ccache - run: apt-get update && apt-get install -y ccache + run: | + # Fix Kitware GPG key issue + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null + apt-get update && apt-get install -y ccache - name: Set default compiler run: | From 1f7ebea23069bd0737de5714dd1419f281a886cd Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:22:03 -0600 Subject: [PATCH 72/94] fix: update default compiler setup to remove sudo for update-alternatives --- .github/workflows/incremental-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index e743336fa60..97c909a4680 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -48,9 +48,9 @@ jobs: - name: Set default compiler run: | - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 - sudo update-alternatives --set gcc /usr/bin/gcc-11 + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 + update-alternatives --set gcc /usr/bin/gcc-11 - name: Cache ccache uses: actions/cache@v4 From 1e114f4968b0abf3aeb358b3553c7e5e74cc378a Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:24:17 -0600 Subject: [PATCH 73/94] fix: remove outdated gcc-9 setup from default compiler configuration --- .github/workflows/incremental-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 97c909a4680..cc18c5f4e82 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -49,7 +49,6 @@ jobs: - name: Set default compiler run: | update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 update-alternatives --set gcc /usr/bin/gcc-11 - name: Cache ccache From a1c0c33f99ab465e609244fda68c3188f3677cca Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:26:53 -0600 Subject: [PATCH 74/94] fix: remove outdated bincrafters remote from dependency installation --- .github/workflows/incremental-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index cc18c5f4e82..1bed46b71c7 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -82,7 +82,6 @@ jobs: - name: Install dependencies run: | conan remote add conancenter https://center.conan.io --force - conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan --force conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From fd258d6039f914c161a3f36dade7875c47be524d Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 18:29:26 -0600 Subject: [PATCH 75/94] fix: add NREL v2 remote for Conan dependency installation --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1bed46b71c7..83f7f8ac654 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -82,6 +82,7 @@ jobs: - name: Install dependencies run: | conan remote add conancenter https://center.conan.io --force + conan remote add nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2 --force conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From c55942c2c28163671c940c138e3b2289d0697a15 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 22:00:43 -0600 Subject: [PATCH 76/94] fix: enhance Conan profile detection in incremental build workflow --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 83f7f8ac654..3ea8485a355 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -83,7 +83,7 @@ jobs: run: | conan remote add conancenter https://center.conan.io --force conan remote add nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2 --force - conan profile detect + conan profile show default >/dev/null 2>&1 || conan profile detect conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - name: Configure with CMake From af0508cd520beb2230b5802e5cdf0065352a1d38 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 22:05:01 -0600 Subject: [PATCH 77/94] fix: improve Conan profile detection in incremental build workflow --- .github/workflows/incremental-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 3ea8485a355..53b188726c7 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -83,7 +83,9 @@ jobs: run: | conan remote add conancenter https://center.conan.io --force conan remote add nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2 --force - conan profile show default >/dev/null 2>&1 || conan profile detect + if ! conan profile show default >/dev/null 2>&1; then + conan profile detect + fi conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - name: Configure with CMake From 6258f139765b24f5ac85680d6e3a92834f9e6044 Mon Sep 17 00:00:00 2001 From: anchapin Date: Thu, 26 Jun 2025 22:11:36 -0600 Subject: [PATCH 78/94] fix: update Conan profile detection to check for profile file existence --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 53b188726c7..4aab10acbc0 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -83,7 +83,7 @@ jobs: run: | conan remote add conancenter https://center.conan.io --force conan remote add nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2 --force - if ! conan profile show default >/dev/null 2>&1; then + if [ ! -f "/github/home/.conan2/profiles/default" ]; then conan profile detect fi conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release From 43f1adc31c7ce33b27b896599bf9013e744b4f4d Mon Sep 17 00:00:00 2001 From: Alex Chapin Date: Thu, 26 Jun 2025 23:55:12 -0600 Subject: [PATCH 79/94] Update incremental-build.yml --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 4aab10acbc0..c52abdef808 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -9,7 +9,7 @@ on: jobs: build: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') - runs-on: ubuntu-22.04 + runs-on: Linux permissions: contents: read From 64aae633c8c7e3045c81d3c9741f0409ee557671 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 07:01:54 -0600 Subject: [PATCH 80/94] fix: add SSL verification option to Conan install command --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index c52abdef808..a709350bbd1 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -86,7 +86,7 @@ jobs: if [ ! -f "/github/home/.conan2/profiles/default" ]; then conan profile detect fi - conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release --verify ssl=no - name: Configure with CMake working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} From 4aff9963f05d8243fd71866f33d152853b53be95 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 07:07:13 -0600 Subject: [PATCH 81/94] fix: update ccache installation and Conan remote configuration for SSL verification --- .github/workflows/incremental-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index a709350bbd1..ebb156232a8 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -42,7 +42,7 @@ jobs: - name: Install ccache run: | # Fix Kitware GPG key issue - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null apt-get update && apt-get install -y ccache @@ -82,11 +82,13 @@ jobs: - name: Install dependencies run: | conan remote add conancenter https://center.conan.io --force + conan remote update conancenter --insecure conan remote add nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2 --force + conan remote update nrel-v2 --insecure if [ ! -f "/github/home/.conan2/profiles/default" ]; then conan profile detect fi - conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release --verify ssl=no + conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release - name: Configure with CMake working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} From f1784ac1592de660111a5f98631a10bca3e54b4a Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 07:55:01 -0600 Subject: [PATCH 82/94] fix: set NODE_TLS_REJECT_UNAUTHORIZED to 0 for secure connections --- .github/workflows/incremental-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index ebb156232a8..27b1d104c45 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -22,6 +22,7 @@ jobs: MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) CMAKE_CXX_COMPILER_LAUNCHER: ccache MAKEFLAGS: "-j$(( ($(nproc) * 80 + 50) / 100 ))" + NODE_TLS_REJECT_UNAUTHORIZED: 0 container: # Define the Docker container for the job. All subsequent steps run inside it. image: kuangwenyi/openstudio-cmake-tools:jammy From 005bf6c9e7723d76e23bc2153c979bd6f4ae8f2c Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 08:03:59 -0600 Subject: [PATCH 83/94] fix: enhance ccache configuration and update build cache management --- .github/workflows/incremental-build.yml | 30 +++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 27b1d104c45..b3907561b7b 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -60,6 +60,13 @@ jobs: restore-keys: | ${{ runner.os }}-ccache- + - name: Configure ccache + run: | + ccache --max-size=2G + ccache --set-config=compression=true + ccache --set-config=compression_level=1 + ccache --show-stats + - name: Cache Conan packages uses: actions/cache@v4 with: @@ -71,11 +78,16 @@ jobs: - name: Cache build directory uses: actions/cache@v4 with: - path: ${{ env.OPENSTUDIO_BUILD_NAME }} - key: ${{ runner.os }}-build-${{ github.head_ref || github.ref_name }}-${{ hashFiles('**/*.cpp', '**/*.hpp', '**/CMakeLists.txt', 'src/**/*', 'conanfile.py') }} + path: | + ${{ env.OPENSTUDIO_BUILD_NAME }}/CMakeCache.txt + ${{ env.OPENSTUDIO_BUILD_NAME }}/cmake_install.cmake + ${{ env.OPENSTUDIO_BUILD_NAME }}/build.ninja + ${{ env.OPENSTUDIO_BUILD_NAME }}/conan_toolchain.cmake + ${{ env.OPENSTUDIO_BUILD_NAME }}/conanbuild.sh + ${{ env.OPENSTUDIO_BUILD_NAME }}/.ninja_* + key: ${{ runner.os }}-build-config-${{ hashFiles('CMakeLists.txt', 'conanfile.py', 'src/**/CMakeLists.txt', 'CMake/**/*') }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-build-${{ github.head_ref || github.ref_name }}- - ${{ runner.os }}-build- + ${{ runner.os }}-build-config-${{ hashFiles('CMakeLists.txt', 'conanfile.py', 'src/**/CMakeLists.txt', 'CMake/**/*') }}- - name: Create build directory run: mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} @@ -115,6 +127,16 @@ jobs: -DBUILD_CLI:BOOL=ON \ .. + - name: Verify build state + working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} + run: | + if [ -f "build.ninja" ]; then + echo "Ninja build file found - checking what needs to be built" + ninja -n -j 1 package | head -20 || true + else + echo "No build.ninja found - full reconfiguration will be needed" + fi + - name: Build with Ninja working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} run: | From cee6ab2fbfb1cdc9b9e3fde15d14c75b89b4c9ae Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 08:12:32 -0600 Subject: [PATCH 84/94] fix: adjust MAX_SAFE_THREADS and MAKEFLAGS for improved build performance --- .github/workflows/incremental-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index b3907561b7b..4e971b3eb57 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -19,9 +19,9 @@ jobs: env: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 - MAX_SAFE_THREADS: $(( ($(nproc) * 80 + 50) / 100 )) + MAX_SAFE_THREADS: $(( ($(nproc) * 90 + 50) / 100 )) CMAKE_CXX_COMPILER_LAUNCHER: ccache - MAKEFLAGS: "-j$(( ($(nproc) * 80 + 50) / 100 ))" + MAKEFLAGS: "-j$(( ($(nproc) * 90 + 50) / 100 ))" NODE_TLS_REJECT_UNAUTHORIZED: 0 container: # Define the Docker container for the job. All subsequent steps run inside it. @@ -75,6 +75,9 @@ jobs: restore-keys: | ${{ runner.os }}-conan- + - name: Create build directory + run: mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} + - name: Cache build directory uses: actions/cache@v4 with: @@ -89,9 +92,6 @@ jobs: restore-keys: | ${{ runner.os }}-build-config-${{ hashFiles('CMakeLists.txt', 'conanfile.py', 'src/**/CMakeLists.txt', 'CMake/**/*') }}- - - name: Create build directory - run: mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} - - name: Install dependencies run: | conan remote add conancenter https://center.conan.io --force From ac184c39f7fec48a49740e94cbc9efdb668ff482 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 08:55:25 -0600 Subject: [PATCH 85/94] feat: add test results dashboard generation and publishing to PR --- .github/workflows/incremental-build.yml | 159 ++++++++++++++++++++++++ 1 file changed, 159 insertions(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 4e971b3eb57..1355be35794 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -16,6 +16,7 @@ jobs: issues: read checks: write pull-requests: write + actions: read env: OPENSTUDIO_BUILD_NAME: OS-build-release-v2 @@ -198,6 +199,164 @@ jobs: path: ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md if: always() + - name: Generate test results dashboard + if: always() + run: | + mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard + + # Create comprehensive test dashboard + cat > ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/test-dashboard.md << 'EOF' + # ๐Ÿงช Test Results Dashboard + + ## Summary + + EOF + + # Process JUnit XML files and extract test information + python3 << 'PYTHON_EOF' + import xml.etree.ElementTree as ET + import os + import glob + from datetime import datetime + + build_dir = "${{ env.OPENSTUDIO_BUILD_NAME }}" + dashboard_file = f"{build_dir}/Testing/dashboard/test-dashboard.md" + + # Find all JUnit XML files + xml_files = glob.glob(f"{build_dir}/Testing/run*/results.xml") + + total_tests = 0 + total_failures = 0 + total_errors = 0 + total_skipped = 0 + failed_tests = [] + + # Parse XML files + for xml_file in xml_files: + if os.path.exists(xml_file): + try: + tree = ET.parse(xml_file) + root = tree.getroot() + + # Handle different JUnit XML formats + if root.tag == 'testsuites': + testsuites = root.findall('testsuite') + else: + testsuites = [root] + + for testsuite in testsuites: + suite_name = testsuite.get('name', 'Unknown') + tests = int(testsuite.get('tests', 0)) + failures = int(testsuite.get('failures', 0)) + errors = int(testsuite.get('errors', 0)) + skipped = int(testsuite.get('skipped', 0)) + + total_tests += tests + total_failures += failures + total_errors += errors + total_skipped += skipped + + # Get failed test details + for testcase in testsuite.findall('testcase'): + test_name = testcase.get('name', 'Unknown') + classname = testcase.get('classname', suite_name) + + failure = testcase.find('failure') + error = testcase.find('error') + + if failure is not None or error is not None: + failure_info = failure if failure is not None else error + message = failure_info.get('message', 'No message') + details = failure_info.text or 'No details available' + + failed_tests.append({ + 'suite': suite_name, + 'class': classname, + 'name': test_name, + 'message': message, + 'details': details, + 'run': os.path.basename(os.path.dirname(xml_file)) + }) + except Exception as e: + print(f"Error parsing {xml_file}: {e}") + + # Generate dashboard content + with open(dashboard_file, 'a') as f: + # Summary section + success_rate = ((total_tests - total_failures - total_errors) / total_tests * 100) if total_tests > 0 else 0 + + f.write(f"| Metric | Value |\n") + f.write(f"|--------|-------|\n") + f.write(f"| **Total Tests** | {total_tests} |\n") + f.write(f"| **Passed** | {total_tests - total_failures - total_errors} |\n") + f.write(f"| **Failed** | {total_failures} |\n") + f.write(f"| **Errors** | {total_errors} |\n") + f.write(f"| **Skipped** | {total_skipped} |\n") + f.write(f"| **Success Rate** | {success_rate:.1f}% |\n") + f.write(f"| **Generated** | {datetime.now().strftime('%Y-%m-%d %H:%M:%S UTC')} |\n\n") + + if success_rate >= 100: + f.write("## โœ… All Tests Passed!\n\n") + elif success_rate >= 95: + f.write("## โš ๏ธ Minor Issues Detected\n\n") + else: + f.write("## โŒ Significant Test Failures\n\n") + + # Failed tests section + if failed_tests: + f.write(f"## ๐Ÿ” Failed Tests ({len(failed_tests)} failures)\n\n") + + # Group by test suite + suites = {} + for test in failed_tests: + suite = test['suite'] + if suite not in suites: + suites[suite] = [] + suites[suite].append(test) + + for suite_name, suite_tests in suites.items(): + f.write(f"### {suite_name} ({len(suite_tests)} failures)\n\n") + + for test in suite_tests: + f.write(f"
\n") + f.write(f"{test['class']}.{test['name']} ({test['run']})\n\n") + f.write(f"**Error Message:**\n") + f.write(f"```\n{test['message']}\n```\n\n") + f.write(f"**Full Details:**\n") + f.write(f"```\n{test['details']}\n```\n\n") + f.write(f"
\n\n") + + # Test run information + f.write("## ๐Ÿ“Š Test Run Information\n\n") + f.write("| Run | XML File | Status |\n") + f.write("|-----|----------|--------|\n") + for i, xml_file in enumerate(xml_files, 1): + status = "โœ… Found" if os.path.exists(xml_file) else "โŒ Missing" + run_name = os.path.basename(os.path.dirname(xml_file)) + f.write(f"| {run_name} | `{os.path.basename(xml_file)}` | {status} |\n") + + if not xml_files: + f.write("| - | No XML files found | โŒ Missing |\n") + + print(f"Dashboard generated with {total_tests} tests, {total_failures + total_errors} failures") + PYTHON_EOF + + - name: Publish test results to PR + if: always() && github.event_name == 'pull_request' + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: test-results + path: ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/test-dashboard.md + + - name: Upload comprehensive test results + uses: actions/upload-artifact@v4 + with: + name: test-results-dashboard + path: | + ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/ + ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/ + if: always() + - name: Upload build artifacts with metadata uses: actions/upload-artifact@v4 with: From 0b57c7834d3ff85ca64a8c9f17aa12bfb8cd6a0d Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 10:25:28 -0600 Subject: [PATCH 86/94] fix: update build environment and Docker image for consistency --- .github/workflows/incremental-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 1355be35794..67780fada9f 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -9,7 +9,7 @@ on: jobs: build: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') - runs-on: Linux + runs-on: linux-openstudio-2 permissions: contents: read @@ -26,7 +26,7 @@ jobs: NODE_TLS_REJECT_UNAUTHORIZED: 0 container: # Define the Docker container for the job. All subsequent steps run inside it. - image: kuangwenyi/openstudio-cmake-tools:jammy + image: nrel/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally steps: From d91770838d5b6c597a654ca143a1a5a0c5218a4c Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 11:06:53 -0600 Subject: [PATCH 87/94] feat: add Jenkins pipeline files for incremental code coverage on multiple platforms --- Jenkinsfile_develop_code_coverage | 11 +++++++++++ Jenkinsfile_develop_osx | 10 ++++++++++ Jenkinsfile_develop_ubuntu_2404 | 11 +++++++++++ Jenkinsfile_develop_windows | 10 ++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Jenkinsfile_develop_code_coverage create mode 100644 Jenkinsfile_develop_osx create mode 100644 Jenkinsfile_develop_ubuntu_2404 create mode 100644 Jenkinsfile_develop_windows diff --git a/Jenkinsfile_develop_code_coverage b/Jenkinsfile_develop_code_coverage new file mode 100644 index 00000000000..f9a8a06e091 --- /dev/null +++ b/Jenkinsfile_develop_code_coverage @@ -0,0 +1,11 @@ + +//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs + +@Library('cbci_shared_libs') _ + +// Build for PR to develop branch only. +if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { + + openstudio_incremental_code_coverage() + +} diff --git a/Jenkinsfile_develop_osx b/Jenkinsfile_develop_osx new file mode 100644 index 00000000000..d7d18e8711f --- /dev/null +++ b/Jenkinsfile_develop_osx @@ -0,0 +1,10 @@ +//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs + +@Library('cbci_shared_libs') _ + +// Build for PR to develop branch only. +if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { + + openstudio_incremental_develop_osx() + +} diff --git a/Jenkinsfile_develop_ubuntu_2404 b/Jenkinsfile_develop_ubuntu_2404 new file mode 100644 index 00000000000..97371474dbf --- /dev/null +++ b/Jenkinsfile_develop_ubuntu_2404 @@ -0,0 +1,11 @@ + +//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs + +@Library('cbci_shared_libs') _ + +// Build for PR to develop branch only. +if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { + + openstudio_incremental_develop_ubuntu_2404() + +} diff --git a/Jenkinsfile_develop_windows b/Jenkinsfile_develop_windows new file mode 100644 index 00000000000..cb285700d5a --- /dev/null +++ b/Jenkinsfile_develop_windows @@ -0,0 +1,10 @@ +//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs + +@Library('cbci_shared_libs') _ + +// Build for PR to develop branch only. +if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { + + openstudio_incremental_develop_windows() + +} From 3742789ca4e6352b563aa0c1111f38800018c200 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 11:40:12 -0600 Subject: [PATCH 88/94] fix: update incremental build workflow comments for clarity and context --- .github/workflows/incremental-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 67780fada9f..6bfcedd60f2 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -1,3 +1,4 @@ +# refer to workflow version from thursday june 26 at around 4 pm MT to copy back in required items name: Build and Test (Ubuntu 22.04) on: @@ -28,6 +29,7 @@ jobs: container: # Define the Docker container for the job. All subsequent steps run inside it. image: nrel/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally + # add volume mounts back in steps: - name: Checkout repository @@ -104,6 +106,7 @@ jobs: fi conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release + # wrap cmake with ccache using a flag or environment variable - name: Configure with CMake working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} run: | From 03a6947d37f219f8007dfbc216f9e510170d58ac Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 15:28:03 -0600 Subject: [PATCH 89/94] fix: update incremental build workflow to improve directory handling and environment variable usage --- .github/workflows/incremental-build.yml | 62 ++++++++++++------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 6bfcedd60f2..32eef2f6f75 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -1,4 +1,3 @@ -# refer to workflow version from thursday june 26 at around 4 pm MT to copy back in required items name: Build and Test (Ubuntu 22.04) on: @@ -20,16 +19,22 @@ jobs: actions: read env: - OPENSTUDIO_BUILD_NAME: OS-build-release-v2 MAX_SAFE_THREADS: $(( ($(nproc) * 90 + 50) / 100 )) CMAKE_CXX_COMPILER_LAUNCHER: ccache MAKEFLAGS: "-j$(( ($(nproc) * 90 + 50) / 100 ))" NODE_TLS_REJECT_UNAUTHORIZED: 0 + DOCKER_ROOT: /github/home + OPENSTUDIO_DOCKER_VOLUME: /github/home/OpenStudio + OPENSTUDIO_SOURCE_NAME: OpenStudio + OPENSTUDIO_BUILD_NAME: OS-build-release-v2 + PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} container: # Define the Docker container for the job. All subsequent steps run inside it. image: nrel/openstudio-cmake-tools:jammy options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally - # add volume mounts back in + volumes: # envs don't work in volume definition for containers + - "/srv/data/jenkins/docker-volumes/conan-data/.conan2:/github/home/.conan2" # Conan cache + - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/github/home/OpenStudio" steps: - name: Checkout repository @@ -39,8 +44,9 @@ jobs: - name: Clean workspace run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} # make safe repository - git config --global --add safe.directory /__w/OpenStudio/OpenStudio + git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" git clean -fdx - name: Install ccache @@ -58,7 +64,7 @@ jobs: - name: Cache ccache uses: actions/cache@v4 with: - path: /root/.ccache + path: ${{ env.DOCKER_ROOT }}/.ccache key: ${{ runner.os }}-ccache-${{ github.sha }} restore-keys: | ${{ runner.os }}-ccache- @@ -70,45 +76,37 @@ jobs: ccache --set-config=compression_level=1 ccache --show-stats - - name: Cache Conan packages - uses: actions/cache@v4 - with: - path: /github/home/.conan2 - key: ${{ runner.os }}-conan-${{ hashFiles('**/conanfile.py') }} - restore-keys: | - ${{ runner.os }}-conan- - - name: Create build directory - run: mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} + run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} + mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} - - name: Cache build directory - uses: actions/cache@v4 - with: - path: | - ${{ env.OPENSTUDIO_BUILD_NAME }}/CMakeCache.txt - ${{ env.OPENSTUDIO_BUILD_NAME }}/cmake_install.cmake - ${{ env.OPENSTUDIO_BUILD_NAME }}/build.ninja - ${{ env.OPENSTUDIO_BUILD_NAME }}/conan_toolchain.cmake - ${{ env.OPENSTUDIO_BUILD_NAME }}/conanbuild.sh - ${{ env.OPENSTUDIO_BUILD_NAME }}/.ninja_* - key: ${{ runner.os }}-build-config-${{ hashFiles('CMakeLists.txt', 'conanfile.py', 'src/**/CMakeLists.txt', 'CMake/**/*') }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-build-config-${{ hashFiles('CMakeLists.txt', 'conanfile.py', 'src/**/CMakeLists.txt', 'CMake/**/*') }}- + - name: Git Setup + run: | + # Set up git and fetch PR head, then detect conan profile and install dependencies + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} + git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" && \ + git config user.email "cicommercialbuilding@gmail.com" && \ + git config user.name "ci-commercialbuildings" && \ + git fetch origin && \ + git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ + git checkout origin/pr/${{ env.PR_NUMBER }} && \ - name: Install dependencies run: | + cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} conan remote add conancenter https://center.conan.io --force conan remote update conancenter --insecure conan remote add nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2 --force conan remote update nrel-v2 --insecure - if [ ! -f "/github/home/.conan2/profiles/default" ]; then + if [ ! -f "${{ env.DOCKER_ROOT }}/.conan2/profiles/default" ]; then conan profile detect fi conan install . --output-folder=${{ env.OPENSTUDIO_BUILD_NAME }} --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release # wrap cmake with ccache using a flag or environment variable - name: Configure with CMake - working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} + working-directory: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }} run: | . ./conanbuild.sh cmake -G Ninja \ @@ -132,7 +130,7 @@ jobs: .. - name: Verify build state - working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} + working-directory: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }} run: | if [ -f "build.ninja" ]; then echo "Ninja build file found - checking what needs to be built" @@ -142,13 +140,13 @@ jobs: fi - name: Build with Ninja - working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} + working-directory: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }} run: | . ./conanbuild.sh ninja -j ${{ env.MAX_SAFE_THREADS }} package - name: Run CTests with enhanced error handling - working-directory: ${{ env.OPENSTUDIO_BUILD_NAME }} + working-directory: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }} run: | set +e # Don't exit on first failure mkdir -p Testing/run{1,2,3} From 83cf6ee0572d934f44ace334f7a324b1bd3e3be0 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 15:33:17 -0600 Subject: [PATCH 90/94] fix: update Docker volume and build name for consistency in incremental build workflow --- .github/workflows/incremental-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 32eef2f6f75..ef06ad1fce9 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -24,9 +24,9 @@ jobs: MAKEFLAGS: "-j$(( ($(nproc) * 90 + 50) / 100 ))" NODE_TLS_REJECT_UNAUTHORIZED: 0 DOCKER_ROOT: /github/home - OPENSTUDIO_DOCKER_VOLUME: /github/home/OpenStudio + OPENSTUDIO_DOCKER_VOLUME: /github/home/Ubuntu OPENSTUDIO_SOURCE_NAME: OpenStudio - OPENSTUDIO_BUILD_NAME: OS-build-release-v2 + OPENSTUDIO_BUILD_NAME: OS-build PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} container: # Define the Docker container for the job. All subsequent steps run inside it. @@ -34,7 +34,7 @@ jobs: options: -u root -e "LANG=en_US.UTF-8" # These options are passed to the 'docker run' command internally volumes: # envs don't work in volume definition for containers - "/srv/data/jenkins/docker-volumes/conan-data/.conan2:/github/home/.conan2" # Conan cache - - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/github/home/OpenStudio" + - "/srv/data/jenkins/docker-volumes/ubuntu-2204:/github/home/Ubuntu" steps: - name: Checkout repository From 5f6b5aa732979b7802bc9acdd19dfe7d9246a2a3 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 15:36:13 -0600 Subject: [PATCH 91/94] fix: remove unnecessary backslash in git checkout command for clarity --- .github/workflows/incremental-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index ef06ad1fce9..b04159c9977 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -90,7 +90,7 @@ jobs: git config user.name "ci-commercialbuildings" && \ git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - git checkout origin/pr/${{ env.PR_NUMBER }} && \ + git checkout origin/pr/${{ env.PR_NUMBER }} - name: Install dependencies run: | From e79dfe7db4b229fc3901ed64ce057d7b3578f78c Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 16:16:04 -0600 Subject: [PATCH 92/94] fix: update paths in test summary and dashboard generation for consistency with Docker volume structure --- .github/workflows/incremental-build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index b04159c9977..6820b781dac 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -189,24 +189,24 @@ jobs: - name: Test Summary uses: test-summary/action@v2 with: - paths: "${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml" # Path to your JUnit output file - output: "${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md" + paths: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/results.xml" # Path to your JUnit output file + output: "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md" if: always() - name: Upload test summary uses: actions/upload-artifact@v4 with: name: test-summary - path: ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md + path: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/test-summary.md if: always() - name: Generate test results dashboard if: always() run: | - mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard + mkdir -p ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard # Create comprehensive test dashboard - cat > ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/test-dashboard.md << 'EOF' + cat > ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/test-dashboard.md << 'EOF' # ๐Ÿงช Test Results Dashboard ## Summary @@ -220,7 +220,7 @@ jobs: import glob from datetime import datetime - build_dir = "${{ env.OPENSTUDIO_BUILD_NAME }}" + build_dir = "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}" dashboard_file = f"{build_dir}/Testing/dashboard/test-dashboard.md" # Find all JUnit XML files @@ -347,15 +347,15 @@ jobs: uses: marocchino/sticky-pull-request-comment@v2 with: header: test-results - path: ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/test-dashboard.md + path: ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/test-dashboard.md - name: Upload comprehensive test results uses: actions/upload-artifact@v4 with: name: test-results-dashboard path: | - ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/ - ${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/ + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/dashboard/ + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/Testing/run*/ if: always() - name: Upload build artifacts with metadata @@ -363,7 +363,7 @@ jobs: with: name: ubuntu-2204-${{ github.head_ref || github.ref_name }}-${{ github.sha }} path: | - ${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb - ${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/*.deb + ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}/${{ env.OPENSTUDIO_BUILD_NAME }}/_CPack_Packages/Linux/TGZ/*.tar.gz retention-days: 30 if: always() From 1a36776ba08334a81dabb54a4455fe93b332342c Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 16:21:45 -0600 Subject: [PATCH 93/94] fix: enhance incremental build workflow with concurrency settings and workspace preparation --- .github/workflows/incremental-build.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index 6820b781dac..da0cc55ab4f 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -6,6 +6,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build: if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Pull Request - Ready for CI') @@ -42,12 +46,11 @@ jobs: with: fetch-depth: 0 # Fetch all history for all branches and tags - - name: Clean workspace + - name: Prepare workspace run: | cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} # make safe repository git config --global --add safe.directory "${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }}" - git clean -fdx - name: Install ccache run: | @@ -76,11 +79,6 @@ jobs: ccache --set-config=compression_level=1 ccache --show-stats - - name: Create build directory - run: | - cd ${{ env.OPENSTUDIO_DOCKER_VOLUME }}/${{ env.OPENSTUDIO_SOURCE_NAME }} - mkdir -p ${{ env.OPENSTUDIO_BUILD_NAME }} - - name: Git Setup run: | # Set up git and fetch PR head, then detect conan profile and install dependencies From 630c072eb068b290858bbe24c18ac39de6e9b669 Mon Sep 17 00:00:00 2001 From: anchapin Date: Fri, 27 Jun 2025 16:51:51 -0600 Subject: [PATCH 94/94] fix: update pull request number handling in incremental build workflow for consistency --- .github/workflows/incremental-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/incremental-build.yml b/.github/workflows/incremental-build.yml index da0cc55ab4f..971f78b494a 100644 --- a/.github/workflows/incremental-build.yml +++ b/.github/workflows/incremental-build.yml @@ -31,7 +31,6 @@ jobs: OPENSTUDIO_DOCKER_VOLUME: /github/home/Ubuntu OPENSTUDIO_SOURCE_NAME: OpenStudio OPENSTUDIO_BUILD_NAME: OS-build - PR_NUMBER: ${{ github.event.pull_request.number || github.ref }} container: # Define the Docker container for the job. All subsequent steps run inside it. image: nrel/openstudio-cmake-tools:jammy @@ -88,7 +87,7 @@ jobs: git config user.name "ci-commercialbuildings" && \ git fetch origin && \ git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* && \ - git checkout origin/pr/${{ env.PR_NUMBER }} + git checkout origin/pr/${{ github.event.pull_request.number || github.ref }} - name: Install dependencies run: |