darknet/.travis.yml

244 lines
10 KiB
YAML

language: cpp
cache:
timeout: 1000
directories:
- $HOME/vcpkg
- $HOME/.cache/vcpkg
matrix:
include:
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend)
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend) - opencv@2
osx_image: xcode12.3
env:
- OpenCV_DIR="/usr/local/opt/opencv@2/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR} -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv@2"
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend) - opencv@3
osx_image: xcode12.3
env:
- OpenCV_DIR="/usr/local/opt/opencv@3/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR} -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv@3"
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend) - opencv(latest)
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv"
- os: osx
compiler: clang
name: macOS - clang
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: osx
compiler: clang
name: macOS - clang - C++ mode
osx_image: xcode12.3
env:
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: osx
compiler: clang
name: macOS - clang - opencv@2
osx_image: xcode12.3
env:
- OpenCV_DIR="/usr/local/opt/opencv@2/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR} -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv@2"
- os: osx
compiler: clang
name: macOS - clang - opencv@3
osx_image: xcode12.3
env:
- OpenCV_DIR="/usr/local/opt/opencv@3/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR} -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv@3"
- os: osx
compiler: clang
name: macOS - clang - opencv(latest)
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv"
- os: osx
compiler: clang
name: macOS - clang - opencv(latest) - libomp
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv libomp"
- os: osx
name: macOS - clang - vcpkg
osx_image: xcode12.3
env:
- additional_defines="-DBUILD_SHARED_LIBS=OFF -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install yasm && unset CC && unset CXX"
- USE_VCPKG=true
- VCPKG_ROOT="$HOME/vcpkg"
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
- os: linux
compiler: clang
dist: bionic
name: ubuntu 18.04 - clang
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - g++
env:
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: linux
compiler: clang
dist: bionic
name: ubuntu 18.04 - clang - opencv@3
addons:
apt:
update: true
packages:
- libopencv-dev
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc - opencv@3
addons:
apt:
update: true
packages:
- libopencv-dev
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL=""
- os: linux
compiler: clang
dist: bionic
name: ubuntu 18.04 - clang - CUDA 10 - opencv@3
addons:
apt:
update: true
packages:
- libopencv-dev
env:
- additional_defines=""
- INSTALL_CUDA_VERSION="10.2"
- CUDACXX=/usr/local/cuda-${INSTALL_CUDA_VERSION}/bin/nvcc
- CUDA_PATH=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- LD_LIBRARY_PATH="/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64:/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs:${LD_LIBRARY_PATH}"
- MATRIX_EVAL="wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo apt-get -y update && sudo apt-get install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 cuda-curand-dev-10-2 && sudo apt-get install -y --no-install-recommends libcudnn7-dev && sudo ln -s /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so.1"
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc - CUDA 10 - opencv@3
addons:
apt:
update: true
packages:
- libopencv-dev
env:
- additional_defines=""
- INSTALL_CUDA_VERSION="10.2"
- CUDACXX=/usr/local/cuda-${INSTALL_CUDA_VERSION}/bin/nvcc
- CUDA_PATH=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- LD_LIBRARY_PATH="/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64:/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs:${LD_LIBRARY_PATH}"
- MATRIX_EVAL="wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo apt-get -y update && sudo apt-get install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 cuda-curand-dev-10-2 && sudo apt-get install -y --no-install-recommends libcudnn7-dev && sudo ln -s /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so.1"
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc - CUDA 10 - vcpkg
addons:
apt:
update: true
packages:
- yasm
env:
- additional_defines="-DBUILD_SHARED_LIBS=OFF"
- USE_VCPKG=true
- VCPKG_ROOT="$HOME/vcpkg"
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
- INSTALL_CUDA_VERSION="10.2"
- CUDACXX=/usr/local/cuda-${INSTALL_CUDA_VERSION}/bin/nvcc
- CUDA_PATH=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- LD_LIBRARY_PATH="/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64:/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs:${LD_LIBRARY_PATH}"
- MATRIX_EVAL="wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo apt-get -y update && sudo apt-get install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 cuda-curand-dev-10-2 && sudo apt-get install -y --no-install-recommends libcudnn7-dev && sudo ln -s /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so.1"
allow_failures:
- name: macOS - clang - vcpkg
before_install:
- travis_retry eval "${MATRIX_EVAL}"
install:
# CMake upgrade on Linux
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then tar -xzf cmake-3.19.2-Linux-x86_64.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then export PATH=$PWD/cmake-3.19.2-Linux-x86_64/bin:$PATH ; fi
- pushd $HOME
- if [ -d "$HOME/vcpkg/.git" ] ; then echo vcpkg cached ; else rm -rf vcpkg ; git clone https://github.com/Microsoft/vcpkg ; fi
- cd vcpkg
- git checkout .
- git pull
- if [ "${USE_VCPKG}" = true ] ; then ./bootstrap-vcpkg.sh ; fi
- if [ "${USE_VCPKG}" = true ] ; then echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-osx.cmake ; fi
- if [ "${USE_VCPKG}" = true ] ; then echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-linux.cmake ; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf buildtrees; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf installed; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf packages; fi
- popd
before_script:
- mkdir build_release
- cd build_release
- travis_wait 50 cmake .. -DCMAKE_BUILD_TYPE="Release" ${additional_defines}
- cd ..
script:
- cd build_release && cmake --build . --target install -- -j8 && cd ..