2019-02-25 16:38:25 +08:00
image : Visual Studio 2017
clone_folder : c:\projects\darknet
2019-04-10 22:29:58 +08:00
cache : C:\Tools\vcpkg\installed\
2019-02-25 16:38:25 +08:00
environment :
WORKSPACE : C:\projects
matrix :
2019-03-29 21:06:23 +08:00
- platform : Cygwin64
COMPILER : cygwin
CYGWIN_NOWINPATH : yes
CYGSH : C:\cygwin64\bin\bash -c
2019-02-25 16:38:25 +08:00
- platform : Win64
2019-02-28 22:57:03 +08:00
USE_CUDA : yes
2019-03-06 01:33:53 +08:00
COMPILER : vs
configuration : Release
2019-04-10 22:29:58 +08:00
VCPKG_ROOT : C:\Tools\vcpkg
2019-03-06 01:33:53 +08:00
VCPKG_DEFAULT_TRIPLET : x64-windows
- platform : Win64
2019-08-24 19:46:45 +08:00
USE_CUDA : no
2019-03-06 01:33:53 +08:00
COMPILER : vs
2019-08-24 19:46:45 +08:00
configuration : Release
2019-04-10 22:29:58 +08:00
VCPKG_ROOT : C:\Tools\vcpkg
2019-02-28 22:57:03 +08:00
VCPKG_DEFAULT_TRIPLET : x64-windows
2019-02-28 07:55:44 +08:00
- platform : Win64
COMPILER : vs
2019-03-06 01:33:53 +08:00
configuration : Release
2019-02-28 07:55:44 +08:00
USE_INTEGRATED_LIBS : yes
2019-07-23 21:59:02 +08:00
- platform : Win64
COMPILER : vs
configuration : Release
USE_INTEGRATED_LIBS : yes
FORCE_CPP : yes
2019-02-25 16:38:25 +08:00
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\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
2019-03-29 21:06:23 +08:00
- if [%COMPILER%]==[cygwin] SET "PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\cygwin64\usr\bin;%PATH%"
2019-02-25 16:38:25 +08:00
- if [%COMPILER%]==[cygwin] SET PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- git submodule -q update --init --recursive
- cd %WORKSPACE%\
2019-03-03 20:07:49 +08:00
- if [%USE_CUDA%]==[yes] 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] .\setup.exe -s nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 nvdisasm_10.1 nvprof_10.1 visual_profiler_10.1 visual_studio_integration_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1 occupancy_calculator_10.1 fortran_examples_10.1
- if [%USE_CUDA%]==[yes] set CUDA_PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v10.1
2019-03-04 17:22:13 +08:00
- if [%USE_CUDA%]==[yes] set CUDA_PATH_V10_1=%CUDA_PATH%
- if [%USE_CUDA%]==[yes] set CUDA_TOOLKIT_ROOT_DIR=%CUDA_PATH%
- if [%USE_CUDA%]==[yes] set PATH=%CUDA_PATH%\bin;%PATH%
2019-03-01 16:15:34 +08:00
- cd %WORKSPACE%\
2019-02-25 16:38:25 +08:00
- mkdir cygwin-downloads
- ps : if($env:COMPILER -eq "cygwin") { Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile $env:WORKSPACE\cygwin-setup.exe }
2019-03-29 23:11:42 +08:00
- 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
2019-03-29 21:06:23 +08:00
- ps : if($env:COMPILER -eq "cygwin") { Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0.tar.gz -OutFile $env:WORKSPACE\cmake-3.14.0.tar.gz }
- if [%COMPILER%]==[cygwin] %CYGSH% 'tar zxvf cmake-3.14.0.tar.gz'
- if [%COMPILER%]==[cygwin] cd %WORKSPACE%\cmake-3.14.0
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .'
- if [%COMPILER%]==[cygwin] %CYGSH% 'make -j8'
- if [%COMPILER%]==[cygwin] %CYGSH% 'make install'
- if [%COMPILER%]==[cygwin] cd %WORKSPACE%
2019-02-28 07:55:44 +08:00
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] cd %VCPKG_ROOT%
2019-04-10 22:29:58 +08:00
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] git pull
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] .\bootstrap-vcpkg.bat
2019-08-24 19:46:45 +08:00
- 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] 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)
2019-02-25 16:38:25 +08:00
- cd %WORKSPACE%\darknet\
2019-08-24 19:46:45 +08:00
- if [%COMPILER%]==[cygwin] mkdir build_debug && cd build_debug
2019-02-25 16:38:25 +08:00
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Debug"'
2019-08-24 19:46:45 +08:00
- if [%COMPILER%]==[cygwin] cd ..
2019-02-25 16:38:25 +08:00
- mkdir build_release && cd build_release
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release"'
2019-03-06 01:33:53 +08:00
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] if [%configuration%]==[Release] cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=%VCPKG_DEFAULT_TRIPLET%" -DCMAKE_BUILD_TYPE="Release" ..
2019-07-23 21:59:02 +08:00
- if [%COMPILER%]==[vs] if [%USE_INTEGRATED_LIBS%]==[yes] if [%FORCE_CPP%]==[yes] cmake -G "Visual Studio 15 2017" -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 15 2017" -T "host=x64" -A "x64" -DCMAKE_BUILD_TYPE="Release" ..
2019-02-25 16:38:25 +08:00
- cd ..
build_script :
2019-03-06 01:33:53 +08:00
- 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 ..
2019-03-04 02:57:40 +08:00
artifacts :
2019-03-06 01:33:53 +08:00
- path : lib
- path : '*.exe'