-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
98 lines (93 loc) · 2.75 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
language: generic
dist: bionic
sudo: required
# Run Travis CI only on the master branch
branches:
only:
- master
matrix:
include:
# g++-9 and gcc-9
- env: CXX=g++-9 CC=gcc-9
addons:
apt:
update: true
packages:
- g++-9
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
# g++-10 and gcc-10
- env: CXX=g++-10 CC=gcc-10
addons:
apt:
update: true
packages:
- g++-10
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
# clang++-9 and clang-9
- env: CXX=clang++-9 CC=clang-9
addons:
apt:
update: true
packages:
- clang-9
- libc++-9-dev
- libc++abi-9-dev
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# clang++-10 and clang-10
- env: CXX=clang++-10 CC=clang-10
addons:
apt:
update: true
packages:
- clang-10
- libc++-10-dev
- libc++abi-10-dev
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# clang++-11 and clang-11
- env: CXX=clang++-11 CC=clang-11
addons:
apt:
update: true
packages:
- clang-11
- libc++-11-dev
- libc++abi-11-dev
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
before_install:
- sudo apt update
- sudo apt install qt5-default
# Manually install newer version of CMake
- mkdir -p cmake
- travis_retry wget "https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.tar.gz"
- tar xf cmake-3.14.5-Linux-x86_64.tar.gz -C cmake --strip-components=1
- export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH}
install:
- if [[ "$CXX" == clang* ]]; then export CXXFLAGS="-stdlib=libc++"; fi
# Check versions of C++ compilers and CMake
- echo ${CXX}
- echo ${CC}
- ${CXX} --version
- ${CC} --version
- cmake --version
# Obtain OpenCV 3.4.2 from source
- wget https://github.com/opencv/opencv/archive/3.4.2.zip -O opencv-3.4.2.zip
- unzip opencv-3.4.2.zip && rm opencv-3.4.2.zip
- cd opencv-3.4.2 && mkdir build && cd build
# Build OpenCV
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
- make -j$(nproc)
- sudo make install
- cd ../../
script:
- mkdir -p build && cd build
- cmake ..
- make -j$(nproc) all
- make test