forked from bluerobotics/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
251 lines (222 loc) · 11.5 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# if you update this file, please consider updating Vagrantfile too
language: cpp
env:
global:
- CCACHE_CPP2=1
- CCACHE_DISABLE=1
- JOBS=4
- QT_FATAL_WARNINGS=1
- SHADOW_BUILD_DIR=/tmp/shadow_build_dir
# ANDROID_STOREPASS
- secure: RGovyUnMw3fp/bHZi058JvANT1rYmNqrsuSYew0cIgirO6YbMHr/rsjwCm1FTYpBl8s1zgr+u2b8ftYnfnCz2YT+Aip4NWrVYpVU0FEmfytGILrnUS0pjlt8m7fU9AKR1ElOSll7yw7e1kftynN39Q321etvwbLZcXon6zz0suE=
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
env: SPEC=linux-g++-64 CONFIG=installer
sudo: required
- os: linux
dist: trusty
env: SPEC=linux-g++-64 CONFIG=debug
sudo: required
# OSX builds pared back to installer only since travis sucks so bad we can't afford more than one'
# - os: osx
# osx_image: xcode8
# env: SPEC=macx-clang CONFIG=debug
# sudo: required
# - os: osx
# osx_image: xcode8
# env: SPEC=macx-ios-clang CONFIG=release
# sudo: false
android:
components:
- android-21
- build-tools-21.1.1
- platform-tools
addons:
apt:
packages:
- ccache
- espeak
- libespeak-dev
- libgstreamer-plugins-base1.0-dev
- libgstreamer1.0-0:amd64
- libgstreamer1.0-dev
- libsdl2-dev
- libudev-dev
- wget
cache:
directories:
- $HOME/.ccache
before_install:
# fetch entire git repo to properly determine the version
- if [ "${CONFIG}" = "installer" ]; then
cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags;
fi
# install ccache for osx/ios
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache &&
chmod +x ccache && sudo mv ccache /usr/local/bin;
fi
# setup ccache
#- ccache -M 500MB && ccache -z
# compile threads
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
export JOBS=$((`cat /proc/cpuinfo | grep -c ^processor`+1));
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
export JOBS=$((`sysctl -n hw.ncpu`+1));
fi
install:
# linux dependencies: qt
- if [ "${SPEC}" = "linux-g++-64" ]; then
wget https://s3.amazonaws.com/downloads.bluerobotics.com/QGC/dependencies/Qt5.7.1-linux-min.tar.bz2 &&
tar jxf Qt5.7.1-linux-min.tar.bz2 -C /tmp &&
export PATH=/tmp/Qt5.7-linux/5.7/gcc_64/bin:$PATH &&
export DISPLAY=:99.0 &&
sh -e /etc/init.d/xvfb start
;
fi
# android dependencies: qt, gstreamer, android-ndk
- if [ "${SPEC}" = "android-g++" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.7.1-android-min.tar.bz2 &&
tar jxf Qt5.7.1-android-min.tar.bz2 -C /tmp &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-android-armv7-1.5.2.tar.bz2 &&
mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.5.2 &&
tar jxf gstreamer-1.0-android-armv7-1.5.2.tar.bz2 -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.5.2 &&
wget http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin &&
chmod +x android-ndk-r10e-linux-x86_64.bin &&
./android-ndk-r10e-linux-x86_64.bin > /dev/null &&
export ANDROID_NDK_ROOT=`pwd`/android-ndk-r10e &&
export ANDROID_SDK_ROOT=/usr/local/android-sdk &&
export PATH=/tmp/Qt5.7-android/5.7/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH && echo $PATH
;
fi
# osx dependencies: qt, gstreamer, gstreamer-devel
- if [ "${SPEC}" = "macx-clang" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.7.1-mac-clang-min.tar.bz2 &&
tar jxf Qt5.7.1-mac-clang-min.tar.bz2 -C /tmp &&
wget https://gstreamer.freedesktop.org/data/pkg/osx/1.14.0/gstreamer-1.0-1.14.0-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-1.14.0-x86_64.pkg -target / &&
wget https://gstreamer.freedesktop.org/data/pkg/osx/1.14.0/gstreamer-1.0-devel-1.14.0-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-devel-1.14.0-x86_64.pkg -target / &&
export QT_DIR=Qt5.7-mac-clang/5.7/clang_64 &&
export QT_QPA_PLATFORM_PLUGIN_PATH=/tmp/$QT_DIR/plugins &&
export QML2_IMPORT_PATH=/tmp/$QT_DIR/qml &&
export PATH=/tmp/$QT_DIR/bin:$PATH
;
fi
# ios dependencies: qt, TODO: add gstreamer
- if [ "${SPEC}" = "macx-ios-clang" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-ios-min.tar.bz2 &&
tar jxf Qt5.8.0-ios-min.tar.bz2 -C /tmp &&
export IOS_CCACHE_CC=`/usr/bin/xcrun -sdk iphoneos -find clang` &&
export IOS_CCACHE_CXX=`/usr/bin/xcrun -sdk iphoneos -find clang++` &&
export PATH=/tmp/Qt5.8-ios/5.8/ios/bin:$PATH &&
tools/patch_qt_for_xcode8.sh
;
fi
before_script:
- cd ${TRAVIS_BUILD_DIR}
# grab latest PX4 parameter and airframe metadata
- wget http://px4-travis.s3.amazonaws.com/Firmware/master/parameters.xml -O src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
- wget http://px4-travis.s3.amazonaws.com/Firmware/master/airframes.xml -O src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
# switch android config from installer to release if the android storepass isn't available
- if [[ "${SPEC}" = "android-g++" && "${CONFIG}" = "installer" && -z ${ANDROID_STOREPASS} ]]; then
export CONFIG=release;
fi
# insert QGC version in AndroidManifest.xml
- if [ "${SPEC}" = "android-g++" ]; then
git remote set-branches origin 'master' &&
git fetch origin master &&
./tools/update_android_version.sh;
fi
script:
# run qmake
- mkdir ${SHADOW_BUILD_DIR} && cd ${SHADOW_BUILD_DIR}
- qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC}
# compile
- if [ "${SPEC}" != "macx-ios-clang" ]; then
make -j$JOBS;
else
xcodebuild -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=$JOBS -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c && $(exit ${PIPESTATUS[0]});
fi
#- ccache -s
# unit tests linux
- if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "debug" ]]; then
mkdir -p ~/.config/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
./debug/qgroundcontrol-start.sh --unittest;
fi
after_success:
- cd ${TRAVIS_BUILD_DIR}
# master development builds to beta track
# tagged releases first to beta track then manually move to production
- GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrolbeta
- if [ "${TRAVIS_TAG}" ]; then
GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrol;
fi
- if [[ "${SPEC}" = "android-g++" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
pip install --user google-api-python-client PyOpenSSL &&
openssl aes-256-cbc -K $encrypted_25db6eb7c3fd_key -iv $encrypted_25db6eb7c3fd_iv -in android/Google_Play_Android_Developer-4432a3c4f5d1.json.enc -out android/Google_Play_Android_Developer-4432a3c4f5d1.json -d &&
./tools/google_play_upload.py production ${GOOGLE_PLAY_PKG} ${SHADOW_BUILD_DIR}/release/package/QGroundControl.apk;
fi
before_deploy:
# create linux appimage
- cd ${TRAVIS_BUILD_DIR}
- if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "installer" ]]; then
./deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/release ${SHADOW_BUILD_DIR}/release/package;
fi
deploy:
# deploy installers to s3 builds/ if on a branch
- provider: s3
access_key_id: AKIAI42TETMLX6KJRTRA
secret_access_key:
secure: LTFfh+WjeRguNe6b7R+Htuf+9GULyorBDUcV2mKkvEXrdytcQgDRFPtS32ubl/pjfOrKgKNwg173M3iFEG1cFKZklYnH4OlMYFH2VWxoTgrUfsxBy8JVtEObysl2mVV0QrLvVvvd9/oeaz2HNCrVHxynaM3nt5t4uIqeiZBxbYrrAOrKRNsBhrulixRs+9gHknxsQr1feQlyVnsdKURJaWSjw0lhKo9cPcsdsq6kCOpO81ZX4DLwK6i+NCu7V5J31UAcWvcXhv/fg+UKzMxgecog/pHZjqXx9kcqNQkoEstGJeTtzYf3YpzLBFApWxF64M9dVR+qVjE5MOS4RzdPrsLW1awIcCowOKBkkXYqJ7/69rB7lWwFugHM6r9D7wz2IXG9qayq9PGhX6PJNF/FNc+dmkagPkHGchQnYCZZ5TTf/T3Af0iAH9HwkNXDG1NDRldrk2EbBEUWA/ryJDmUgPj6tmSvkbXgRKmEaIUk6uFovyBBMQbocVLmTIppvb8KNK9IxXDE01rsDqn0BmlPuqatqzGAG3McpFegKITOKhfqKgayMRNsv9eoU6ioL146y4m/C+DGwLfTHY/G1yD97/FKqo+LkMutLr7VzVNLmmjvsIdTg5sAZzdHkwdu3x97Uj1XddOSajDogDgwwvuiEWstwP2vB8rqtud+f9hymFc=
bucket: downloads.bluerobotics.com
local_dir: ${SHADOW_BUILD_DIR}/release/package
upload-dir: QGC/builds/${TRAVIS_BRANCH}
acl: public_read
region: us-east-1
skip_cleanup: true
on:
all_branches: true
condition: $CONFIG = installer
# deploy tagged installers to s3 latest/
- provider: s3
access_key_id: AKIAI42TETMLX6KJRTRA
secret_access_key:
secure: LTFfh+WjeRguNe6b7R+Htuf+9GULyorBDUcV2mKkvEXrdytcQgDRFPtS32ubl/pjfOrKgKNwg173M3iFEG1cFKZklYnH4OlMYFH2VWxoTgrUfsxBy8JVtEObysl2mVV0QrLvVvvd9/oeaz2HNCrVHxynaM3nt5t4uIqeiZBxbYrrAOrKRNsBhrulixRs+9gHknxsQr1feQlyVnsdKURJaWSjw0lhKo9cPcsdsq6kCOpO81ZX4DLwK6i+NCu7V5J31UAcWvcXhv/fg+UKzMxgecog/pHZjqXx9kcqNQkoEstGJeTtzYf3YpzLBFApWxF64M9dVR+qVjE5MOS4RzdPrsLW1awIcCowOKBkkXYqJ7/69rB7lWwFugHM6r9D7wz2IXG9qayq9PGhX6PJNF/FNc+dmkagPkHGchQnYCZZ5TTf/T3Af0iAH9HwkNXDG1NDRldrk2EbBEUWA/ryJDmUgPj6tmSvkbXgRKmEaIUk6uFovyBBMQbocVLmTIppvb8KNK9IxXDE01rsDqn0BmlPuqatqzGAG3McpFegKITOKhfqKgayMRNsv9eoU6ioL146y4m/C+DGwLfTHY/G1yD97/FKqo+LkMutLr7VzVNLmmjvsIdTg5sAZzdHkwdu3x97Uj1XddOSajDogDgwwvuiEWstwP2vB8rqtud+f9hymFc=
bucket: downloads.bluerobotics.com
local_dir: ${SHADOW_BUILD_DIR}/release/package
upload-dir: QGC/latest
acl: public_read
region: us-east-1
skip_cleanup: true
on:
tags: true
condition: $CONFIG = installer
# deploy tagged installers to s3 version folder
- provider: s3
access_key_id: AKIAI42TETMLX6KJRTRA
secret_access_key:
secure: LTFfh+WjeRguNe6b7R+Htuf+9GULyorBDUcV2mKkvEXrdytcQgDRFPtS32ubl/pjfOrKgKNwg173M3iFEG1cFKZklYnH4OlMYFH2VWxoTgrUfsxBy8JVtEObysl2mVV0QrLvVvvd9/oeaz2HNCrVHxynaM3nt5t4uIqeiZBxbYrrAOrKRNsBhrulixRs+9gHknxsQr1feQlyVnsdKURJaWSjw0lhKo9cPcsdsq6kCOpO81ZX4DLwK6i+NCu7V5J31UAcWvcXhv/fg+UKzMxgecog/pHZjqXx9kcqNQkoEstGJeTtzYf3YpzLBFApWxF64M9dVR+qVjE5MOS4RzdPrsLW1awIcCowOKBkkXYqJ7/69rB7lWwFugHM6r9D7wz2IXG9qayq9PGhX6PJNF/FNc+dmkagPkHGchQnYCZZ5TTf/T3Af0iAH9HwkNXDG1NDRldrk2EbBEUWA/ryJDmUgPj6tmSvkbXgRKmEaIUk6uFovyBBMQbocVLmTIppvb8KNK9IxXDE01rsDqn0BmlPuqatqzGAG3McpFegKITOKhfqKgayMRNsv9eoU6ioL146y4m/C+DGwLfTHY/G1yD97/FKqo+LkMutLr7VzVNLmmjvsIdTg5sAZzdHkwdu3x97Uj1XddOSajDogDgwwvuiEWstwP2vB8rqtud+f9hymFc=
bucket: downloads.bluerobotics.com
local_dir: ${SHADOW_BUILD_DIR}/release/package
upload-dir: QGC/${TRAVIS_BRANCH}
acl: public_read
region: us-east-1
skip_cleanup: true
on:
tags: true
condition: $CONFIG = installer
- provider: releases
api_key:
secure: "g3GmQKYf6yG/Lv9yCbxGQL6F1Thjxjpsn5IEbRmoY35pIq9cJ/q6WMBsKWavewbfS5qYLHH954rxR+aIwzu0HzFR0946YxHoDqLa7ptkYFaw94SOf/u9fAw0e3pn7BCJR/RtuCWAJussT1HFebrPIr8t1IyB8RE3wxFYYUkN1DgqdGojvungCxki82fPMGGyF3pHhaqdX6L0nHN49au/YSj2kGEFhCLXArkzsmIIBgr+OyVXiasoUHi8E/3x2K3aQAmIQMisI4iq+FUMUnMIqNPlfGnao7hpXXKYRnNDo31Ti1lWZnx2e2OJgHGV4UhaXiw9Lf5q48q6+OObvWMlVLMkic1enqxSlYxhAUkqTRysBcCeU94Faj3Tl3X7t+xhJrAhD9/zw9umJ6NMDGeBXPxClcs2Q7fjCuU1O4h56AIIpAQczuEB9Vza3CYCGsNrFpTN5TuXosdqlPHwPc2f6S/0BZll/o1FY19X0xpEPVZE1kNTEW30HGYzdb78OClTbewYNCEIMQE7mZNRMllPbvP/Hl9Wqgi073eMJEj6mRja2rTw8uyXhso84dFHJkjlBpdueqhEr8B7Fp/+nj2AXtDkgnjWpDqfcgkEFZah6XTToGSYSgffnLb+ND/nzoJtkm83FsBe++cPjbXQZ9ER5i1XT9z4POasszxjToifeeI="
file_glob: true
file:
- ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.*
- ${SHADOW_BUILD_DIR}/release/package/QGroundControl.*
skip-cleanup: true
on:
tags: true
condition: $CONFIG = installer