9292 echo "CUDA_PATH=$CUDA_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
9393 Copy-Item -Path "$CUDA_PATH/bin/*" -Destination . -Include "*.dll"
9494 shell : pwsh
95- - name : Cache CuDNN Installer
96- id : cache-cudnn-installer
97- uses : actions/cache@v3
98- with :
99- path : ./.cache/cudnn.zip
100- key : cudnn-8.9.7.29-cuda-12-windows
101- - name : 🔧 Install NVIDIA CuDNN
102- run : |
103- $cudnn_path = "./.cache/cudnn.zip"
104- if (-not (Test-Path $cudnn_path)) {
105- echo "Downloading CuDNN..."
106- $cudnn_installer_url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip"
107- New-Item -Path (Split-Path $cudnn_path) -ItemType Directory -Force
108- curl -L -o $cudnn_path $cudnn_installer_url
109- } else {
110- echo "CuDNN installer found in cache."
111- }
112- echo "Installing CuDNN..."
113- 7z x $cudnn_path
114- $CUDNN_PATH = "D:/a/opencv-python-cuda/opencv-python-cuda/cudnn-windows-x86_64-8.9.7.29_cuda12-archive"
115- echo "CUDNN_LIBRARY=$CUDNN_PATH/lib/x64/cudnn.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
116- echo "CUDNN_INCLUDE_DIR=$CUDNN_PATH/include" | Out-File -FilePath $env:GITHUB_ENV -Append
117- Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
118- shell : pwsh
11995
12096 # TODO: This isn't the correct cache key since it relies on the CMake options we build with.
12197 # This is good enough for now though to cache build artifacts; we can manually skip restoring
@@ -125,9 +101,9 @@ jobs:
125101 if : ${{ inputs.restore_build_cache }}
126102 with :
127103 path : _skbuild
128- key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }}
104+ key : ${{ runner.os }}-${{ matrix.python-version }}-minimal- ${{ hashFiles('**/CMakeLists.txt') }}
129105 restore-keys : |
130- ${{ runner.os }}-${{ matrix.python-version }}-
106+ ${{ runner.os }}-${{ matrix.python-version }}-minimal-
131107
132108 - name : Build a package
133109 # CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
@@ -149,7 +125,7 @@ jobs:
149125 if : ${{ inputs.save_build_cache }}
150126 with :
151127 path : _skbuild
152- key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }}
128+ key : ${{ runner.os }}-${{ matrix.python-version }}-minimal- ${{ hashFiles('**/CMakeLists.txt') }}
153129 - name : Saving all wheels
154130 uses : actions/upload-artifact@v4
155131 with :
0 commit comments