2019-02-25 16:38:25 +08:00
language : cpp
2019-04-19 00:03:35 +08:00
cache :
timeout : 1000
directories :
- $HOME/vcpkg
2019-02-25 16:38:25 +08:00
matrix :
include :
2019-04-09 15:06:58 +08:00
- os : osx
compiler : gcc
2019-07-30 22:01:12 +08:00
name : macOS - gcc (llvm backend)
2019-04-09 15:06:58 +08:00
env :
- additional_defines=""
- MATRIX_EVAL=""
2019-02-25 16:38:25 +08:00
- os : osx
compiler : gcc
2019-07-30 22:01:12 +08:00
name : macOS - gcc (llvm backend) - opencv@2
2019-02-25 16:38:25 +08:00
env :
2019-04-23 21:29:53 +08:00
- OpenCV_DIR="/usr/local/opt/opencv@2/"
2019-04-09 15:06:58 +08:00
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@2"
2019-02-25 16:38:25 +08:00
- os : osx
compiler : gcc
2019-07-30 22:01:12 +08:00
name : macOS - gcc (llvm backend) - opencv@3
2019-02-25 16:38:25 +08:00
env :
2019-04-23 21:29:53 +08:00
- OpenCV_DIR="/usr/local/opt/opencv@3/"
2019-04-09 15:06:58 +08:00
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@3"
- os : osx
compiler : gcc
2019-07-30 22:01:12 +08:00
name : macOS - gcc (llvm backend) - opencv(latest)
2019-04-09 15:06:58 +08:00
env :
- additional_defines=""
- MATRIX_EVAL="brew install opencv"
- os : osx
compiler : clang
2019-07-30 22:01:12 +08:00
name : macOS - clang
2019-04-09 15:06:58 +08:00
env :
- additional_defines=""
- MATRIX_EVAL=""
2019-02-25 16:38:25 +08:00
2019-07-23 21:59:02 +08:00
- os : osx
compiler : clang
2019-07-30 22:01:12 +08:00
name : macOS - clang - C++ mode
2019-07-23 21:59:02 +08:00
env :
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE"
- MATRIX_EVAL=""
2019-02-25 16:38:25 +08:00
- os : osx
compiler : clang
2019-07-30 22:01:12 +08:00
name : macOS - clang - opencv@2
2019-02-25 16:38:25 +08:00
env :
2019-04-23 21:29:53 +08:00
- OpenCV_DIR="/usr/local/opt/opencv@2/"
2019-04-09 15:06:58 +08:00
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@2"
2019-02-25 16:38:25 +08:00
- os : osx
compiler : clang
2019-07-30 22:01:12 +08:00
name : macOS - clang - opencv@3
2019-02-25 16:38:25 +08:00
env :
2019-04-23 21:29:53 +08:00
- OpenCV_DIR="/usr/local/opt/opencv@3/"
2019-04-09 15:06:58 +08:00
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@3"
- os : osx
compiler : clang
2019-07-30 22:01:12 +08:00
name : macOS - clang - opencv(latest)
2019-04-09 15:06:58 +08:00
env :
- additional_defines=""
- MATRIX_EVAL="brew install opencv"
2019-02-25 16:38:25 +08:00
2020-04-28 00:11:19 +08:00
- os : osx
compiler : clang
name : macOS - clang - opencv(latest) - libomp
env :
- additional_defines=""
- MATRIX_EVAL="brew install opencv libomp"
- os : osx
name : macOS - clang - vcpkg
osx_image : xcode11.4
env :
- additional_defines="-DBUILD_SHARED_LIBS=OFF"
- MATRIX_EVAL="brew install yasm && unset CC && unset CXX"
- USE_VCPKG=true
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
2019-02-25 16:38:25 +08:00
- os : linux
compiler : clang
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - clang
2019-04-10 22:29:58 +08:00
env :
- additional_defines=""
- MATRIX_EVAL=""
- os : linux
compiler : gcc
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - gcc
2019-04-10 22:29:58 +08:00
env :
- additional_defines=""
- MATRIX_EVAL=""
- os : linux
compiler : gcc
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - g++
2019-04-10 22:29:58 +08:00
env :
2019-07-30 22:01:12 +08:00
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE"
- MATRIX_EVAL=""
2019-04-10 22:29:58 +08:00
- os : linux
compiler : gcc
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - gcc - vcpkg
2019-08-24 19:46:45 +08:00
addons :
apt :
update : true
packages :
- yasm
2019-04-10 22:29:58 +08:00
env :
2019-08-24 19:46:45 +08:00
- additional_defines="-DBUILD_SHARED_LIBS=OFF"
2019-07-30 22:01:12 +08:00
- USE_VCPKG=true
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
2019-07-30 23:39:18 +08:00
- MATRIX_EVAL=""
2019-04-10 22:29:58 +08:00
2019-02-27 04:21:34 +08:00
- os : linux
compiler : clang
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - clang - opencv@3
2019-02-27 04:21:34 +08:00
addons :
apt :
update : true
packages :
- libopencv-dev
env :
2019-04-09 15:06:58 +08:00
- additional_defines=""
2019-07-30 22:01:12 +08:00
- MATRIX_EVAL=""
2019-02-27 04:21:34 +08:00
- os : linux
2019-07-30 22:01:12 +08:00
compiler : gcc
dist : bionic
name : ubuntu 18.04 - gcc - opencv@3
2019-02-27 04:21:34 +08:00
addons :
apt :
update : true
packages :
- libopencv-dev
env :
2019-04-09 15:06:58 +08:00
- additional_defines=""
2019-07-30 22:01:12 +08:00
- MATRIX_EVAL=""
2019-02-27 04:21:34 +08:00
- os : linux
compiler : clang
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - clang - CUDA 10 - opencv@3
2019-02-27 04:21:34 +08:00
addons :
apt :
update : true
packages :
- libopencv-dev
env :
2019-04-09 15:06:58 +08:00
- additional_defines=""
2020-04-30 01:16:05 +08:00
- 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"
2019-02-27 04:21:34 +08:00
- os : linux
compiler : gcc
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - gcc - CUDA 10 - opencv@3
2019-02-27 04:21:34 +08:00
addons :
apt :
update : true
packages :
- libopencv-dev
env :
2019-04-09 15:06:58 +08:00
- additional_defines=""
2020-04-30 01:16:05 +08:00
- 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"
2019-02-27 04:21:34 +08:00
2019-04-19 00:03:35 +08:00
- os : linux
compiler : gcc
2019-07-30 22:01:12 +08:00
dist : bionic
name : ubuntu 18.04 - gcc - CUDA 10 - vcpkg
2019-08-24 19:46:45 +08:00
addons :
apt :
update : true
packages :
- yasm
2019-04-19 00:03:35 +08:00
env :
2019-08-24 19:46:45 +08:00
- additional_defines="-DBUILD_SHARED_LIBS=OFF"
2019-04-19 00:03:35 +08:00
- USE_VCPKG=true
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
2020-04-30 01:16:05 +08:00
- 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"
2019-04-30 17:10:52 +08:00
2020-04-28 00:11:19 +08:00
allow_failures :
- name : macOS - clang - vcpkg
2019-04-19 00:03:35 +08:00
2019-02-25 16:38:25 +08:00
before_install :
2019-02-26 14:30:40 +08:00
- travis_retry eval "${MATRIX_EVAL}"
2019-02-25 16:38:25 +08:00
2019-02-27 04:21:34 +08:00
install :
# CMake upgrade on Linux
2020-04-30 01:16:05 +08:00
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-Linux-x86_64.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then tar -xzf cmake-3.17.2-Linux-x86_64.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then export PATH=$PWD/cmake-3.17.2-Linux-x86_64/bin:$PATH ; fi
2019-04-19 00:03:35 +08:00
- 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
2019-11-25 01:09:00 +08:00
- git checkout .
2019-04-19 00:03:35 +08:00
- git pull
2019-04-23 21:29:53 +08:00
- if [ "${USE_VCPKG}" = true ] ; then ./bootstrap-vcpkg.sh ; fi
2019-08-24 19:46:45 +08:00
- 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
2020-04-28 00:11:19 +08:00
- if [ "${USE_VCPKG}" = true ] ; then travis_wait 45 ./vcpkg upgrade --no-dry-run; fi
2019-08-24 19:46:45 +08:00
- if [ "${USE_VCPKG}" = true ] ; then travis_wait ./vcpkg install stb pthreads --recurse; fi
- if [ "${USE_VCPKG}" = true ] ; then travis_wait 45 ./vcpkg install ffmpeg --recurse; fi
2019-05-01 01:25:47 +08:00
#- if [ "${USE_VCPKG}" = true ] && [[ ! -z "${CUDACXX}" ]] ; then travis_wait 45 ./vcpkg install opencv[ffmpeg,cuda] --recurse; fi
#- if [ "${USE_VCPKG}" = true ] && [[ -z "${CUDACXX}" ]] ; then travis_wait 45 ./vcpkg install opencv[ffmpeg] --recurse; fi
2019-08-24 19:46:45 +08:00
- if [ "${USE_VCPKG}" = true ] ; then travis_wait 45 ./vcpkg install opencv[ffmpeg] --recurse; fi
2019-11-25 01:09:00 +08:00
- if [ "${USE_VCPKG}" = true ] ; then rm -rf buildtrees; fi
2019-04-19 00:03:35 +08:00
- popd
2019-02-27 04:21:34 +08:00
2019-02-25 16:38:25 +08:00
before_script :
- mkdir build_release
- cd build_release
2019-04-19 00:03:35 +08:00
- cmake .. -DCMAKE_BUILD_TYPE="Release" ${VCPKG_DEFINES} ${additional_defines}
2019-02-25 16:38:25 +08:00
- cd ..
script :
2019-03-04 22:15:19 +08:00
- cd build_release && cmake --build . --target install -- -j8 && cd ..