7777 echo "Adding CUDA to PATH..."
7878 $CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4"
7979 echo "CUDA_PATH=$CUDA_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
80+ Copy-Item -Path "$CUDA_PATH/bin/*" -Destination . -Include "*.dll"
8081 shell : pwsh
81- # $arguments = "-s cublas_12.4 cublas_dev_12.4 cudart_12.4 cufft_12.4 cufft_dev_12.4 npp_12.4 npp_dev_12.4 nvcc_12.4"
82- # echo "$CUDA_PATH\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
83- # echo "$CUDA_PATH\lib\x64" | Out-File -FilePath $env:GITHUB_PATH -Append
84- # echo "$CUDA_PATH"
8582 - name : Cache CuDNN Installer
8683 id : cache-cudnn-installer
8784 uses : actions/cache@v3
@@ -104,8 +101,16 @@ jobs:
104101 $CUDNN_PATH = "D:/a/opencv-python-cuda/opencv-python-cuda/cudnn-windows-x86_64-8.9.7.29_cuda12-archive"
105102 echo "CUDNN_LIBRARY=$CUDNN_PATH/lib/x64/cudnn.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
106103 echo "CUDNN_INCLUDE_DIR=$CUDNN_PATH/include" | Out-File -FilePath $env:GITHUB_ENV -Append
104+ Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
107105 shell : pwsh
108106
107+ - name : Cache build artifacts
108+ uses : actions/cache@v3
109+ with :
110+ path : _skbuild
111+ key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }}
112+ restore-keys : |
113+ ${{ runner.os }}-${{ matrix.python-version }}-
109114 - name : Build a package
110115 # CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
111116 run : |
@@ -114,8 +119,12 @@ jobs:
114119 python -m pip install --upgrade setuptools
115120 python -m pip install cmake==3.24.2
116121 python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
117- set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
118- shell : cmd
122+ $CI_BUILD = 1
123+ if (Test-Path _skbuild) {
124+ $SKIP_CMAKE = "--skip-cmake"
125+ }
126+ python setup.py $SKIP_CMAKE bdist_wheel --py-limited-api=cp37 --dist-dir="$PWD\wheelhouse" -v
127+ shell : pwsh
119128 - name : Saving all wheels
120129 uses : actions/upload-artifact@v4
121130 with :
0 commit comments