-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
74 lines (59 loc) · 2.36 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
language:
- cpp
dist: trusty
compiler:
- g++
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++
env:
- MATRIX_EVAL="CC=gcc && CXX=g++"
before_install:
- eval "${MATRIX_EVAL}"
- sudo apt-get update
- sudo apt-get update -qq
install:
# OpenCV v3.0.0 install code (modified from orignal source: https://github.com/jayrambhia/Install-OpenCV)
# OpenCV dependencies - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html
- sudo apt-get install -y --allow-unauthenticated build-essential
- sudo apt-get install -y --allow-unauthenticated cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
- sudo apt-get install -y --allow-unauthenticated python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
# Download v3.0.0 .zip file and extract.
- curl -sL https://github.com/Itseez/opencv/archive/4.3.0.zip > opencv.zip
- unzip opencv.zip
- cd opencv-4.3.0
# Create a new 'build' folder.
- mkdir build
- cd build
# Set build instructions for Ubuntu distro.
- cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON \
-D WITH_V4L=ON \
-D BUILD_JAVA=OFF -D BUILD_opencv_java_bindings_generator=OFF -D BUILD_opencv_js=OFF\
-D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF \
-D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF \
-D WITH_QT=OFF \
-D WITH_OPENGL=OFF \
-D BUILD_opencv_apps=OFF \
-D BUILD_opencv_python3=OFF -D BUILD_opencv_python_tests=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_NEW_PYTHON_SUPPORT=OFF -D BUILD_opencv_python_bindings_generator=OFF \
-D CPU_BASELINE=AVX2 -D CPU_DISPATCH=AVX2 ..
# 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
- echo "OpenCV installed."
# We need to return to the repo "root" folder, so we can then 'cd' into the C++ project folder.
- cd ../../
script:
- cmake .
- make -j4