forked from mavlink/MAVSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
161 lines (155 loc) · 6.2 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
language: cpp
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
sudo: true
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TARGET=gcc_build"
addons:
apt:
packages:
- libtinyxml2-dev
- libcurl4-openssl-dev
- os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TARGET=gcc_build && CC=gcc-5 && CXX=g++-5"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- libtinyxml2-dev
- libcurl4-openssl-dev
- os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TARGET=coverage_build && CC=gcc-6 && CXX=g++-6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- libtinyxml2-dev
- libcurl4-openssl-dev
- os: linux
sudo: true
services:
- docker
env:
- MATRIX_EVAL="BUILD_TARGET=docker_build_ubuntu_16.04"
- os: linux
sudo: true
services:
- docker
env:
- MATRIX_EVAL="BUILD_TARGET=docker_build_ubuntu_18.04"
- os: linux
sudo: true
services:
- docker
env:
- MATRIX_EVAL="BUILD_TARGET=docker_build_fedora_28"
- os: linux
sudo: true
services:
- docker
env:
- MATRIX_EVAL="BUILD_TARGET=docker_build_fedora_29"
- os: osx
osx_image: xcode9.3
env:
- BUILD_TARGET=osx_build
before_install:
- eval "${MATRIX_EVAL}"
install:
- set -e
- if [[ "${BUILD_TARGET}" = "docker_build_ubuntu_16.04" ]]; then
docker pull dronecode/dronecode-sdk-ubuntu-16.04;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_ubuntu_18.04" ]]; then
docker pull dronecode/dronecode-sdk-ubuntu-18.04;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_fedora_28" ]]; then
docker pull dronecode/dronecode-sdk-fedora-28;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_fedora_29" ]]; then
docker pull dronecode/dronecode-sdk-fedora-29;
fi
- if [[ "${BUILD_TARGET}" = "coverage_build" ]]; then
pip install --user cpp-coveralls;
fi
script:
- set -e
- if [[ "${BUILD_TARGET}" = "gcc_build" ]]; then
make BUILD_TYPE=Debug run_unit_tests -j4;
make clean;
make INSTALL_PREFIX=/usr BUILD_TYPE=Release run_unit_tests -j4;
fi
- if [[ "${BUILD_TARGET}" = "coverage_build" ]]; then
make BUILD_TYPE=Coverage run_unit_tests -j4;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_ubuntu_16.04" ]]; then
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-ubuntu-16.04 ./travis-docker-build.sh;
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-ubuntu-16.04 ./create_packages.sh;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_ubuntu_18.04" ]]; then
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-ubuntu-18.04 ./travis-docker-build.sh;
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-ubuntu-18.04 ./create_packages.sh;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_fedora_28" ]]; then
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-fedora-28 ./travis-docker-build.sh;
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-fedora-28 ./create_packages.sh;
fi
- if [[ "${BUILD_TARGET}" = "docker_build_fedora_29" ]]; then
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-fedora-29 ./travis-docker-build.sh;
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/user/DronecodeSDK:rw -e LOCAL_USER_ID=`id -u` dronecode/dronecode-sdk-fedora-29 ./create_packages.sh;
fi
- if [[ "${BUILD_TARGET}" = "osx_build" ]]; then
make;
make default install;
make run_unit_tests;
make clean;
make BUILD_TYPE=Release;
make default install;
make run_unit_tests;
fi
after_success:
- if [[ "${BUILD_TARGET}" = "coverage_build" ]]; then
coveralls --root . --build-root build/default
--exclude=libs --exclude="plugins"
--exclude="/usr/include/"
--exclude="core/external/curl-android-ios"
--exclude="core/libs/tinyxml2"
--exclude="debug_helpers"
--exclude="example"
--exclude="external_example"
--exclude-pattern=".*CMakeFiles.*"
--exclude-pattern=".*_test.*";
fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: hBX3pFWNZiDbz4yKnOjhLg3QS9Ubn1XePxSeIt2Btq5GzbomOPDCgpIFijBppliwj9oKc302EMnZSg2QWeAzFKn9UnmIflJ0E4iymYgwWdTJv+bSnYALJEmO8F6gF9FgRlPk8FCtZiECoTsa75w5TrEZKZpFpmzVYRiDu0eo6sEjW7UJPC0A2KSTXLrBCHSIZy/iasbGmuur4brG7NO0QdMOvDX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