darknet/appveyor.yml

110 lines
7.6 KiB
YAML

image: Visual Studio 2019
clone_folder: c:\projects\darknet
cache: C:\Tools\vcpkg\installed\
environment:
WORKSPACE: C:\projects
matrix:
- platform: Cygwin64
USE_CUDA: no
COMPILER: cygwin
CYGWIN_NOWINPATH: yes
CYGSH: C:\cygwin64\bin\bash -c
- platform: Win64
USE_CUDA: yes
INSTALL_CUDA_VERSION: 10.0
COMPILER: vs
configuration: Release
VCPKG_ROOT: C:\Tools\vcpkg
VCPKG_DEFAULT_TRIPLET: x64-windows
- platform: Win64
USE_CUDA: yes
INSTALL_CUDA_VERSION: 10.1
COMPILER: vs
configuration: Release
VCPKG_ROOT: C:\Tools\vcpkg
VCPKG_DEFAULT_TRIPLET: x64-windows
#- platform: Win64
# USE_CUDA: yes
# INSTALL_CUDA_VERSION: 10.2
# COMPILER: vs
# configuration: Release
# VCPKG_ROOT: C:\Tools\vcpkg
# VCPKG_DEFAULT_TRIPLET: x64-windows
- platform: Win64
USE_CUDA: no
COMPILER: vs
configuration: Release
VCPKG_ROOT: C:\Tools\vcpkg
VCPKG_DEFAULT_TRIPLET: x64-windows
- platform: Win64
USE_CUDA: no
COMPILER: vs
configuration: Release
USE_INTEGRATED_LIBS: yes
- platform: Win64
USE_CUDA: no
COMPILER: vs
configuration: Release
USE_INTEGRATED_LIBS: yes
FORCE_CPP: yes
install:
- if [%COMPILER%]==[vs] cinst cmake ninja
- if [%COMPILER%]==[vs] SET "PATH=C:\Program Files\CMake\bin;%PATH%"
- if [%COMPILER%]==[vs] call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- if [%COMPILER%]==[cygwin] SET "PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\cygwin64\usr\bin;%PATH%"
- if [%COMPILER%]==[cygwin] SET PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- cd %WORKSPACE%\
- if [%USE_CUDA%]==[yes] if [%INSTALL_CUDA_VERSION%]==[10.0] curl -L https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_411.31_win10 -o setup.exe
- if [%USE_CUDA%]==[yes] if [%INSTALL_CUDA_VERSION%]==[10.1] curl -L https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.96_win10.exe -o setup.exe
- if [%USE_CUDA%]==[yes] if [%INSTALL_CUDA_VERSION%]==[10.2] curl -L http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_441.22_win10.exe -o setup.exe
- if [%USE_CUDA%]==[yes] .\setup.exe -s nvcc_%INSTALL_CUDA_VERSION% cuobjdump_%INSTALL_CUDA_VERSION% nvprune_%INSTALL_CUDA_VERSION% cupti_%INSTALL_CUDA_VERSION% gpu_library_advisor_%INSTALL_CUDA_VERSION% memcheck_%INSTALL_CUDA_VERSION% nvdisasm_%INSTALL_CUDA_VERSION% nvprof_%INSTALL_CUDA_VERSION% visual_profiler_%INSTALL_CUDA_VERSION% visual_studio_integration_%INSTALL_CUDA_VERSION% cublas_%INSTALL_CUDA_VERSION% cublas_dev_%INSTALL_CUDA_VERSION% cudart_%INSTALL_CUDA_VERSION% cufft_%INSTALL_CUDA_VERSION% cufft_dev_%INSTALL_CUDA_VERSION% curand_%INSTALL_CUDA_VERSION% curand_dev_%INSTALL_CUDA_VERSION% cusolver_%INSTALL_CUDA_VERSION% cusolver_dev_%INSTALL_CUDA_VERSION% cusparse_%INSTALL_CUDA_VERSION% cusparse_dev_%INSTALL_CUDA_VERSION% nvgraph_%INSTALL_CUDA_VERSION% nvgraph_dev_%INSTALL_CUDA_VERSION% npp_%INSTALL_CUDA_VERSION% npp_dev_%INSTALL_CUDA_VERSION% nvrtc_%INSTALL_CUDA_VERSION% nvrtc_dev_%INSTALL_CUDA_VERSION% nvml_dev_%INSTALL_CUDA_VERSION% occupancy_calculator_%INSTALL_CUDA_VERSION% fortran_examples_%INSTALL_CUDA_VERSION%
- if [%USE_CUDA%]==[yes] set CUDA_PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%INSTALL_CUDA_VERSION%
- if [%USE_CUDA%]==[yes] if [%INSTALL_CUDA_VERSION%]==[10.0] set CUDA_PATH_V10_0=%CUDA_PATH%
- if [%USE_CUDA%]==[yes] if [%INSTALL_CUDA_VERSION%]==[10.1] set CUDA_PATH_V10_1=%CUDA_PATH%
- if [%USE_CUDA%]==[yes] if [%INSTALL_CUDA_VERSION%]==[10.2] set CUDA_PATH_V10_2=%CUDA_PATH%
- if [%USE_CUDA%]==[yes] set CUDA_TOOLKIT_ROOT_DIR=%CUDA_PATH%
- if [%USE_CUDA%]==[yes] set PATH=%CUDA_PATH%\bin;%PATH%
- cd %WORKSPACE%\
- mkdir cygwin-downloads
- ps: if($env:COMPILER -eq "cygwin") { Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile $env:WORKSPACE\cygwin-setup.exe }
- if [%COMPILER%]==[cygwin] %WORKSPACE%\cygwin-setup.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --upgrade-also --root C:\cygwin64 --local-package-dir %WORKSPACE%\cygwin-downloads --packages gcc-g++,cmake,libopencv-devel,libncurses-devel
- ps: if($env:COMPILER -eq "cygwin") { Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2.tar.gz -OutFile $env:WORKSPACE\cmake-3.17.2.tar.gz }
- if [%COMPILER%]==[cygwin] %CYGSH% 'tar zxvf cmake-3.17.2.tar.gz'
- if [%COMPILER%]==[cygwin] cd %WORKSPACE%\cmake-3.17.2
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .'
- if [%COMPILER%]==[cygwin] %CYGSH% 'make -j8'
- if [%COMPILER%]==[cygwin] %CYGSH% 'make install'
- if [%COMPILER%]==[cygwin] cd %WORKSPACE%
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] cd %VCPKG_ROOT%
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] git checkout .
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] git pull
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] .\bootstrap-vcpkg.bat
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] echo set(VCPKG_BUILD_TYPE release) >> triplets\%VCPKG_DEFAULT_TRIPLET%.cmake
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] vcpkg upgrade --no-dry-run
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] if [%USE_CUDA%]==[yes] vcpkg install cuda --recurse
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] vcpkg install stb pthreads --recurse
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] vcpkg install ffmpeg --recurse
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] vcpkg install opencv[ffmpeg] --recurse ## opencv[ffmpeg,cuda] is too big to build, timing out (>1h). We use plain openCV also for CUDA builds (toolchain can manage this strange situation anyway)
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] rmdir "buildtrees" /S /Q
- cd %WORKSPACE%\darknet\
- if [%COMPILER%]==[cygwin] mkdir build_debug && cd build_debug
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Debug"'
- if [%COMPILER%]==[cygwin] cd ..
- mkdir build_release && cd build_release
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release"'
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] if [%configuration%]==[Release] cmake -G "Visual Studio 16 2019" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=%VCPKG_DEFAULT_TRIPLET%" -DCMAKE_BUILD_TYPE="Release" ..
- if [%COMPILER%]==[vs] if [%USE_INTEGRATED_LIBS%]==[yes] if [%FORCE_CPP%]==[yes] cmake -G "Visual Studio 16 2019" -T "host=x64" -A "x64" -DCMAKE_BUILD_TYPE="Release" "-DBUILD_AS_CPP:BOOL=TRUE" ..
- if [%COMPILER%]==[vs] if [%USE_INTEGRATED_LIBS%]==[yes] cmake -G "Visual Studio 16 2019" -T "host=x64" -A "x64" -DCMAKE_BUILD_TYPE="Release" ..
- cd ..
build_script:
- if [%COMPILER%]==[cygwin] cd build_debug && %CYGSH% 'cmake --build . --target install -- -j8' && cd ..
- if [%COMPILER%]==[cygwin] cd build_release && %CYGSH% 'cmake --build . --target install -- -j8' && cd ..
- if [%COMPILER%]==[vs] if [%configuration%]==[Release] cd build_release && cmake --build . --config Release --parallel 8 --target install && cd ..
artifacts:
- path: lib
- path: '*.exe'