From 9f5e56019da426318b79d57ec9359a1700c15ae6 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Fri, 3 Apr 2026 23:57:14 +0900 Subject: [PATCH 01/40] ci: Delete old configuration files for Semgrep --- .github/workflows/codeql-analysis.yml | 74 --------------------------- 1 file changed, 74 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 9d0cdb8e4a..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,74 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: '0 15 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['cpp'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Updates submodule. - - run: git submodule update --init - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # โ„น๏ธ Command-line programs to run using the OS shell. - # ๐Ÿ“š https://git.io/JvXDl - - # โœ๏ธ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 From cab80645799191c560a143e74117b88e0133800d Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Fri, 3 Apr 2026 23:59:24 +0900 Subject: [PATCH 02/40] ci: Update configuration file for Windows --- .github/workflows/windows.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 21a9260809..f4016bdd73 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,31 +8,35 @@ on: jobs: build-windows: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} strategy: matrix: include: - # Windows Server 2019 + Visual Studio 2019 - - name: "Windows Server 2019 + Visual Studio 2019" - os: windows-2019 + # Windows Server 2025 + Visual Studio 2026 + - name: "Windows Server 2025 + Visual Studio 2026" + os: windows-2025-vs2026 + solution: CubbyFlow.slnx # Windows Server 2022 + Visual Studio 2022 - name: "Windows Server 2022 + Visual Studio 2022" os: windows-2022 + solution: CubbyFlow.sln + + runs-on: ${{ matrix.os }} + name: ๐ŸชŸ Build - ${{ matrix.name }} + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Configure Build run: mkdir build && cd build && cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release .. - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 - name: Build - run: cd build && MSBuild.exe CubbyFlow.sln /p:Configuration=Release + run: cd build && MSBuild.exe ${{ matrix.solution }} /p:Configuration=Release - name: Run Unit Test run: /a/CubbyFlow/CubbyFlow/build/bin/Release/UnitTests.exe - name: Run Python Test run: | pip install -r requirements.txt pip install . - python -m pytest Tests/PythonTests/ \ No newline at end of file + python -m pytest Tests/PythonTests/ From 9cd6a0f1de184612dce6c8c6eef2981e82b6fec1 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 02:23:09 +0900 Subject: [PATCH 03/40] build: Update library 'pybind11' to '3.0.2' --- Libraries/pybind11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/pybind11 b/Libraries/pybind11 index 8de7772cc7..45fab4087e 160000 --- a/Libraries/pybind11 +++ b/Libraries/pybind11 @@ -1 +1 @@ -Subproject commit 8de7772cc72daca8e947b79b83fea46214931604 +Subproject commit 45fab4087eaaff234227a10cf7845e8b07f28a98 From f77fddf7a962d2183f7d1d3ecc3a25fdc7b1d2c0 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 02:24:03 +0900 Subject: [PATCH 04/40] build: Update library 'doctest' to '2.4.12' --- Libraries/doctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/doctest b/Libraries/doctest index 4d8716f1ef..1da23a3e81 160000 --- a/Libraries/doctest +++ b/Libraries/doctest @@ -1 +1 @@ -Subproject commit 4d8716f1efc1d14aa736ef52ee727bd4204f4c40 +Subproject commit 1da23a3e8119ec5cce4f9388e91b065e20bf06f5 From 2c791910be89d677e536563ee18a5c0a06756a03 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 02:24:42 +0900 Subject: [PATCH 05/40] build: Update CMake version to '3.31.6' --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a171d4356c..34dc76d3a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # CMake version -cmake_minimum_required(VERSION 3.18.6 FATAL_ERROR) +cmake_minimum_required(VERSION 3.31.6 FATAL_ERROR) cmake_policy(SET CMP0063 NEW) # visibility set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) From 9e125688f67352380cd40dc0f2de0f9be46e5354 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 09:23:32 +0900 Subject: [PATCH 06/40] fix: Add missing header '' --- Sources/Core/Utils/Logging.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Core/Utils/Logging.cpp b/Sources/Core/Utils/Logging.cpp index ef928c000f..d0777cc194 100644 --- a/Sources/Core/Utils/Logging.cpp +++ b/Sources/Core/Utils/Logging.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include From 10ad3afb92a5118fb50d909b4cd8439eb11ebe88 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 10:03:45 +0900 Subject: [PATCH 07/40] ci: Add step to install Python 3.12 --- .github/workflows/macos.yml | 18 +++++++++++------- .github/workflows/ubuntu.yml | 14 +++++++++++--- .github/workflows/windows.yml | 12 ++++++++++-- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 82fe8bf85f..3c53213ec7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ main ] +env: + PYTHON_VERSION: '3.12' + jobs: build-macos: runs-on: ${{ matrix.os }} @@ -57,6 +60,10 @@ jobs: - uses: actions/checkout@v1 with: submodules: true + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} - name: Configure Compiler run: | if [ "${{ matrix.compiler }}" = "gcc" ]; then @@ -74,12 +81,9 @@ jobs: run: cd build && make - name: Run Unit Test run: /Users/runner/work/CubbyFlow/CubbyFlow/build/bin/UnitTests - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.7' - name: Run Python Test run: | - pip install -r requirements.txt - pip install . - python -m pytest Tests/PythonTests/ \ No newline at end of file + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + python -m pip install . + python -m pytest Tests/PythonTests/ diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 9a6283527f..caaba25da8 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ main ] +env: + PYTHON_VERSION: '3.12' + jobs: build-ubuntu: runs-on: ${{ matrix.os }} @@ -37,6 +40,10 @@ jobs: - uses: actions/checkout@v1 with: submodules: true + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} - name: Install packages run: sudo apt-get install -yq python3-setuptools - name: Configure Compiler @@ -56,6 +63,7 @@ jobs: run: /home/runner/work/CubbyFlow/CubbyFlow/build/bin/UnitTests - name: Run Python Test run: | - pip3 install -r requirements.txt - pip3 install . - python3 -m pytest Tests/PythonTests/ \ No newline at end of file + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + python -m pip install . + python -m pytest Tests/PythonTests/ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f4016bdd73..804ab943f2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ main ] +env: + PYTHON_VERSION: '3.12' + jobs: build-windows: strategy: @@ -27,6 +30,10 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} - name: Configure Build run: mkdir build && cd build && cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release .. - name: Add MSBuild to PATH @@ -37,6 +44,7 @@ jobs: run: /a/CubbyFlow/CubbyFlow/build/bin/Release/UnitTests.exe - name: Run Python Test run: | - pip install -r requirements.txt - pip install . + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + python -m pip install . python -m pytest Tests/PythonTests/ From 721fccc5a48655ee6da763cecead7e4ab3e798d4 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 15:50:58 +0900 Subject: [PATCH 08/40] ci: Update configuration file for Linux --- .github/workflows/ubuntu.yml | 52 ++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index caaba25da8..56e8769aec 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,33 +11,45 @@ env: jobs: build-ubuntu: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} strategy: matrix: include: - # Ubuntu 18.04 + gcc-9 - - name: "Ubuntu 18.04 + gcc-9" - os: ubuntu-18.04 + # Ubuntu 24.04 + gcc-14 + - name: "Ubuntu 24.04 + gcc-14" + os: ubuntu-24.04 + compiler: gcc + version: "14" + # Ubuntu 24.04 + gcc-13 + - name: "Ubuntu 24.04 + gcc-13" + os: ubuntu-24.04 compiler: gcc - version: "9" - # Ubuntu 20.04 + gcc-10 - - name: "Ubuntu 20.04 + gcc-10" - os: ubuntu-20.04 + version: "13" + # Ubuntu 24.04 + gcc-12 + - name: "Ubuntu 24.04 + gcc-12" + os: ubuntu-24.04 compiler: gcc - version: "10" - # Ubuntu 18.04 + clang-9 - - name: "Ubuntu 18.04 + clang-9" - os: ubuntu-18.04 + version: "12" + # Ubuntu 24.04 + clang-18 + - name: "Ubuntu 24.04 + clang-18" + os: ubuntu-24.04 + compiler: clang + version: "18" + # Ubuntu 24.04 + clang-17 + - name: "Ubuntu 24.04 + clang-17" + os: ubuntu-24.04 compiler: clang - version: "9" - # Ubuntu 20.04 + clang-10 - - name: "Ubuntu 20.04 + clang-10" - os: ubuntu-20.04 + version: "17" + # Ubuntu 24.04 + clang-16 + - name: "Ubuntu 24.04 + clang-16" + os: ubuntu-24.04 compiler: clang - version: "10" + version: "16" + + runs-on: ${{ matrix.os }} + name: ๐Ÿง Build - ${{ matrix.name }} + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Setup Python @@ -45,7 +57,7 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - name: Install packages - run: sudo apt-get install -yq python3-setuptools + run: sudo apt-get update && sudo apt-get install -yq python3-setuptools - name: Configure Compiler run: | if [ "${{ matrix.compiler }}" = "gcc" ]; then From 7d6df2ae7d59f3a25ba6eb117764aae2acd06cdf Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 15:52:02 +0900 Subject: [PATCH 09/40] ci: Update configuration file for macOS --- .github/workflows/macos.yml | 63 +++++++++++++++---------------------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3c53213ec7..bb136f0c3f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -11,53 +11,40 @@ env: jobs: build-macos: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} strategy: matrix: include: - # macOS 12.4 + Xcode 13.4.1 - - name: "macOS 12.4 + Xcode 13.4.1" - os: macos-12 - compiler: xcode - version: "13.4.1" - # macOS 11.6 + Xcode 13.2.1 - - name: "macOS 11.6 + Xcode 13.2.1" - os: macos-11 + # macOS 26.3 + Xcode 26.3 + - name: "macOS 26.3 + Xcode 26.3" + os: macos-26 compiler: xcode - version: "13.2.1" - # macOS 11.6 + Xcode 12.5.1 - - name: "macOS 11.6 + Xcode 12.5.1" - os: macos-11 + version: "26.3" + # macOS 15.7.4 + Xcode 16.4 + - name: "macOS 15.7.4 + Xcode 16.4" + os: macos-15 compiler: xcode - version: "12.5.1" - # macOS 11.6 + Xcode 11.7 - - name: "macOS 11.6 + Xcode 11.7" - os: macos-11 - compiler: xcode - version: "11.7" - # macOS 12.4 + gcc-11 - - name: "macOS 12.4 + gcc-11" - os: macos-12 - compiler: gcc - version: "11" - # macOS 11.6 + gcc-11 - - name: "macOS 11.6 + gcc-11" - os: macos-11 + version: "16.4" + # macOS 26.3 + gcc-15 + - name: "macOS 26.3 + gcc-15" + os: macos-26 compiler: gcc - version: "11" - # macOS 11.6 + gcc-10 - - name: "macOS 11.6 + gcc-10" - os: macos-11 + version: "15" + # macOS 26.3 + gcc-14 + - name: "macOS 26.3 + gcc-14" + os: macos-26 compiler: gcc - version: "10" - # macOS 11.6 + gcc-9 - - name: "macOS 11.6 + gcc-9" - os: macos-11 + version: "14" + # macOS 26.3 + gcc-13 + - name: "macOS 26.3 + gcc-13" + os: macos-26 compiler: gcc - version: "9" + version: "13" + + runs-on: ${{ matrix.os }} + name: ๐ŸŽ Build - ${{ matrix.name }} + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Setup Python From 05097f5e662fdfba3f651250128f228146a5c1d0 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 15:53:43 +0900 Subject: [PATCH 10/40] ci: Update configuration file for Codecov --- .github/workflows/ubuntu-codecov.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ubuntu-codecov.yml b/.github/workflows/ubuntu-codecov.yml index 359e71bfb7..6df6d1be0e 100644 --- a/.github/workflows/ubuntu-codecov.yml +++ b/.github/workflows/ubuntu-codecov.yml @@ -6,22 +6,31 @@ on: pull_request: branches: [ main ] +env: + PYTHON_VERSION: '3.12' + jobs: build-ubuntu: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} strategy: matrix: include: - # Ubuntu 20.04 + gcc-9 - - name: "Ubuntu 20.04 + gcc-9" - os: ubuntu-20.04 + # Ubuntu 24.04 + gcc-14 + - name: "Ubuntu 24.04 + gcc-14" + os: ubuntu-24.04 compiler: gcc - version: "9" + version: "14" + + runs-on: ${{ matrix.os }} + name: ๐Ÿงช Code Coverage - Codecov + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} - name: Install packages run: sudo apt-get install -yq lcov - name: Configure Compiler @@ -40,4 +49,4 @@ jobs: - name: Run Unit Test run: /home/runner/work/CubbyFlow/CubbyFlow/build/bin/UnitTests - name: Upload coverage to Codecov - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file + run: bash <(curl -s https://codecov.io/bash) From 40258c2e0bbf9b50e20473da6be612c232cad0b9 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 15:54:09 +0900 Subject: [PATCH 11/40] ci: Disable configuration file for SonarCloud temporarily --- .github/workflows/ubuntu-sonarcloud.yml | 124 ++++++++++++------------ 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ubuntu-sonarcloud.yml b/.github/workflows/ubuntu-sonarcloud.yml index cfeba01f8a..00ed62e226 100644 --- a/.github/workflows/ubuntu-sonarcloud.yml +++ b/.github/workflows/ubuntu-sonarcloud.yml @@ -1,64 +1,64 @@ -name: Ubuntu - SonarCloud +# name: Ubuntu - SonarCloud -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] +# on: +# push: +# branches: [ main ] +# pull_request: +# branches: [ main ] -jobs: - build-ubuntu: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} - strategy: - matrix: - include: - # Ubuntu 20.04 + gcc-9 - - name: "Ubuntu 20.04 + gcc-9" - os: ubuntu-20.04 - compiler: gcc - version: "9" - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Prepare Sonar scanner - run: | - wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.0.2311-linux.zip - unzip -q sonar-scanner-cli-4.6.0.2311-linux.zip - echo "${PWD}/sonar-scanner-4.6.0.2311-linux/bin/" >> $GITHUB_PATH - wget -nv https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip - unzip -q build-wrapper-linux-x86.zip - echo "${PWD}/build-wrapper-linux-x86" >> $GITHUB_PATH - - name: Install packages - run: sudo apt-get install -yq gcovr ggcov lcov curl - - name: Configure Compiler - run: | - if [ "${{ matrix.compiler }}" = "gcc" ]; then - echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV - echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV - else - echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV - echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV - fi - - name: Configure Build - run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON -DBUILD_SONARCLOUD=ON .. - - name: Build - run: cd build && build-wrapper-linux-x86-64 --out-dir ../bw-output make all - - name: Run Unit Test - run: | - cd build - lcov --gcov-tool /usr/bin/gcov -c -i -d Tests/UnitTests -o base.info - bin/UnitTests - lcov --gcov-tool /usr/bin/gcov -c -d Tests/UnitTests -o test.info - lcov --gcov-tool /usr/bin/gcov -a base.info -a test.info -o coverage.info - lcov --gcov-tool /usr/bin/gcov -r coverage.info '/usr/*' -o coverage.info - lcov --gcov-tool /usr/bin/gcov -r coverage.info '*/Examples/*' -o coverage.info - lcov --gcov-tool /usr/bin/gcov -r coverage.info '*/Libraries/*' -o coverage.info - lcov --gcov-tool /usr/bin/gcov -r coverage.info '*/Tests/*' -o coverage.info - lcov --gcov-tool /usr/bin/gcov -l coverage.info - - name: SonarCloud Scan - run: sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=cubbyflow -Dsonar.login=$SONAR_TOKEN - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file +# jobs: +# build-ubuntu: +# runs-on: ${{ matrix.os }} +# name: ${{ matrix.name }} +# strategy: +# matrix: +# include: +# # Ubuntu 20.04 + gcc-9 +# - name: "Ubuntu 20.04 + gcc-9" +# os: ubuntu-20.04 +# compiler: gcc +# version: "9" +# steps: +# - uses: actions/checkout@v2 +# with: +# submodules: true +# - name: Prepare Sonar scanner +# run: | +# wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.0.2311-linux.zip +# unzip -q sonar-scanner-cli-4.6.0.2311-linux.zip +# echo "${PWD}/sonar-scanner-4.6.0.2311-linux/bin/" >> $GITHUB_PATH +# wget -nv https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip +# unzip -q build-wrapper-linux-x86.zip +# echo "${PWD}/build-wrapper-linux-x86" >> $GITHUB_PATH +# - name: Install packages +# run: sudo apt-get install -yq gcovr ggcov lcov curl +# - name: Configure Compiler +# run: | +# if [ "${{ matrix.compiler }}" = "gcc" ]; then +# echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV +# echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV +# else +# echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV +# echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV +# fi +# - name: Configure Build +# run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON -DBUILD_SONARCLOUD=ON .. +# - name: Build +# run: cd build && build-wrapper-linux-x86-64 --out-dir ../bw-output make all +# - name: Run Unit Test +# run: | +# cd build +# lcov --gcov-tool /usr/bin/gcov -c -i -d Tests/UnitTests -o base.info +# bin/UnitTests +# lcov --gcov-tool /usr/bin/gcov -c -d Tests/UnitTests -o test.info +# lcov --gcov-tool /usr/bin/gcov -a base.info -a test.info -o coverage.info +# lcov --gcov-tool /usr/bin/gcov -r coverage.info '/usr/*' -o coverage.info +# lcov --gcov-tool /usr/bin/gcov -r coverage.info '*/Examples/*' -o coverage.info +# lcov --gcov-tool /usr/bin/gcov -r coverage.info '*/Libraries/*' -o coverage.info +# lcov --gcov-tool /usr/bin/gcov -r coverage.info '*/Tests/*' -o coverage.info +# lcov --gcov-tool /usr/bin/gcov -l coverage.info +# - name: SonarCloud Scan +# run: sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=cubbyflow -Dsonar.login=$SONAR_TOKEN +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file From 62c7bb42079cc614d33b39c9cd0727f0a5377785 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 15:55:58 +0900 Subject: [PATCH 12/40] build: Fix CMake error by changing empty command --- Builds/CMake/CodeCoverage.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Builds/CMake/CodeCoverage.cmake b/Builds/CMake/CodeCoverage.cmake index d87d32a195..65cb5247d9 100644 --- a/Builds/CMake/CodeCoverage.cmake +++ b/Builds/CMake/CodeCoverage.cmake @@ -106,7 +106,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname) ADD_CUSTOM_TARGET(${_targetname} # Cleanup lcov - ${LCOV_PATH} --directory . --zerocounters + COMMAND ${LCOV_PATH} --directory . --zerocounters # Run tests COMMAND ${_testrunner} ${ARGV3} @@ -123,7 +123,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname) # Show info where to find the report ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD - COMMAND ; + COMMAND ${CMAKE_COMMAND} -E echo "Open ./${_outputname}/index.html in your browser to view the coverage report." COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report." ) @@ -147,7 +147,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname ADD_CUSTOM_TARGET(${_targetname} # Run tests - ${_testrunner} ${ARGV3} + COMMAND ${_testrunner} ${ARGV3} # Running gcovr COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -e '${CMAKE_SOURCE_DIR}/build/' -o ${_outputname}.xml @@ -157,7 +157,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname # Show info where to find the report ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD - COMMAND ; + COMMAND ${CMAKE_COMMAND} -E echo "Cobertura code coverage report saved in ${_outputname}.xml." COMMENT "Cobertura code coverage report saved in ${_outputname}.xml." ) From feeacb2993854e16a2817ba21d3a4d2c0996cba1 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 15:56:56 +0900 Subject: [PATCH 13/40] ci: Change step to upload coverage to Codecov --- .github/workflows/ubuntu-codecov.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu-codecov.yml b/.github/workflows/ubuntu-codecov.yml index 6df6d1be0e..c1a5c7d950 100644 --- a/.github/workflows/ubuntu-codecov.yml +++ b/.github/workflows/ubuntu-codecov.yml @@ -48,5 +48,17 @@ jobs: run: cd build && make - name: Run Unit Test run: /home/runner/work/CubbyFlow/CubbyFlow/build/bin/UnitTests - - name: Upload coverage to Codecov - run: bash <(curl -s https://codecov.io/bash) + - name: Collect coverage report + run: | + GCOV_TOOL="$(command -v gcov-${{ matrix.version }})" + lcov --gcov-tool "${GCOV_TOOL}" --directory build --capture --output-file build/coverage.info + lcov --gcov-tool "${GCOV_TOOL}" --remove build/coverage.info '/usr/*' '*/Tests/*' '*/build/*' --output-file build/coverage.info.cleaned + - name: Upload Coverage Reports to Codecov + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + files: ./build/coverage.info.cleaned + flags: unittests + name: ubuntu-codecov + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true From 7409e04cb973f98c9267f81029e35ba3a8ff0fe2 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 19:00:38 +0900 Subject: [PATCH 14/40] fix: Add code to include missing header --- Includes/Core/Matrix/MatrixCSR-Impl.hpp | 2 ++ Includes/Core/Utils/Logging.hpp | 1 + Sources/Core/Geometry/Sphere.cpp | 2 ++ Sources/Core/Geometry/Surface.cpp | 2 ++ 4 files changed, 7 insertions(+) diff --git a/Includes/Core/Matrix/MatrixCSR-Impl.hpp b/Includes/Core/Matrix/MatrixCSR-Impl.hpp index ba0b678e40..f7a94c82d9 100644 --- a/Includes/Core/Matrix/MatrixCSR-Impl.hpp +++ b/Includes/Core/Matrix/MatrixCSR-Impl.hpp @@ -15,6 +15,8 @@ #include #include +#include + namespace CubbyFlow { template diff --git a/Includes/Core/Utils/Logging.hpp b/Includes/Core/Utils/Logging.hpp index 6cd95de860..ff11424222 100644 --- a/Includes/Core/Utils/Logging.hpp +++ b/Includes/Core/Utils/Logging.hpp @@ -11,6 +11,7 @@ #ifndef CUBBYFLOW_LOGGER_HPP #define CUBBYFLOW_LOGGER_HPP +#include #include namespace CubbyFlow diff --git a/Sources/Core/Geometry/Sphere.cpp b/Sources/Core/Geometry/Sphere.cpp index e1b95ec727..6a927f0927 100644 --- a/Sources/Core/Geometry/Sphere.cpp +++ b/Sources/Core/Geometry/Sphere.cpp @@ -10,6 +10,8 @@ #include +#include + namespace CubbyFlow { template diff --git a/Sources/Core/Geometry/Surface.cpp b/Sources/Core/Geometry/Surface.cpp index e205cfcc72..df710d9010 100644 --- a/Sources/Core/Geometry/Surface.cpp +++ b/Sources/Core/Geometry/Surface.cpp @@ -10,6 +10,8 @@ #include +#include + namespace CubbyFlow { template From 342662c376b1d9812543e03248f050f50de8cd6a Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 20:28:21 +0900 Subject: [PATCH 15/40] build: Update library 'googletest' to '1.17.0' --- Libraries/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/googletest b/Libraries/googletest index 58d77fa807..52eb8108c5 160000 --- a/Libraries/googletest +++ b/Libraries/googletest @@ -1 +1 @@ -Subproject commit 58d77fa8070e8cec2dc1ed015d66b454c8d78850 +Subproject commit 52eb8108c5bdec04579160ae17225d66034bd723 From ea07e198f87720b6a709160f34720558ad62105f Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 20:58:49 +0900 Subject: [PATCH 16/40] ci: Add flag to allow mismatch errors during lcov capture/remove --- .github/workflows/ubuntu-codecov.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu-codecov.yml b/.github/workflows/ubuntu-codecov.yml index c1a5c7d950..e7406b215f 100644 --- a/.github/workflows/ubuntu-codecov.yml +++ b/.github/workflows/ubuntu-codecov.yml @@ -51,8 +51,8 @@ jobs: - name: Collect coverage report run: | GCOV_TOOL="$(command -v gcov-${{ matrix.version }})" - lcov --gcov-tool "${GCOV_TOOL}" --directory build --capture --output-file build/coverage.info - lcov --gcov-tool "${GCOV_TOOL}" --remove build/coverage.info '/usr/*' '*/Tests/*' '*/build/*' --output-file build/coverage.info.cleaned + lcov --gcov-tool "${GCOV_TOOL}" --ignore-errors mismatch --directory build --capture --output-file build/coverage.info + lcov --gcov-tool "${GCOV_TOOL}" --ignore-errors mismatch --remove build/coverage.info '/usr/*' '*/Tests/*' '*/build/*' --output-file build/coverage.info.cleaned - name: Upload Coverage Reports to Codecov uses: codecov/codecov-action@v5 with: From a6acbec6cac5456fb034f5fc081b377c76237b48 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 21:48:16 +0900 Subject: [PATCH 17/40] ci: Update command to ignore unused errors --- .github/workflows/ubuntu-codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-codecov.yml b/.github/workflows/ubuntu-codecov.yml index e7406b215f..7f320731ce 100644 --- a/.github/workflows/ubuntu-codecov.yml +++ b/.github/workflows/ubuntu-codecov.yml @@ -52,7 +52,7 @@ jobs: run: | GCOV_TOOL="$(command -v gcov-${{ matrix.version }})" lcov --gcov-tool "${GCOV_TOOL}" --ignore-errors mismatch --directory build --capture --output-file build/coverage.info - lcov --gcov-tool "${GCOV_TOOL}" --ignore-errors mismatch --remove build/coverage.info '/usr/*' '*/Tests/*' '*/build/*' --output-file build/coverage.info.cleaned + lcov --ignore-errors unused --gcov-tool "${GCOV_TOOL}" --ignore-errors mismatch --remove build/coverage.info '/usr/*' '*/Tests/*' --output-file build/coverage.info.cleaned - name: Upload Coverage Reports to Codecov uses: codecov/codecov-action@v5 with: From 8271cf94ba0ef5f3a9cb37a8734ae36b2d4ffe54 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 21:48:51 +0900 Subject: [PATCH 18/40] ci: Remove 'macOS + gcc' from build matrix --- .github/workflows/macos.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bb136f0c3f..9b24fd5bd3 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -24,21 +24,6 @@ jobs: os: macos-15 compiler: xcode version: "16.4" - # macOS 26.3 + gcc-15 - - name: "macOS 26.3 + gcc-15" - os: macos-26 - compiler: gcc - version: "15" - # macOS 26.3 + gcc-14 - - name: "macOS 26.3 + gcc-14" - os: macos-26 - compiler: gcc - version: "14" - # macOS 26.3 + gcc-13 - - name: "macOS 26.3 + gcc-13" - os: macos-26 - compiler: gcc - version: "13" runs-on: ${{ matrix.os }} name: ๐ŸŽ Build - ${{ matrix.name }} From c280db6850ad7d68d7218b503403a292d6463500 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sat, 4 Apr 2026 23:41:48 +0900 Subject: [PATCH 19/40] test: Change the value of param 'spacing' to avoid precision error --- Tests/UnitTests/VolumeParticleEmitter2Tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/UnitTests/VolumeParticleEmitter2Tests.cpp b/Tests/UnitTests/VolumeParticleEmitter2Tests.cpp index 18dae19890..273a7bbbca 100644 --- a/Tests/UnitTests/VolumeParticleEmitter2Tests.cpp +++ b/Tests/UnitTests/VolumeParticleEmitter2Tests.cpp @@ -34,7 +34,7 @@ TEST(VolumeParticleEmitter2, Emit) BoundingBox2D box({ 0.0, 0.0 }, { 3.0, 3.0 }); - VolumeParticleEmitter2 emitter(sphere, box, 0.3, { -1.0, 0.5 }, + VolumeParticleEmitter2 emitter(sphere, box, 0.35, { -1.0, 0.5 }, { 3.0, 4.0 }, 5.0, 30, 0.0, false, false); auto particles = std::make_shared(); @@ -62,7 +62,7 @@ TEST(VolumeParticleEmitter2, Emit) emitter.SetMaxNumberOfParticles(60); emitter.Update(frame.TimeInSeconds(), frame.timeIntervalInSeconds); - EXPECT_EQ(51u, particles->NumberOfParticles()); + EXPECT_EQ(41u, particles->NumberOfParticles()); pos = particles->Positions(); for (size_t i = 0; i < particles->NumberOfParticles(); ++i) @@ -72,7 +72,7 @@ TEST(VolumeParticleEmitter2, Emit) ++frame; emitter.Update(frame.TimeInSeconds(), frame.timeIntervalInSeconds); - EXPECT_LT(51u, particles->NumberOfParticles()); + EXPECT_LT(41u, particles->NumberOfParticles()); } TEST(VolumeParticleEmitter2, Builder) From fded6399542476826f0fbb7a8e6d85f45869848a Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 09:26:32 +0900 Subject: [PATCH 20/40] ci: Update configuration file for Windows CUDA --- .github/workflows/windows-cuda.yml | 101 +++++++++++++---------------- 1 file changed, 46 insertions(+), 55 deletions(-) diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index d9b9081c87..5ec5480e84 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -1,78 +1,69 @@ -name: Windows-CUDA +name: Windows CUDA on: push: - branches: [ main, "gpu*" ] + branches: [ main ] pull_request: - branches: [ main, "gpu*" ] + branches: [ main ] + +env: + PYTHON_VERSION: '3.12' + CUDA_CACHE_ROOT: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA" jobs: build-windows-cuda: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} strategy: matrix: include: - - name: "Windows Server 2019 + Visual Studio 2019 + CUDA 11.3.1 (Debug)" - os: windows-2019 - cuda: "11.3.1" - visual_studio: "Visual Studio 16 2019" - configuration: Debug - - name: "Windows Server 2019 + Visual Studio 2019 + CUDA 11.3.1 (Release)" - os: windows-2019 + # Windows Server 2025 + Visual Studio 2026 + CUDA 12.6 + - name: "Windows Server 2025 + Visual Studio 2026 + CUDA 12.6 (Release)" + os: windows-2025-vs2026 + cuda: "12.6" + visual_studio: "Visual Studio 18 2026" + solution: CubbyFlow.slnx + # Windows Server 2022 + Visual Studio 2022 + CUDA 11.3.1 + - name: "Windows Server 2022 + Visual Studio 2022 + CUDA 11.3.1 (Release)" + os: windows-2022 cuda: "11.3.1" - visual_studio: "Visual Studio 16 2019" - configuration: Release - env: - CUDA_CACHE_ROOT: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA" + visual_studio: "Visual Studio 17 2022" + solution: CubbyFlow.sln + + runs-on: ${{ matrix.os }} + name: ๐ŸชŸ CUDA Build - ${{ matrix.name }} + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - # Install CUDA to the runner's env - - name: "Cache: CUDA" - uses: actions/cache@v2 + - name: Setup Python + uses: actions/setup-python@v5 with: - path: ${{ env.CUDA_CACHE_ROOT }} - key: ${{ matrix.os }}_cuda-${{ matrix.cuda }} - # todo: work with https://github.com/marketplace/actions/cuda-toolkit - - name: "Install/Check: CUDA" + python-version: ${{ env.PYTHON_VERSION }} + - name: Install CUDA shell: powershell env: cuda: ${{ matrix.cuda }} visual_studio: ${{ matrix.visual_studio }} - CUDA_PATH: "${{ env.CUDA_CACHE_ROOT }}\\v11.3" # using fixed path - CUDA_PATH_V11_3: "${{ env.CUDA_CACHE_ROOT }}\\v11.3" run: | - Write-Output "$env:CUDA_CACHE_ROOT" - # Install CUDA via a powershell script .\.github\workflows\scripts\actions\install_cuda_windows.ps1 - if((Test-Path "$env:CUDA_CACHE_ROOT") -eq $False){ + $cudaMajorMinor = ([regex]::Match("${{ matrix.cuda }}", "^\d+\.\d+")).Value + if (-not $cudaMajorMinor) { + throw "Failed to parse CUDA major.minor version from '${{ matrix.cuda }}'." } - $env:PATH="$env:CUDA_PATH\bin;$env:PATH" + $cudaVersionVarName = "CUDA_PATH_V$($cudaMajorMinor.Replace('.', '_'))" + $cudaPath = [Environment]::GetEnvironmentVariable($cudaVersionVarName, "Machine") + if (-not $cudaPath) { + $cudaPath = "$env:CUDA_CACHE_ROOT\v$cudaMajorMinor" + } + if (-not (Test-Path $cudaPath)) { + throw "CUDA path '$cudaPath' does not exist." + } + "CUDA_PATH=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + "$cudaPath\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append nvcc -V - ls $env:CUDA_PATH - ls $env:CUDA_PATH\bin - ls $env:CUDA_PATH\include - Write-Output $(Get-Command nvcc).Path - - name: "Setup: MSBuild" - uses: microsoft/setup-msbuild@v1.0.2 - - name: "Configure CMake" - shell: powershell - run: | - $env:PATH="$env:CUDA_PATH\\bin;$env:PATH" - $NVCC_PATH=$(Get-Command nvcc).Path - New-Item -Type Directory -Name build -Force - Push-Location build - cmake .. ` - -DCMAKE_GENERATOR_PLATFORM=x64 ` - -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ` - -DBUILD_SHARED_LIBS=false ` - -DUSE_CUDA=ON -DCUDA_CRT_LINKAGE=dynamic -DCMAKE_CUDA_COMPILER="$NVCC_PATH" - Pop-Location - env: - CUDA_PATH: "${{ env.CUDA_CACHE_ROOT }}\\v11.3" # using fixed path - CUDA_PATH_V11_3: "${{ env.CUDA_CACHE_ROOT }}\\v11.3" - - name: "Build with MSBuild" - run: MSBuild.exe CubbyFlow.sln /p:Configuration=${{ matrix.configuration }} - working-directory: ${{ github.workspace }}/build + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v2 + - name: Configure Build + run: mkdir build && cd build && cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=ON .. + - name: Build + run: cd build && MSBuild.exe ${{ matrix.solution }} /p:Configuration=Release From d705224ee66b3688dc79942c067ad133a2388d7f Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 09:26:39 +0900 Subject: [PATCH 21/40] ci: Update configuration file for Ubuntu CUDA --- .github/workflows/ubuntu-cuda.yml | 51 ++++++++++++++++++------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ubuntu-cuda.yml b/.github/workflows/ubuntu-cuda.yml index 7a295e5e38..eb5d70c867 100644 --- a/.github/workflows/ubuntu-cuda.yml +++ b/.github/workflows/ubuntu-cuda.yml @@ -1,42 +1,49 @@ -name: Ubuntu-CUDA +name: Ubuntu CUDA on: push: - branches: [ main, "gpu*" ] + branches: [ main ] pull_request: - branches: [ main, "gpu*" ] + branches: [ main ] + +env: + PYTHON_VERSION: '3.12' jobs: build-ubuntu-cuda: - runs-on: ${{ matrix.os }} - name: ${{ matrix.name }} strategy: matrix: include: - - name: "Ubuntu 20.04 + gcc-10 + CUDA 11.7 (Disable Test)" - os: ubuntu-20.04 - cuda: "11.7" + # Ubuntu 24.04 + gcc-12 + CUDA 12.6 + - name: "Ubuntu 24.04 + gcc-12 + CUDA 12.6 (Disable Test)" + os: ubuntu-24.04 + cuda: "12.6" compiler: gcc - version: "10" + version: "12" + + runs-on: ${{ matrix.os }} + name: ๐Ÿง CUDA Build - ${{ matrix.name }} + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Install packages + run: sudo apt-get update && sudo apt-get install -yq python3-setuptools - name: Install CUDA env: cuda: ${{ matrix.cuda }} + shell: bash run: | source ./.github/workflows/scripts/actions/install_cuda_ubuntu.sh - if [[ $? -eq 0 ]]; then - # Set paths for subsequent steps, using ${CUDA_PATH} - echo "Adding CUDA to CUDA_PATH, PATH and LD_LIBRARY_PATH" - echo "CUDA_PATH=${CUDA_PATH}" >> $GITHUB_ENV - echo "${CUDA_PATH}/bin" >> $GITHUB_PATH - echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV - fi - shell: bash - - name: Install Packages - run: sudo apt-get install -yq python3-setuptools + echo "Adding CUDA to CUDA_PATH, PATH and LD_LIBRARY_PATH" + echo "CUDA_PATH=${CUDA_PATH}" >> "$GITHUB_ENV" + echo "${CUDA_PATH}/bin" >> "$GITHUB_PATH" + echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH}" >> "$GITHUB_ENV" - name: Configure Compiler run: | if [ "${{ matrix.compiler }}" = "gcc" ]; then @@ -47,6 +54,6 @@ jobs: echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV fi - name: Configure Build - run: mkdir build && cd build && cmake -DENABLE_CUDA=ON -DCMAKE_BUILD_TYPE=Release .. + run: mkdir build && cd build && cmake -DUSE_CUDA=ON -DCMAKE_BUILD_TYPE=Release .. - name: Build - run: cd build && make \ No newline at end of file + run: cd build && make From f4859d639189632adead71ec7fb57ba0a1a5a546 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 09:48:17 +0900 Subject: [PATCH 22/40] ci: fix CUDA workflow setup --- .github/workflows/scripts/actions/install_cuda_ubuntu.sh | 1 + .github/workflows/windows-cuda.yml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/actions/install_cuda_ubuntu.sh b/.github/workflows/scripts/actions/install_cuda_ubuntu.sh index cbe0c8353b..a29fd8fe26 100644 --- a/.github/workflows/scripts/actions/install_cuda_ubuntu.sh +++ b/.github/workflows/scripts/actions/install_cuda_ubuntu.sh @@ -17,6 +17,7 @@ # Ideally choose from the list of meta-packages to minimise variance between cuda versions (although it does change too) CUDA_PACKAGES_IN=( "command-line-tools" + "compiler" "libraries-dev" ) diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index 5ec5480e84..430853d21f 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -15,10 +15,10 @@ jobs: strategy: matrix: include: - # Windows Server 2025 + Visual Studio 2026 + CUDA 12.6 - - name: "Windows Server 2025 + Visual Studio 2026 + CUDA 12.6 (Release)" + # Windows Server 2025 + Visual Studio 2026 + CUDA 12.6.3 + - name: "Windows Server 2025 + Visual Studio 2026 + CUDA 12.6.3 (Release)" os: windows-2025-vs2026 - cuda: "12.6" + cuda: "12.6.3" visual_studio: "Visual Studio 18 2026" solution: CubbyFlow.slnx # Windows Server 2022 + Visual Studio 2022 + CUDA 11.3.1 From 9f6dba2b9b7138e9395dab69a991762ad2f899c5 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 11:26:52 +0900 Subject: [PATCH 23/40] ci: Add some URLs of CUDA and Visual Studio minimum versions --- .github/workflows/scripts/actions/install_cuda_windows.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/scripts/actions/install_cuda_windows.ps1 b/.github/workflows/scripts/actions/install_cuda_windows.ps1 index 4a3958d2ff..afeaf47923 100644 --- a/.github/workflows/scripts/actions/install_cuda_windows.ps1 +++ b/.github/workflows/scripts/actions/install_cuda_windows.ps1 @@ -16,10 +16,14 @@ $CUDA_KNOWN_URLS = @{ "10.2.89" = "http://developer.download.nvidia.com/compute/cuda/10.2/Prod/network_installers/cuda_10.2.89_win10_network.exe"; "11.0.167" = "http://developer.download.nvidia.com/compute/cuda/11.0.1/network_installers/cuda_11.0.1_win10_network.exe" "11.3.1" = "http://developer.download.nvidia.com/compute/cuda/11.3.1/network_installers/cuda_11.3.1_win10_network.exe" + "12.6.3" = "https://developer.download.nvidia.com/compute/cuda/12.6.3/network_installers/cuda_12.6.3_windows_network.exe" + "13.2.0" = "https://developer.download.nvidia.com/compute/cuda/13.2.0/network_installers/cuda_13.2.0_windows_network.exe" } # @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead? $VISUAL_STUDIO_MIN_CUDA = @{ + "2026" = "13.2"; + "2022" = "11.6"; "2019" = "10.1"; "2017" = "10.0"; # Depends on which version of 2017! 9.0 to 10.0 depending on version "2015" = "8.0"; # might support older, unsure. From 8b04a2bf103349f39d92f74139fea9b60d3a196b Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 11:38:25 +0900 Subject: [PATCH 24/40] ci: Update CUDA version --- .github/workflows/ubuntu-cuda.yml | 6 +++--- .github/workflows/windows-cuda.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ubuntu-cuda.yml b/.github/workflows/ubuntu-cuda.yml index eb5d70c867..d0b8b68092 100644 --- a/.github/workflows/ubuntu-cuda.yml +++ b/.github/workflows/ubuntu-cuda.yml @@ -14,10 +14,10 @@ jobs: strategy: matrix: include: - # Ubuntu 24.04 + gcc-12 + CUDA 12.6 - - name: "Ubuntu 24.04 + gcc-12 + CUDA 12.6 (Disable Test)" + # Ubuntu 24.04 + gcc-12 + CUDA 12.6.3 + - name: "Ubuntu 24.04 + gcc-12 + CUDA 12.6.3 (Disable Test)" os: ubuntu-24.04 - cuda: "12.6" + cuda: "12.6.3" compiler: gcc version: "12" diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index 430853d21f..ead0e2c626 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -15,16 +15,16 @@ jobs: strategy: matrix: include: - # Windows Server 2025 + Visual Studio 2026 + CUDA 12.6.3 - - name: "Windows Server 2025 + Visual Studio 2026 + CUDA 12.6.3 (Release)" + # Windows Server 2025 + Visual Studio 2026 + CUDA 13.2.0 + - name: "Windows Server 2025 + Visual Studio 2026 + CUDA 13.2.0 (Release)" os: windows-2025-vs2026 - cuda: "12.6.3" + cuda: "13.2.0" visual_studio: "Visual Studio 18 2026" solution: CubbyFlow.slnx - # Windows Server 2022 + Visual Studio 2022 + CUDA 11.3.1 - - name: "Windows Server 2022 + Visual Studio 2022 + CUDA 11.3.1 (Release)" + # Windows Server 2022 + Visual Studio 2022 + CUDA 12.6.3 + - name: "Windows Server 2022 + Visual Studio 2022 + CUDA 12.6.3 (Release)" os: windows-2022 - cuda: "11.3.1" + cuda: "12.6.3" visual_studio: "Visual Studio 17 2022" solution: CubbyFlow.sln From 811d7225f48687b34506978836911b8759ff6306 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 12:50:26 +0900 Subject: [PATCH 25/40] build: Add command to set policy "CMP0146" to "OLD" --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34dc76d3a2..25fae98d48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ # CMake version cmake_minimum_required(VERSION 3.31.6 FATAL_ERROR) cmake_policy(SET CMP0063 NEW) # visibility +if (POLICY CMP0146) + cmake_policy(SET CMP0146 OLD) # Keep legacy FindCUDA module behavior on newer CMake. +endif() set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) From 360d40ab6bf3db8e6bd6fbe558f6b067ec6702d8 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 12:50:56 +0900 Subject: [PATCH 26/40] cI: Add command to set the path of nvcc --- .github/workflows/windows-cuda.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index ead0e2c626..c34345fe96 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -58,9 +58,13 @@ jobs: if (-not (Test-Path $cudaPath)) { throw "CUDA path '$cudaPath' does not exist." } + $nvccExe = Join-Path $cudaPath "bin\nvcc.exe" + if (-not (Test-Path $nvccExe)) { + throw "nvcc executable '$nvccExe' does not exist." + } "CUDA_PATH=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append "$cudaPath\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - nvcc -V + & $nvccExe -V - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 - name: Configure Build From 3d709539274682012967bd714be0275dec253174 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 13:18:35 +0900 Subject: [PATCH 27/40] build: Add command to set policy "CMP0147" to "OLD" --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25fae98d48..4039b1d039 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_policy(SET CMP0063 NEW) # visibility if (POLICY CMP0146) cmake_policy(SET CMP0146 OLD) # Keep legacy FindCUDA module behavior on newer CMake. endif() +if (POLICY CMP0147) + cmake_policy(SET CMP0147 OLD) # Required for legacy FindCUDA with Visual Studio generators. +endif() set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) From 08332ccaf06c146b7abfed589eb6e44ef8c4055a Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 13:37:11 +0900 Subject: [PATCH 28/40] ci: Fix Windows CUDA workflow configure --- .github/workflows/windows-cuda.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index c34345fe96..e1ffaf6678 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -63,11 +63,19 @@ jobs: throw "nvcc executable '$nvccExe' does not exist." } "CUDA_PATH=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + "$cudaVersionVarName=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + "CUDAToolkitDir=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append "$cudaPath\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append & $nvccExe -V - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 - name: Configure Build - run: mkdir build && cd build && cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=ON .. + shell: powershell + run: | + $nvccExe = Join-Path $env:CUDA_PATH "bin\nvcc.exe" + if (-not (Test-Path $nvccExe)) { + throw "nvcc executable '$nvccExe' does not exist." + } + mkdir build && cd build && cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=ON -DCUDA_CRT_LINKAGE=dynamic -DCMAKE_CUDA_COMPILER="$nvccExe" -DCUDAToolkit_ROOT="$env:CUDA_PATH" .. - name: Build run: cd build && MSBuild.exe ${{ matrix.solution }} /p:Configuration=Release From a7c5b6dc9cb6e08012bc54f394c893477685ae0f Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 13:42:56 +0900 Subject: [PATCH 29/40] ci: Fix Windows CUDA workflow configure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/windows-cuda.yml | 6 ++++-- CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index e1ffaf6678..8f4b1e781a 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -76,6 +76,8 @@ jobs: if (-not (Test-Path $nvccExe)) { throw "nvcc executable '$nvccExe' does not exist." } - mkdir build && cd build && cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=ON -DCUDA_CRT_LINKAGE=dynamic -DCMAKE_CUDA_COMPILER="$nvccExe" -DCUDAToolkit_ROOT="$env:CUDA_PATH" .. + New-Item -ItemType Directory -Path build -Force | Out-Null + cmake -S . -B build -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=ON -DCUDA_CRT_LINKAGE=dynamic -DCMAKE_CUDA_COMPILER="$nvccExe" -DCUDAToolkit_ROOT="$env:CUDA_PATH" - name: Build - run: cd build && MSBuild.exe ${{ matrix.solution }} /p:Configuration=Release + shell: powershell + run: MSBuild.exe "build\\${{ matrix.solution }}" /p:Configuration=Release diff --git a/CMakeLists.txt b/CMakeLists.txt index 4039b1d039..446d1f2205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,4 +180,4 @@ if (NOT USE_CUDA AND NOT BUILD_SONARCLOUD) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DEFAULT_CMAKE_LIBRARY_OUTPUT_DIRECTORY}) endif() add_subdirectory(Sources/API/Python) -endif() \ No newline at end of file +endif() From 48787bbf7cb1514b595e5cfe412d62e4b6c457f6 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 14:09:00 +0900 Subject: [PATCH 30/40] ci: Include CUDA crt package on Windows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/scripts/actions/install_cuda_windows.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/actions/install_cuda_windows.ps1 b/.github/workflows/scripts/actions/install_cuda_windows.ps1 index afeaf47923..4c4be99418 100644 --- a/.github/workflows/scripts/actions/install_cuda_windows.ps1 +++ b/.github/workflows/scripts/actions/install_cuda_windows.ps1 @@ -84,6 +84,11 @@ $VISUAL_STUDIO_YEAR = $VISUAL_STUDIO.Substring($VISUAL_STUDIO.Length-4) $CUDA_PACKAGES = "" +# CUDA 13+ separates runtime headers such as crt/host_config.h into the crt package. +if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN -contains "crt")) { + $CUDA_PACKAGES_IN += "crt" +} + # for CUDA >= 11 cudart is a required package. # if([version]$CUDA_VERSION_FULL -ge [version]"11.0") { # if(-not $CUDA_PACKAGES_IN -contains "cudart") { @@ -154,4 +159,4 @@ Write-Output "CUDA_PATH_VX_Y $($CUDA_PATH_VX_Y)" # PATH needs updating elsewhere, anything in here won't persist. # Append $CUDA_PATH/bin to path. -# Set CUDA_PATH as an environmental variable \ No newline at end of file +# Set CUDA_PATH as an environmental variable From 56d4cfaf08ef8bd4310dc49dee27bfc34ce9a976 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 14:17:33 +0900 Subject: [PATCH 31/40] ci: Use compiler package for modern CUDA Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/scripts/actions/install_cuda_windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/actions/install_cuda_windows.ps1 b/.github/workflows/scripts/actions/install_cuda_windows.ps1 index 4c4be99418..09277eced0 100644 --- a/.github/workflows/scripts/actions/install_cuda_windows.ps1 +++ b/.github/workflows/scripts/actions/install_cuda_windows.ps1 @@ -98,9 +98,9 @@ if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN Foreach ($package in $CUDA_PACKAGES_IN) { # Make sure the correct package name is used for nvcc. - if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1"){ + if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1"){ $package="compiler" - } elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1") { + } elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1") { $package="nvcc" } $CUDA_PACKAGES += " $($package)_$($CUDA_MAJOR).$($CUDA_MINOR)" From 4bc88dd67ad706578e5b98da839cbdb482cc5e22 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 14:23:16 +0900 Subject: [PATCH 32/40] ci: Add CUDA 13 nvvm package and fail-fast control Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../scripts/actions/install_cuda_windows.ps1 | 16 ++++++++++------ .github/workflows/windows-cuda.yml | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/scripts/actions/install_cuda_windows.ps1 b/.github/workflows/scripts/actions/install_cuda_windows.ps1 index 09277eced0..46c66bdd66 100644 --- a/.github/workflows/scripts/actions/install_cuda_windows.ps1 +++ b/.github/workflows/scripts/actions/install_cuda_windows.ps1 @@ -88,6 +88,10 @@ $CUDA_PACKAGES = "" if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN -contains "crt")) { $CUDA_PACKAGES_IN += "crt" } +# CUDA 13+ requires NVVM tooling (cicc) for nvcc compilation. +if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN -contains "nvvm")) { + $CUDA_PACKAGES_IN += "nvvm" +} # for CUDA >= 11 cudart is a required package. # if([version]$CUDA_VERSION_FULL -ge [version]"11.0") { @@ -98,9 +102,9 @@ if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN Foreach ($package in $CUDA_PACKAGES_IN) { # Make sure the correct package name is used for nvcc. - if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1"){ + if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1"){ $package="compiler" - } elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1") { + } elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1") { $package="nvcc" } $CUDA_PACKAGES += " $($package)_$($CUDA_MAJOR).$($CUDA_MINOR)" @@ -140,12 +144,12 @@ if(Test-Path -Path $CUDA_REPO_PKG_LOCAL){ # Invoke silent install of CUDA (via network installer) Write-Output "Installing CUDA $($CUDA_VERSION_FULL). Subpackages $($CUDA_PACKAGES)" -Start-Process -Wait -FilePath .\"$($CUDA_REPO_PKG_LOCAL)" -ArgumentList "-s $($CUDA_PACKAGES)" +$installerProcess = Start-Process -Wait -PassThru -FilePath .\"$($CUDA_REPO_PKG_LOCAL)" -ArgumentList "-s $($CUDA_PACKAGES)" # Check the return status of the CUDA installer. -if (!$?) { - Write-Output "Error: CUDA installer reported error. $($LASTEXITCODE)" - exit 1 +if ($installerProcess.ExitCode -ne 0) { + Write-Output "Error: CUDA installer reported error. Exit code: $($installerProcess.ExitCode)" + exit $installerProcess.ExitCode } # Store the CUDA_PATH in the environment for the current session, to be forwarded in the action. diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index 8f4b1e781a..0b19fd56ce 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -13,6 +13,7 @@ env: jobs: build-windows-cuda: strategy: + fail-fast: false matrix: include: # Windows Server 2025 + Visual Studio 2026 + CUDA 13.2.0 From 0aef11f1be0fa8446d4d097b4bd2107e82ac4f63 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 14:41:21 +0900 Subject: [PATCH 33/40] build: Enable standard preprocessor for CUDA on MSVC Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 446d1f2205..71c226c9aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,7 @@ if (USE_CUDA) "--std=c++17" "-Wno-deprecated-gpu-targets") if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/FS") # prevent race on PDB + list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/Zc:preprocessor") # required by CUDA 13 + VS 2026 if (CUDA_CRT_LINKAGE STREQUAL "dynamic") if (CMAKE_BUILD_TYPE MATCHES Debug) list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/MDd" "--debug" "-O0") From 8b133e3c6d4eb977ca2f944a9a7d098372ace7fe Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 14:53:47 +0900 Subject: [PATCH 34/40] build: Include CUDA CCCL headers when available Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71c226c9aa..8534e9aa14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,9 @@ if (USE_CUDA) find_package(CUDA) if (CUDA_FOUND) # Modify project options for CUDA build enable_language(CUDA) + if (EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/include/cccl") + include_directories("${CUDA_TOOLKIT_ROOT_DIR}/include/cccl") + endif() cuda_select_nvcc_arch_flags(CUDA_NVCC_FLAGS "7.5" "Turing") # We will use CUDA_TARGET_OPTIONS instead of CUDA_NVCC_FLAGS to be explicit. # start with architecture options From 40ea8835abfb47f0210e0c7a049cdb9431eed920 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 15:07:28 +0900 Subject: [PATCH 35/40] build: Use conforming preprocessor for MSVC CUDA headers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8534e9aa14..1b5cf6a3dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ if (USE_CUDA) endif() endif() list(APPEND DEFAULT_COMPILE_OPTIONS + /Zc:preprocessor # required by CUDA 13 CCCL headers on MSVC /wd4515 # -> disable warning: [Thrust issue] 'detail': namespace uses itself /wd4996 # -> disable warning: [Thrust issue] 'strerror': This function or variable may be unsafe. /wd4800 # -> disable warning: [Thrust issue] forcing value to bool 'true' or 'false' (performance warning) From 963ac455560e16849f2e01d05fc367c3d185d9bf Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 15:22:53 +0900 Subject: [PATCH 36/40] build: Force MSVC conforming preprocessor in CUDA builds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b5cf6a3dd..c9b4274c27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ if (USE_CUDA) list(APPEND CUDA_TARGET_OPTIONS "--std=c++17" "-Wno-deprecated-gpu-targets") if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor") list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/FS") # prevent race on PDB list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/Zc:preprocessor") # required by CUDA 13 + VS 2026 if (CUDA_CRT_LINKAGE STREQUAL "dynamic") @@ -80,7 +81,6 @@ if (USE_CUDA) endif() endif() list(APPEND DEFAULT_COMPILE_OPTIONS - /Zc:preprocessor # required by CUDA 13 CCCL headers on MSVC /wd4515 # -> disable warning: [Thrust issue] 'detail': namespace uses itself /wd4996 # -> disable warning: [Thrust issue] 'strerror': This function or variable may be unsafe. /wd4800 # -> disable warning: [Thrust issue] forcing value to bool 'true' or 'false' (performance warning) From 960bf1c389a921144adefed37e750a6f0d1a8c77 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 15:36:07 +0900 Subject: [PATCH 37/40] build: Suppress CUDA 13 C4505 warning on MSVC Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9b4274c27..40f2d6d49f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ if (USE_CUDA) endif() endif() list(APPEND DEFAULT_COMPILE_OPTIONS + /wd4505 # -> disable warning: unreferenced function with internal linkage has been removed (CUDA 13 headers) /wd4515 # -> disable warning: [Thrust issue] 'detail': namespace uses itself /wd4996 # -> disable warning: [Thrust issue] 'strerror': This function or variable may be unsafe. /wd4800 # -> disable warning: [Thrust issue] forcing value to bool 'true' or 'false' (performance warning) From bbfa3a4f8e3e4f218cb14cb39281df7d90ab4ce3 Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 15:52:13 +0900 Subject: [PATCH 38/40] build: Add /wd4505 for Windows CUDA builds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40f2d6d49f..44ff9fdeaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,7 +81,6 @@ if (USE_CUDA) endif() endif() list(APPEND DEFAULT_COMPILE_OPTIONS - /wd4505 # -> disable warning: unreferenced function with internal linkage has been removed (CUDA 13 headers) /wd4515 # -> disable warning: [Thrust issue] 'detail': namespace uses itself /wd4996 # -> disable warning: [Thrust issue] 'strerror': This function or variable may be unsafe. /wd4800 # -> disable warning: [Thrust issue] forcing value to bool 'true' or 'false' (performance warning) @@ -112,6 +111,9 @@ include(Builds/CMake/TaskingSystemOptions.cmake) # Compile options include(Builds/CMake/CompileOptions.cmake) +if (USE_CUDA AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + list(APPEND DEFAULT_COMPILE_OPTIONS /wd4505) +endif() # Code coverage - Debug only # NOTE: Code coverage results with an optimized (non-Debug) build may be misleading From 4879e4a18b438186fd67d68d8ef72946d96e5ebe Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 17:47:18 +0900 Subject: [PATCH 39/40] ci: Run CUDA unit tests in CUDA workflows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ubuntu-cuda.yml | 4 +++- .github/workflows/windows-cuda.yml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-cuda.yml b/.github/workflows/ubuntu-cuda.yml index d0b8b68092..b886c27e89 100644 --- a/.github/workflows/ubuntu-cuda.yml +++ b/.github/workflows/ubuntu-cuda.yml @@ -15,7 +15,7 @@ jobs: matrix: include: # Ubuntu 24.04 + gcc-12 + CUDA 12.6.3 - - name: "Ubuntu 24.04 + gcc-12 + CUDA 12.6.3 (Disable Test)" + - name: "Ubuntu 24.04 + gcc-12 + CUDA 12.6.3" os: ubuntu-24.04 cuda: "12.6.3" compiler: gcc @@ -57,3 +57,5 @@ jobs: run: mkdir build && cd build && cmake -DUSE_CUDA=ON -DCMAKE_BUILD_TYPE=Release .. - name: Build run: cd build && make + - name: Run CUDA Unit Test + run: /home/runner/work/CubbyFlow/CubbyFlow/build/bin/CUDATests diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index 0b19fd56ce..e3ce42b772 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -82,3 +82,6 @@ jobs: - name: Build shell: powershell run: MSBuild.exe "build\\${{ matrix.solution }}" /p:Configuration=Release + - name: Run CUDA Unit Test + shell: powershell + run: /a/CubbyFlow/CubbyFlow/build/bin/Release/CUDATests.exe From e3b97a77a729694a02bb2f6821491754616dac6f Mon Sep 17 00:00:00 2001 From: Chris Ohk Date: Sun, 5 Apr 2026 18:09:05 +0900 Subject: [PATCH 40/40] ci: Run CUDA tests on GPU runners conditionally Skip CUDA unit test execution when the runner has no CUDA-capable GPU, while still running tests when GPU is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ubuntu-cuda.yml | 7 ++++++- .github/workflows/windows-cuda.yml | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu-cuda.yml b/.github/workflows/ubuntu-cuda.yml index b886c27e89..c4c8e7371f 100644 --- a/.github/workflows/ubuntu-cuda.yml +++ b/.github/workflows/ubuntu-cuda.yml @@ -58,4 +58,9 @@ jobs: - name: Build run: cd build && make - name: Run CUDA Unit Test - run: /home/runner/work/CubbyFlow/CubbyFlow/build/bin/CUDATests + run: | + if command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi -L >/dev/null 2>&1; then + /home/runner/work/CubbyFlow/CubbyFlow/build/bin/CUDATests + else + echo "No CUDA-capable GPU detected on runner. Skipping CUDA unit tests." + fi diff --git a/.github/workflows/windows-cuda.yml b/.github/workflows/windows-cuda.yml index e3ce42b772..eeb5d2ca46 100644 --- a/.github/workflows/windows-cuda.yml +++ b/.github/workflows/windows-cuda.yml @@ -84,4 +84,14 @@ jobs: run: MSBuild.exe "build\\${{ matrix.solution }}" /p:Configuration=Release - name: Run CUDA Unit Test shell: powershell - run: /a/CubbyFlow/CubbyFlow/build/bin/Release/CUDATests.exe + run: | + $nvidiaSmi = Get-Command "nvidia-smi.exe" -ErrorAction SilentlyContinue + if ($null -ne $nvidiaSmi) { + & nvidia-smi.exe -L | Out-Host + if ($LASTEXITCODE -eq 0) { + & /a/CubbyFlow/CubbyFlow/build/bin/Release/CUDATests.exe + exit $LASTEXITCODE + } + } + + Write-Host "No CUDA-capable GPU detected on runner. Skipping CUDA unit tests."