-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
59 lines (54 loc) · 1.87 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
sudo: required
language: cpp
os:
- linux
compiler:
- gcc
- clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- gcc-4.8
install:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
- sudo add-apt-repository ppa:george-edison55/precise-backports --yes
- sudo add-apt-repository ppa:amarburg/opencv3 --yes
- sudo apt-get update
- sudo apt-get install xorg-dev libglu1-mesa-dev libopencv3-dev libtbb-dev libeigen3-dev libglew1.6-dev cmake cmake-data
- mkdir -p $TRAVIS_BUILD_DIR/external
- cd $TRAVIS_BUILD_DIR/external
- wget https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip
- unzip glfw-3.1.2.zip
- cd glfw-3.1.2
- mkdir build
- cd build
- cmake .. -DBUILD_SHARED_LIBS=ON
- make
- sudo make install
- cd $TRAVIS_BUILD_DIR/external
- wget http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin
- chmod a+x android-ndk-r10e-linux-x86_64.bin
- ./android-ndk-r10e-linux-x86_64.bin > /dev/null
- wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-android/3.0.0/OpenCV-3.0.0-android-sdk-1.zip
- unzip -o OpenCV-3.0.0-android-sdk-1.zip > /dev/null
before_script:
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
- cd $TRAVIS_BUILD_DIR
- mkdir build
- cd build
- cmake .. -DBUILD_SHARED_LIBS=OFF
script:
- g++ --version
- gcc --version
- make
- make test ARGS="-V"
- cd $TRAVIS_BUILD_DIR
- mkdir android_build
- cd android_build
- export ANDROID_NDK_ROOT=$TRAVIS_BUILD_DIR/external/android-ndk-r10e
- cmake -DCMAKE_TOOLCHAIN_FILE=../external/android-cmake/android.toolchain.cmake -DANDROID_NDK=$ANDROID_NDK_ROOT -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a with NEON" -DBUILD_SHARED_LIBS=ON -DANDROID_NATIVE_API_LEVEL=9 ..
- make