From ee079b55daaecaa6563699228802e3684d87725a Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 21:21:25 -0700 Subject: [PATCH 1/8] Add GitHub Actions CI, wheel building, and docs workflows - ci.yml: build check on push to main and PRs (Python 3.12, CUDA, Vulkan) - wheels.yml: cibuildwheel matrix for Python 3.9-3.13 on Windows, triggered by release or manual dispatch. Publishes to PyPI via trusted publishing and uploads wheels to GitHub Release assets. - docs.yml: builds Sphinx docs and deploys to docs branch (GitHub Pages), triggered by release or manual dispatch Also updates docs config: - conf.py: version from importlib.metadata, autoapi_dirs from installed package - Makefile: build output to docs/build (not install/docs) - requirements.txt: add missing numpydoc, myst_parser deps --- .github/workflows/ci.yml | 36 +++++++++++++ .github/workflows/docs.yml | 48 ++++++++++++++++++ .github/workflows/wheels.yml | 97 ++++++++++++++++++++++++++++++++++++ docs/Makefile | 2 +- docs/requirements.txt | 8 +-- docs/source/conf.py | 14 ++---- 6 files changed, 192 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e05d828 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install CUDA Toolkit + uses: Jimver/cuda-toolkit@v0.2.27 + with: + cuda: "12.6.0" + method: network + sub-packages: '["nvcc", "cudart"]' + + - name: Install Vulkan SDK + uses: humbletim/setup-vulkan-sdk@v1.2.0 + with: + vulkan-query-version: 1.3.290.0 + vulkan-components: Vulkan-Headers, Vulkan-Loader + vulkan-use-cache: true + + - name: Build and install + run: pip install . -v + + - name: Verify import + run: python -c "import touchpy; print(f'touchpy {touchpy.__version__} OK')" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f5945b4 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,48 @@ +name: Documentation + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install CUDA Toolkit + uses: Jimver/cuda-toolkit@v0.2.27 + with: + cuda: "12.6.0" + method: network + sub-packages: '["nvcc", "cudart"]' + + - name: Install Vulkan SDK + uses: humbletim/setup-vulkan-sdk@v1.2.0 + with: + vulkan-query-version: 1.3.290.0 + vulkan-components: Vulkan-Headers, Vulkan-Loader + vulkan-use-cache: true + + - name: Build and install touchpy + run: pip install . -v + + - name: Install docs dependencies + run: pip install -r docs/requirements.txt + + - name: Build documentation + run: sphinx-build -M html docs/source docs/build + + - name: Deploy to docs branch + uses: peaceiris/actions-gh-pages@v4 + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html + publish_branch: docs + force_orphan: false diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..bcc1d3c --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,97 @@ +name: Build Wheels + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + build_wheels: + name: Build wheels (Python ${{ matrix.python }}) + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + python: ["cp39", "cp310", "cp311", "cp312", "cp313"] + steps: + - uses: actions/checkout@v4 + + - name: Install CUDA Toolkit + uses: Jimver/cuda-toolkit@v0.2.27 + with: + cuda: "12.6.0" + method: network + sub-packages: '["nvcc", "cudart"]' + + - name: Install Vulkan SDK + uses: humbletim/setup-vulkan-sdk@v1.2.0 + with: + vulkan-query-version: 1.3.290.0 + vulkan-components: Vulkan-Headers, Vulkan-Loader + vulkan-use-cache: true + + - name: Build wheel + uses: pypa/cibuildwheel@v2.22 + env: + CIBW_BUILD: "${{ matrix.python }}-win_amd64" + CIBW_ARCHS_WINDOWS: "AMD64" + + - uses: actions/upload-artifact@v4 + with: + name: wheel-${{ matrix.python }} + path: ./wheelhouse/*.whl + + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build sdist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz + + publish: + name: Publish to PyPI + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + if: github.event_name == 'release' + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: wheel-* + path: dist/ + merge-multiple: true + + - uses: actions/download-artifact@v4 + with: + name: sdist + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + upload_release_assets: + name: Upload release assets + needs: [build_wheels] + runs-on: ubuntu-latest + if: github.event_name == 'release' + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: wheel-* + path: dist/ + merge-multiple: true + + - name: Upload wheels to release + uses: softprops/action-gh-release@v2 + with: + files: dist/*.whl diff --git a/docs/Makefile b/docs/Makefile index be51262..d0c3cbf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source -BUILDDIR = ../install/docs +BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/requirements.txt b/docs/requirements.txt index fb62be0..a97fab4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,6 @@ -sphinx==7.3.6 -sphinx-autoapi==3.1.0b0 -furo==2024.1.29 +sphinx>=7.3 +sphinx-autoapi>=3.1 +furo sphinx-copybutton +numpydoc +myst_parser diff --git a/docs/source/conf.py b/docs/source/conf.py index ee19c38..34d93c7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,18 +4,12 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html -from pathlib import Path -import sys -localImportPath = Path.cwd().parents[1] / 'install/modules' - -if str(localImportPath) not in sys.path: - sys.path.insert(0,str(localImportPath)) - +from importlib.metadata import version as get_version project = 'TouchPy' copyright = '2024' author = 'IntentDev' -release = '0.10' +release = get_version('touchpy') #==== start autoapi variant ======================== @@ -28,7 +22,9 @@ 'numpydoc', 'myst_parser'] -autoapi_dirs = ['../../out/install_build/py312'] +import touchpy +import os +autoapi_dirs = [os.path.dirname(touchpy.__file__)] autoapi_type = "python" autoapi_options = [ 'members', 'undoc-members', 'private-members', 'show-module-summary', 'special-members', 'imported-members', ] From 3428d696ef3f29c54af5b6ab788e6b7a6f940b8a Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 21:26:59 -0700 Subject: [PATCH 2/8] Switch Vulkan SDK action to jakoch/install-vulkan-sdk-action The humbletim/setup-vulkan-sdk action depends on deprecated actions/cache@v2 which is no longer supported by GitHub Actions. --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/docs.yml | 8 ++++---- .github/workflows/wheels.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e05d828..0372ac8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,11 @@ jobs: sub-packages: '["nvcc", "cudart"]' - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.0 + uses: jakoch/install-vulkan-sdk-action@v1.0.5 with: - vulkan-query-version: 1.3.290.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true + vulkan_version: 1.3.290.0 + install_runtime: false + cache: true - name: Build and install run: pip install . -v diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f5945b4..04b63cd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,11 +23,11 @@ jobs: sub-packages: '["nvcc", "cudart"]' - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.0 + uses: jakoch/install-vulkan-sdk-action@v1.0.5 with: - vulkan-query-version: 1.3.290.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true + vulkan_version: 1.3.290.0 + install_runtime: false + cache: true - name: Build and install touchpy run: pip install . -v diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index bcc1d3c..14305b1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -24,11 +24,11 @@ jobs: sub-packages: '["nvcc", "cudart"]' - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.0 + uses: jakoch/install-vulkan-sdk-action@v1.0.5 with: - vulkan-query-version: 1.3.290.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true + vulkan_version: 1.3.290.0 + install_runtime: false + cache: true - name: Build wheel uses: pypa/cibuildwheel@v2.22 From 935b9ff1999a9fde60824cf8e97b000e64816987 Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 21:29:16 -0700 Subject: [PATCH 3/8] Disable caching on CUDA toolkit action to avoid cache path validation error --- .github/workflows/ci.yml | 2 ++ .github/workflows/docs.yml | 2 ++ .github/workflows/wheels.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0372ac8..30789b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,8 @@ jobs: cuda: "12.6.0" method: network sub-packages: '["nvcc", "cudart"]' + use-github-cache: false + use-local-cache: false - name: Install Vulkan SDK uses: jakoch/install-vulkan-sdk-action@v1.0.5 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 04b63cd..0f4b96b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,6 +21,8 @@ jobs: cuda: "12.6.0" method: network sub-packages: '["nvcc", "cudart"]' + use-github-cache: false + use-local-cache: false - name: Install Vulkan SDK uses: jakoch/install-vulkan-sdk-action@v1.0.5 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 14305b1..6149fad 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -22,6 +22,8 @@ jobs: cuda: "12.6.0" method: network sub-packages: '["nvcc", "cudart"]' + use-github-cache: false + use-local-cache: false - name: Install Vulkan SDK uses: jakoch/install-vulkan-sdk-action@v1.0.5 From 357d2ddd1fa0f902cc0700bf1a6c0b59d28d87ef Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 21:30:59 -0700 Subject: [PATCH 4/8] Replace CUDA toolkit action with direct NVIDIA installer --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/docs.yml | 14 +++++++------- .github/workflows/wheels.yml | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30789b0..45fc89b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,13 +16,13 @@ jobs: python-version: "3.12" - name: Install CUDA Toolkit - uses: Jimver/cuda-toolkit@v0.2.27 - with: - cuda: "12.6.0" - method: network - sub-packages: '["nvcc", "cudart"]' - use-github-cache: false - use-local-cache: false + shell: powershell + run: | + $url = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe" + Invoke-WebRequest -Uri $url -OutFile cuda_installer.exe + Start-Process -FilePath .\cuda_installer.exe -ArgumentList '-s','nvcc_12.6','cudart_12.6' -Wait -NoNewWindow + echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6" >> $env:GITHUB_ENV + echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin" >> $env:GITHUB_PATH - name: Install Vulkan SDK uses: jakoch/install-vulkan-sdk-action@v1.0.5 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0f4b96b..256ac16 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,13 +16,13 @@ jobs: python-version: "3.12" - name: Install CUDA Toolkit - uses: Jimver/cuda-toolkit@v0.2.27 - with: - cuda: "12.6.0" - method: network - sub-packages: '["nvcc", "cudart"]' - use-github-cache: false - use-local-cache: false + shell: powershell + run: | + $url = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe" + Invoke-WebRequest -Uri $url -OutFile cuda_installer.exe + Start-Process -FilePath .\cuda_installer.exe -ArgumentList '-s','nvcc_12.6','cudart_12.6' -Wait -NoNewWindow + echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6" >> $env:GITHUB_ENV + echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin" >> $env:GITHUB_PATH - name: Install Vulkan SDK uses: jakoch/install-vulkan-sdk-action@v1.0.5 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 6149fad..272eece 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -17,13 +17,13 @@ jobs: - uses: actions/checkout@v4 - name: Install CUDA Toolkit - uses: Jimver/cuda-toolkit@v0.2.27 - with: - cuda: "12.6.0" - method: network - sub-packages: '["nvcc", "cudart"]' - use-github-cache: false - use-local-cache: false + shell: powershell + run: | + $url = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe" + Invoke-WebRequest -Uri $url -OutFile cuda_installer.exe + Start-Process -FilePath .\cuda_installer.exe -ArgumentList '-s','nvcc_12.6','cudart_12.6' -Wait -NoNewWindow + echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6" >> $env:GITHUB_ENV + echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin" >> $env:GITHUB_PATH - name: Install Vulkan SDK uses: jakoch/install-vulkan-sdk-action@v1.0.5 From 03da8f985e4057d578c6219dc42c6c62ea0c9c22 Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 21:49:25 -0700 Subject: [PATCH 5/8] Use Ninja generator in CI to avoid CUDA VS integration requirement Add ninja to build-system requires so scikit-build-core uses Ninja instead of the Visual Studio generator. Ninja only needs nvcc on PATH (which we set up), while VS generator requires the CUDA VS integration plugin. Add ilammy/msvc-dev-cmd step to put cl.exe on PATH for Ninja. --- .github/workflows/ci.yml | 3 +++ .github/workflows/docs.yml | 3 +++ .github/workflows/wheels.yml | 3 +++ pyproject.toml | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45fc89b..803b5ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,9 @@ jobs: with: python-version: "3.12" + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + - name: Install CUDA Toolkit shell: powershell run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 256ac16..2716177 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,6 +15,9 @@ jobs: with: python-version: "3.12" + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + - name: Install CUDA Toolkit shell: powershell run: | diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 272eece..ac5c154 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -16,6 +16,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + - name: Install CUDA Toolkit shell: powershell run: | diff --git a/pyproject.toml b/pyproject.toml index dc3f1ba..518f243 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core>=0.10", "nanobind>=2.4.0"] +requires = ["scikit-build-core>=0.10", "nanobind>=2.4.0", "ninja"] build-backend = "scikit_build_core.build" [project] From 3ff84bc5f0c956bdc4359cf6e98f60952f8b37cd Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 21:55:11 -0700 Subject: [PATCH 6/8] Force Ninja generator in CI via CMAKE_GENERATOR env var --- .github/workflows/ci.yml | 2 ++ .github/workflows/docs.yml | 2 ++ .github/workflows/wheels.yml | 1 + pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 803b5ba..39bb4e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,8 @@ jobs: - name: Build and install run: pip install . -v + env: + CMAKE_GENERATOR: Ninja - name: Verify import run: python -c "import touchpy; print(f'touchpy {touchpy.__version__} OK')" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2716177..2552567 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -36,6 +36,8 @@ jobs: - name: Build and install touchpy run: pip install . -v + env: + CMAKE_GENERATOR: Ninja - name: Install docs dependencies run: pip install -r docs/requirements.txt diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ac5c154..e5340d2 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -40,6 +40,7 @@ jobs: env: CIBW_BUILD: "${{ matrix.python }}-win_amd64" CIBW_ARCHS_WINDOWS: "AMD64" + CMAKE_GENERATOR: Ninja - uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index 518f243..dc3f1ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core>=0.10", "nanobind>=2.4.0", "ninja"] +requires = ["scikit-build-core>=0.10", "nanobind>=2.4.0"] build-backend = "scikit_build_core.build" [project] From 60e5a0dae73816b0adac7342d99fc09f9393ee70 Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 22:07:44 -0700 Subject: [PATCH 7/8] Fetch VMA (Vulkan Memory Allocator) via FetchContent for CI compatibility --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23b55fb..49d5a46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,15 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(spdlog) +FetchContent_Declare( + VulkanMemoryAllocator + GIT_REPOSITORY https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git + GIT_TAG v3.1.0 + CONFIGURE_COMMAND "" + BUILD_COMMAND "" +) +FetchContent_MakeAvailable(VulkanMemoryAllocator) + # touchpy ################################################################################################# find_package(Python 3.9 @@ -105,6 +114,7 @@ target_include_directories(touchpy PRIVATE ${SOURCE_DIR} ${CUDAToolkit_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/external/TouchEngine-Windows/include" + "${vulkanmemoryallocator_SOURCE_DIR}/include" ) target_link_directories(touchpy PRIVATE From 1da0333a4ef066b714b7d7ef4d83aad0c7252876 Mon Sep 17 00:00:00 2001 From: keithlostracco Date: Mon, 25 May 2026 22:18:11 -0700 Subject: [PATCH 8/8] Fix VMA include path and add CUDA caching - VMA repo has header at include/vk_mem_alloc.h but source expects vma/vk_mem_alloc.h (Vulkan SDK layout). Copy header into expected directory structure at configure time. - Cache CUDA Toolkit install between CI runs to avoid 2+ min download on every build. --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/docs.yml | 12 ++++++++++++ .github/workflows/wheels.yml | 12 ++++++++++++ CMakeLists.txt | 8 +++++++- 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39bb4e2..4507ce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,12 +18,24 @@ jobs: - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1 + - name: Cache CUDA Toolkit + id: cache-cuda + uses: actions/cache@v4 + with: + path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6 + key: cuda-12.6.0-nvcc-cudart + - name: Install CUDA Toolkit + if: steps.cache-cuda.outputs.cache-hit != 'true' shell: powershell run: | $url = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe" Invoke-WebRequest -Uri $url -OutFile cuda_installer.exe Start-Process -FilePath .\cuda_installer.exe -ArgumentList '-s','nvcc_12.6','cudart_12.6' -Wait -NoNewWindow + + - name: Set CUDA environment + shell: powershell + run: | echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6" >> $env:GITHUB_ENV echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin" >> $env:GITHUB_PATH diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2552567..40eee5c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,12 +18,24 @@ jobs: - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1 + - name: Cache CUDA Toolkit + id: cache-cuda + uses: actions/cache@v4 + with: + path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6 + key: cuda-12.6.0-nvcc-cudart + - name: Install CUDA Toolkit + if: steps.cache-cuda.outputs.cache-hit != 'true' shell: powershell run: | $url = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe" Invoke-WebRequest -Uri $url -OutFile cuda_installer.exe Start-Process -FilePath .\cuda_installer.exe -ArgumentList '-s','nvcc_12.6','cudart_12.6' -Wait -NoNewWindow + + - name: Set CUDA environment + shell: powershell + run: | echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6" >> $env:GITHUB_ENV echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin" >> $env:GITHUB_PATH diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e5340d2..37f3583 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -19,12 +19,24 @@ jobs: - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1 + - name: Cache CUDA Toolkit + id: cache-cuda + uses: actions/cache@v4 + with: + path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6 + key: cuda-12.6.0-nvcc-cudart + - name: Install CUDA Toolkit + if: steps.cache-cuda.outputs.cache-hit != 'true' shell: powershell run: | $url = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe" Invoke-WebRequest -Uri $url -OutFile cuda_installer.exe Start-Process -FilePath .\cuda_installer.exe -ArgumentList '-s','nvcc_12.6','cudart_12.6' -Wait -NoNewWindow + + - name: Set CUDA environment + shell: powershell + run: | echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6" >> $env:GITHUB_ENV echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin" >> $env:GITHUB_PATH diff --git a/CMakeLists.txt b/CMakeLists.txt index 49d5a46..70cbcdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,12 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(VulkanMemoryAllocator) +# Source includes VMA as "vma/vk_mem_alloc.h" (matching Vulkan SDK layout) +# but the VMA repo puts it at include/vk_mem_alloc.h — create the expected structure +file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/_vma_include/vma") +file(COPY "${vulkanmemoryallocator_SOURCE_DIR}/include/vk_mem_alloc.h" + DESTINATION "${CMAKE_BINARY_DIR}/_vma_include/vma") + # touchpy ################################################################################################# find_package(Python 3.9 @@ -114,7 +120,7 @@ target_include_directories(touchpy PRIVATE ${SOURCE_DIR} ${CUDAToolkit_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/external/TouchEngine-Windows/include" - "${vulkanmemoryallocator_SOURCE_DIR}/include" + "${CMAKE_BINARY_DIR}/_vma_include" ) target_link_directories(touchpy PRIVATE