forked from AlexeyAB/darknet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
249 lines (223 loc) · 10.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
language: cpp
cache:
timeout: 1000
directories:
- $HOME/vcpkg
matrix:
include:
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend)
env:
- additional_defines=""
- MATRIX_EVAL=""
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend) - opencv@2
env:
- OpenCV_DIR="/usr/local/opt/opencv@2/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@2"
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend) - opencv@3
env:
- OpenCV_DIR="/usr/local/opt/opencv@3/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@3"
- os: osx
compiler: gcc
name: macOS - gcc (llvm backend) - opencv(latest)
env:
- additional_defines=""
- MATRIX_EVAL="brew install opencv"
- os: osx
compiler: clang
name: macOS - clang
env:
- additional_defines=""
- MATRIX_EVAL=""
- os: osx
compiler: clang
name: macOS - clang - C++ mode
env:
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE"
- MATRIX_EVAL=""
- os: osx
compiler: clang
name: macOS - clang - opencv@2
env:
- OpenCV_DIR="/usr/local/opt/opencv@2/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@2"
- os: osx
compiler: clang
name: macOS - clang - opencv@3
env:
- OpenCV_DIR="/usr/local/opt/opencv@3/"
- additional_defines="-DOpenCV_DIR=${OpenCV_DIR}"
- MATRIX_EVAL="brew install opencv@3"
- os: osx
compiler: clang
name: macOS - clang - opencv(latest)
env:
- additional_defines=""
- MATRIX_EVAL="brew install opencv"
- 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"
- os: linux
compiler: clang
dist: bionic
name: ubuntu 18.04 - clang
env:
- additional_defines=""
- MATRIX_EVAL=""
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc
env:
- additional_defines=""
- MATRIX_EVAL=""
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - g++
env:
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE"
- MATRIX_EVAL=""
- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc - vcpkg
addons:
apt:
update: true
packages:
- yasm
env:
- additional_defines="-DBUILD_SHARED_LIBS=OFF"
- USE_VCPKG=true
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
- 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=""
- 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=""
- 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_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.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
- 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 travis_wait 45 ./vcpkg upgrade --no-dry-run; fi
- 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
#- 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
- if [ "${USE_VCPKG}" = true ] ; then travis_wait 45 ./vcpkg install opencv[ffmpeg] --recurse; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf buildtrees; fi
- popd
before_script:
- mkdir build_release
- cd build_release
- cmake .. -DCMAKE_BUILD_TYPE="Release" ${VCPKG_DEFINES} ${additional_defines}
- cd ..
script:
- cd build_release && cmake --build . --target install -- -j8 && cd ..