forked from mavlink/MAVSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (110 loc) · 3.34 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
language: cpp
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- BUILD_TARGET=gcc_build
addons:
apt:
packages:
- libtinyxml2-dev
- os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- BUILD_TARGET=gcc_build
- CC=gcc-5
- CXX=g++-5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- libtinyxml2-dev
- os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- BUILD_TARGET=coverage_build
- CC=gcc-6
- CXX=g++-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- libtinyxml2-dev
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=docker_build
- os: osx
osx_image: xcode8
env:
- BUILD_TARGET=osx_build
addons:
apt:
packages:
- libcurl4-openssl-dev
before_install:
- if [[ "${BUILD_TARGET}" = "coverage_build" ]]; then
pip install --user cpp-coveralls;
fi
install:
- set -e
- if [[ "${BUILD_TARGET}" = "docker_build" ]]; then
docker pull dronecore/dronecore;
fi
script:
- if [[ "${BUILD_TARGET}" = "gcc_build" ]]; then
make BUILD_TYPE=Debug run_unit_tests -j4;
make clean;
make 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" ]]; then
docker run -it --rm -v $TRAVIS_BUILD_DIR:/home/docker1000/src/DroneCore:rw dronecore/dronecore ./travis-docker-build.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="curl-android-ios"
--exclude="debug_helpers" --exclude="example" --exclude="external_example"
--exclude-pattern=".*CMakeFiles.*" --exclude-pattern=".*_test.*";
fi
before_deploy:
- export RELEASE_PKG_FILE=$(ls *.deb)
- echo "Deploying $RELEASE_PKG_FILE to GitHub releases"
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: hBX3pFWNZiDbz4yKnOjhLg3QS9Ubn1XePxSeIt2Btq5GzbomOPDCgpIFijBppliwj9oKc302EMnZSg2QWeAzFKn9UnmIflJ0E4iymYgwWdTJv+bSnYALJEmO8F6gF9FgRlPk8FCtZiECoTsa75w5TrEZKZpFpmzVYRiDu0eo6sEjW7UJPC0A2KSTXLrBCHSIZy/iasbGmuur4brG7NO0QdMOvDXvhsYfkXDRJFMTtTHvLiKJcqiunPfqARzf1H4x4iczRYscKu5Vn8Kmw3NANGkcIDvEj4ooih831EXxACRZw0VgycgNHOKRXKC9pZ4hLQMon+jxpQX+X8k/K5161oEkF/gCVKyFb31Pk/4Uwe81p1GJY2lAC7MDUxA98RKXhdvVYF2Cp44+IbF0YVoWRUtVAhknXRQ3Weg25kyVSu83q2nN2nZq2qGTnpNIbdN56s/F+uaFtipGEh+vmiv8rNUz+Z5MFrY2FQaSvBTFw9K4tNs9uc+VQd1bE7X5wh0yywEqUEw2nzqTB2xR+OubygUASbk2GLNdc254P0lrzCHbNM62Y7sRX06CM7hPlwhELEkVtUXZWJ0KuhQyLvRh3aPJ3Jj30EswTt/FGT1gzSP1FjjHBRZCK4P2D2rwJ5TMn2JrZKfPxmEd3kVmn6h80+gBbKgonGmZspd2SvPEI5g=
file:
- ${RELEASE_PKG_FILE}
condition: ${BUILD_TARGET} = docker_build
on:
repo: dronecore/DroneCore
tags: true