Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
303a70c8
Commit
303a70c8
authored
Jun 26, 2016
by
Daniel Agar
Committed by
GitHub
Jun 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
travis-ci comment and simplify (#3667)
parent
59ef1b3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
139 deletions
+97
-139
.travis.yml
.travis.yml
+97
-139
No files found.
.travis.yml
View file @
303a70c8
...
...
@@ -4,25 +4,27 @@ language: cpp
env
:
global
:
-
CCACHE_CPP2=1
-
JOBS=4
-
QT_FATAL_WARNINGS=1
-
SHADOW_BUILD_DIR=/tmp/shadow_build_dir
-
JOBS=2
# ANDROID_STOREPASS
-
secure
:
RGovyUnMw3fp/bHZi058JvANT1rYmNqrsuSYew0cIgirO6YbMHr/rsjwCm1FTYpBl8s1zgr+u2b8ftYnfnCz2YT+Aip4NWrVYpVU0FEmfytGILrnUS0pjlt8m7fU9AKR1ElOSll7yw7e1kftynN39Q321etvwbLZcXon6zz0suE=
matrix
:
fast_finish
:
true
include
:
#- os: linux
# env: SPEC=linux-g++-64 CONFIG=debug QT_FATAL_WARNINGS=1
# sudo: required
# dist: trusty
-
os
:
linux
env
:
SPEC=linux-g++-64 CONFIG=installer
sudo
:
required
dist
:
trusty
-
os
:
android
language
:
android
env
:
SPEC=android-g++ CONFIG=installer
sudo
:
false
-
os
:
osx
osx_image
:
xcode7.3
env
:
SPEC=macx-clang CONFIG=debug
QT_FATAL_WARNINGS=1
env
:
SPEC=macx-clang CONFIG=debug
sudo
:
required
-
os
:
osx
osx_image
:
xcode7.3
...
...
@@ -30,205 +32,152 @@ matrix:
sudo
:
required
-
os
:
osx
osx_image
:
xcode7.3
env
:
SPEC=ios
sudo
:
false
-
os
:
android
language
:
android
env
:
SPEC=android-g++ CONFIG=installer
env
:
SPEC=macx-ios-clang CONFIG=release
sudo
:
false
android
:
components
:
-
platform-tools
-
build-tools-21.1.1
-
android-21
-
build-tools-21.1.1
-
platform-tools
addons
:
apt
:
sources
:
-
ubuntu-toolchain-r-test
packages
:
-
ccache
-
debhelper
-
devscripts
-
dput
-
espeak
-
g++-4.8
-
gcc-4.8
-
libc6-i386
-
libespeak-dev
-
libgstreamer-plugins-base1.0-dev
-
libgstreamer1.0-0:amd64
-
libgstreamer1.0-dev
-
libopenscenegraph-dev
-
libsdl1.2-dev
-
libudev-dev
-
wget
before_cache
:
-
rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
-
rm -f $HOME/.cache/pip/log/debug.log
cache
:
bundler
:
true
ccache
:
true
pip
:
true
directories
:
-
$HOME/.cache/pip
-
$HOME/.ccache
-
$HOME/.gradle/caches
-
$HOME/.gradle/wrapper
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
-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
mkdir -p ~/.config/QtProject/ &&
cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/
;
cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags;
fi
# install ccache for osx/ios
-
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
mkdir -p ~/Library/Preferences/QtProject/ &&
cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/Library/Preferences/QtProject/
;
wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache &&
chmod +x ccache && sudo mv ccache /usr/local/bin;
fi
-
if [ "${SPEC}" = "android-g++" ]; then
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
;
# setup ccache
-
ccache -M 1GB && 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
:
-
if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
# linux dependencies: qt
-
if [ "${SPEC}" = "linux-g++-64" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 &&
tar jxf Qt5.5.1-linux-min.tar.bz2 -C /tmp &&
export PATH=/tmp/Qt/5.5/gcc_64/bin:$PATH &&
export CXX="g++-4.8" &&
export CC="gcc-4.8" &&
export DISPLAY=:99.0 &&
sh -e /etc/init.d/xvfb start
sh -e /etc/init.d/xvfb start &&
mkdir -p ~/.config/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/
;
fi
-
if [[ "${TRAVIS_OS_NAME}" = "osx" && "${SPEC}" != "ios" ]]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-1.5.2-x86_64.pkg &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-1.5.2-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-devel-1.5.2-x86_64.pkg -target / &&
sudo installer -verboseR -pkg gstreamer-1.0-1.5.2-x86_64.pkg -target / &&
# android dependencies: qt, gstreamer, android-ndk
-
if [ "${SPEC}" = "android-g++" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 &&
tar jxf Qt5.5.1-linux-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/Qt/5.5/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH
;
fi
# osx dependencies: qt, gstreamer, gstreamer-devel
-
if [ "${SPEC}" = "macx-clang" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-mac-clang-min.tar.bz2 &&
tar jxf Qt5.5.1-mac-clang-min.tar.bz2 -C /tmp &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-1.5.2-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-1.5.2-x86_64.pkg -target / &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-1.5.2-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-devel-1.5.2-x86_64.pkg -target / &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/osx-gstreamer.tar.bz2 &&
sudo tar jxf osx-gstreamer.tar.bz2 -C /Library/Frameworks &&
export QT_DIR=Qt5.5-mac-clang/5.5/clang_64 &&
export PATH=/tmp/$QT_DIR/bin:$PATH &&
export QT_QPA_PLATFORM_PLUGIN_PATH=/tmp/$QT_DIR/plugins &&
export QML2_IMPORT_PATH=/tmp/$QT_DIR/qml
;
fi
-
if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache &&
sudo mv ccache /usr/local/bin &&
chmod +x /usr/local/bin/ccache &&
export CCACHE_CPP2=1
export QML2_IMPORT_PATH=/tmp/$QT_DIR/qml &&
export PATH=/tmp/$QT_DIR/bin:$PATH &&
mkdir -p ~/Library/Preferences/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/Library/Preferences/QtProject/
;
fi
-
if [[ "${TRAVIS_OS_NAME}" = "osx" && "${SPEC}" = "ios" ]]; then
# ios dependencies: qt, TODO: add gstreamer
-
if [ "${SPEC}" = "macx-ios-clang" ]; then
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-ios-min.tar.bz2 &&
tar jxf Qt5.5.1-ios-min.tar.bz2 -C /tmp &&
export PATH=/tmp/ios/bin:$PATH &&
export IOS_CCACHE_CC=`/usr/bin/xcrun -sdk iphoneos -find clang` &&
export IOS_CCACHE_CXX=`/usr/bin/xcrun -sdk iphoneos -find clang++`
;
fi
-
if [ "${SPEC}" = "android-g++" ]; then
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 PATH=`pwd`/android-ndk-r10e:$PATH &&
export ANDROID_NDK_ROOT=`pwd`/android-ndk-r10e &&
export ANDROID_SDK_ROOT=/usr/local/android-sdk &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 &&
tar jxf Qt5.5.1-linux-min.tar.bz2 -C /tmp &&
export PATH=/tmp/Qt/5.5/android_armv7/bin:$PATH
export USE_CCACHE=1 &&
export NDK_CCACHE=`which ccache`
export IOS_CCACHE_CXX=`/usr/bin/xcrun -sdk iphoneos -find clang++` &&
export PATH=/tmp/ios/bin:$PATH
;
fi
before_script
:
# setup ccache
-
ccache -M 1GB && ccache -z
# 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
-
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
export JOBS=$((`cat /proc/cpuinfo | grep -c ^processor`+1))
;
fi
-
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
export JOBS=$((`sysctl -n hw.ncpu`+1))
;
fi
-
if [ "${SPEC}" != "ios" ]; then
mkdir ${SHADOW_BUILD_DIR} &&
cd ${SHADOW_BUILD_DIR} &&
qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC}
;
fi
-
if [ "${SPEC}" = "ios" ]; then
mkdir ${SHADOW_BUILD_DIR} &&
cd ${SHADOW_BUILD_DIR} &&
qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=WarningsAsErrorsOn CONFIG-=debug_and_release CONFIG+=release
;
export CONFIG=release;
fi
script
:
# insert QGC version in AndroidManifest.xml
-
if [ "${SPEC}" = "android-g++" ]; then
cd ${TRAVIS_BUILD_DIR} &&
./tools/update_android_version.sh &&
export JOBS=4
;
cd ${TRAVIS_BUILD_DIR} && ./tools/update_android_version.sh;
fi
-
if [ "${SPEC}" != "ios" ]; then
cd ${SHADOW_BUILD_DIR} && echo Building with $JOBS workers &&
make -j$JOBS | sed 's/${TRAVIS_BUILD_DIR}/-/' && $(exit ${PIPESTATUS[0]})
;
fi
-
if [ "${SPEC}" = "ios" ]; then
cd ${SHADOW_BUILD_DIR} && echo Building with $JOBS workers &&
xcodebuild -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=$JOBS -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c && $(exit ${PIPESTATUS[0]})
;
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
# linux unit tests
-
if [[ "${TRAVIS_OS_NAME}" = "linux" && "${CONFIG}" = "debug" ]]; then
${SHADOW_BUILD_DIR}/debug/qgroundcontrol --unittest
;
fi
# osx unit tests
-
if [[ "${TRAVIS_OS_NAME}" = "osx" && "${CONFIG}" = "debug" ]]; then
${SHADOW_BUILD_DIR}/debug/qgroundcontrol.app/Contents/MacOS/qgroundcontrol --unittest
;
# unit tests linux/osx
-
if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "debug" ]]; then
./debug/qgroundcontrol --unittest;
elif [[ "${SPEC}" = "macx-clang" && "${CONFIG}" = "debug" ]]; then
./debug/qgroundcontrol.app/Contents/MacOS/qgroundcontrol --unittest;
fi
after_success
:
-
if [[ "${TRAVIS_OS_NAME}" = "linux" && "${CONFIG}" = "installer" ]]; then
${TRAVIS_BUILD_DIR}/deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/release ${SHADOW_BUILD_DIR}/release/package;
fi
# android google play deploy
-
export GOOGLE_PLAY_TRACK=none;
-
if [ "${TRAVIS_TAG}" ]; then
export
GOOGLE_PLAY_TRACK=production;
GOOGLE_PLAY_TRACK=production;
elif [ "${TRAVIS_BRANCH}" = "master" ]; then
export GOOGLE_PLAY_TRACK=beta;
else
export GOOGLE_PLAY_TRACK=none;
GOOGLE_PLAY_TRACK=beta;
fi
-
if [[ "${SPEC}" = "android-g++" && "${TRAVIS_PULL_REQUEST}" = "false" && "${GOOGLE_PLAY_TRACK}" != "none" ]]; then
pip install --user google-api-python-client PyOpenSSL &&
...
...
@@ -238,7 +187,14 @@ after_success:
;
fi
before_deploy
:
# create linux appimage
-
if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "installer" ]]; then
${TRAVIS_BUILD_DIR}/deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/release ${SHADOW_BUILD_DIR}/release/package;
fi
deploy
:
# upload installers to s3 if on a branch
-
provider
:
s3
access_key_id
:
AKIAIVORNALE7NHD3T6Q
secret_access_key
:
...
...
@@ -252,6 +208,8 @@ deploy:
on
:
all_branches
:
true
condition
:
$CONFIG = installer
# deploy installers to Github releases if on a tag
-
provider
:
releases
api-key
:
secure
:
K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment