-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
47 lines (37 loc) · 1.71 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
language: cpp
os: linux
dist: bionic
compiler:
- gcc
before_script:
# setup OpenCV
# OpenCV dependencies - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html
- sudo apt-get install -y build-essential
- sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
- sudo apt-get install -y libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev
- git clone https://github.com/opencv/opencv.git
- git clone https://github.com/opencv/opencv_contrib.git
- cd opencv
# Create a new 'build' folder.
- mkdir build
- cd build
# Set build instructions for Ubuntu distro, avoid building modules that are not needed for this project
- cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_EXAMPLES=OFF -DBUILD_opencv_gapi=OFF -DBUILD_opencv_flann=OFF -DBUILD_opencv_dnn=OFF -DBUILD_opencv_calib3d=OFF -DBUILD_opencv_video=OFF -DBUILD_opencv_videoio=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_opencv_java=OFF -D BUILD_opencv_python=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=/usr/local ..
# Run 'make' with four threads.
- make -j4
# Install to OS.
- sudo make install
# Add configuration to OpenCV to tell it where the library files are located on the file system (/usr/local/lib)
- sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
- sudo ldconfig
# run cmake; here we assume that the project's
# top-level CMakeLists.txt is located at '..'
- cd ../..
- mkdir build
- cd build
- cmake ..
script:
# once CMake has done its job we just build using make as usual
- make
# if the project uses ctest we can run the tests like this
# - make test