2 Star 1 Fork 0

ZH-OuYangLei/qgroundcontrol

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 11.64 KB
一键复制 编辑 原始数据 按行查看 历史
Don Gagne 提交于 2020-03-26 12:24 .
# if you update this file, please consider updating Vagrantfile too
language: cpp
env:
global:
- JOBS=4
# QT_FATAL_WARNINGS is turned off because Qt 5.11.3 throws a speech dispatcher not working warning when running unit tests
#- QT_FATAL_WARNINGS=1
- SHADOW_BUILD_DIR=/tmp/shadow_build_dir
# ANDROID_STOREPASS
- secure: RGovyUnMw3fp/bHZi058JvANT1rYmNqrsuSYew0cIgirO6YbMHr/rsjwCm1FTYpBl8s1zgr+u2b8ftYnfnCz2YT+Aip4NWrVYpVU0FEmfytGILrnUS0pjlt8m7fU9AKR1ElOSll7yw7e1kftynN39Q321etvwbLZcXon6zz0suE=
jobs:
fast_finish: true
include:
- stage: "Build"
name: "Linux Installer"
os: linux
dist: bionic
env: SPEC=linux-g++-64 CONFIG=installer
sudo: required
- stage: "Build"
name: "Linux Debug"
os: linux
dist: bionic
env: SPEC=linux-g++-64 CONFIG=debug
services: xvfb
sudo: required
- stage: "Build"
name: "Android 32 bit"
dist: trusty
language: android
env: SPEC=android-clang CONFIG=installer BITNESS=32 GSTREAMER_NAME=armv7
sudo: false
- stage: "Build"
name: "Android 64 bit"
dist: trusty
language: android
env: SPEC=android-clang CONFIG=installer BITNESS=64 GSTREAMER_NAME=arm64
sudo: false
- stage: "Build"
name: "OSX Installer"
os: osx
osx_image: xcode11.3
env: SPEC=macx-clang CONFIG=installer
sudo: required
- stage: "Google Play Upload"
name: "Google Play Upload"
dist: trusty
language: android
env: SPEC=google-play-upload
sudo: false
before_install: skip
install: skip
before_script: skip
before_deploy: skip
after_deploy: skip
script: echo "Google Play Upload"
# iOS build needs updating Qt to > 5.10
# - os: osx
# osx_image: xcode9.2
# env: SPEC=macx-ios-clang CONFIG=release
# sudo: false
# OSX builds pared back to installer only since travis sucks so bad we can't afford more than one'
# - os: osx
# osx_image: xcode10.1
# env: SPEC=macx-clang CONFIG=debug
# sudo: required
android:
components:
- android-28
- build-tools-25.0.3
- platform-tools
addons:
apt:
packages:
- speech-dispatcher
- libgstreamer-plugins-base1.0-dev
- libgstreamer1.0-0:amd64
- libgstreamer1.0-dev
- libudev-dev
- wget
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
# 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
# Linux needs sdl2 but not android
- if [ "${SPEC}" = "linux-g++-64" ]; then
sudo apt-get install -y libsdl2-dev libxkbcommon-x11-0;
fi
install:
# linux dependencies: qt
- if [ "${SPEC}" = "linux-g++-64" ]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.12.6-gcc_64-min.tar.bz2 &&
tar jxf Qt5.12.6-gcc_64-min.tar.bz2 -C /tmp &&
export PATH=/tmp/Qt5.12-gcc_64/5.12.6/gcc_64/bin:$PATH
;
fi
# android dependencies: qt, gstreamer, android-ndk
- if [ "${SPEC}" = "android-clang" ]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-android-${GSTREAMER_NAME}-1.14.4.tar.bz2 &&
tar jxf gstreamer-1.0-android-${GSTREAMER_NAME}-1.14.4.tar.bz2 -C ${TRAVIS_BUILD_DIR} &&
wget --quiet https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip &&
unzip android-ndk-r20-linux-x86_64.zip > /dev/null &&
export ANDROID_NDK_ROOT=`pwd`/android-ndk-r20 &&
export ANDROID_SDK_ROOT=/usr/local/android-sdk &&
export PATH=`pwd`/android-ndk-r20:$PATH
;
fi
- if [[ "${SPEC}" = "android-clang" && "${BITNESS}" = "64" ]]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.12.6-android_arm64_v8a-min.tar.bz2 &&
tar jxf Qt5.12.6-android_arm64_v8a-min.tar.bz2 -C /tmp &&
export PATH=/tmp/Qt5.12-android_arm64_v8a/5.12.6/android_arm64_v8a/bin:$PATH
;
fi
- if [[ "${SPEC}" = "android-clang" && "${BITNESS}" = "32" ]]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.12.6-android_armv7-min.tar.bz2 &&
tar jxf Qt5.12.6-android_armv7-min.tar.bz2 -C /tmp &&
export PATH=/tmp/Qt5.12-android_armv7/5.12.6/android_armv7/bin:$PATH
;
fi
# osx dependencies: qt (master builds only: gstreamer, gstreamer-devel)
- if [ "${SPEC}" = "macx-clang" ]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.12.6-clang_64-min.tar.bz2 &&
tar jxf Qt5.12.6-clang_64-min.tar.bz2 -C /tmp
;
fi
- if [[ "${SPEC}" = "macx-clang" ]]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/osx-gstreamer.tar.bz2 &&
sudo tar jxf osx-gstreamer.tar.bz2 -C /Library/Frameworks
;
fi
- if [ "${SPEC}" = "macx-clang" ]; then
export QT_DIR=Qt5.12-clang_64/5.12.6/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
- if [ "${SPEC}" = "macx-ios-clang" ]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.9.3-ios-min.tar.bz2
;
fi
- if [ "${SPEC}" = "macx-ios-clang" ]; then
tar jxf Qt5.9.3-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.9-ios/5.9.3/ios/bin:$PATH
;
fi
before_script:
- cd ${TRAVIS_BUILD_DIR}
# switch android config from installer to release if the android storepass isn't available
- if [[ "${SPEC}" = "android-clang" && "${CONFIG}" = "installer" && -z ${ANDROID_STOREPASS} ]]; then
export CONFIG=release;
fi
# insert QGC version in AndroidManifest.xml
- if [ "${SPEC}" = "android-clang" ]; then
git remote set-branches origin 'master' &&
git fetch --tags origin master &&
./tools/update_android_version.sh ${BITNESS} ${TRAVIS_BRANCH};
fi
script:
# run qmake
- mkdir ${SHADOW_BUILD_DIR} && cd ${SHADOW_BUILD_DIR}
# Due to possible bug in Qt 5.11 WarningsAsErrorsOn is off for Linux builds. Hopefully back on once that is resolved.
- if [ "${SPEC}" = "macx-clang" ]; then
qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC};
else
qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} -spec ${SPEC};
fi
# 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/ &&
export QT_FATAL_WARNINGS=1 &&
./debug/qgroundcontrol-start.sh --unittest;
fi
after_success:
# This is only used to upload android builds to Google Play
- cd ${TRAVIS_BUILD_DIR}
- if [ "${TRAVIS_TAG}" ]; then
GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrol;
elif [ "${TRAVIS_BRANCH}" = "master" ]; then
GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrolbeta;
else
GOOGLE_PLAY_PKG=none;
fi
- if [[ "${SPEC}" = "google-play-upload" && "${TRAVIS_PULL_REQUEST}" = "false" && "${GOOGLE_PLAY_PKG}" != "none" ]]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/builds/${TRAVIS_BRANCH}/QGroundControl32.apk &&
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/builds/${TRAVIS_BRANCH}/QGroundControl64.apk &&
pip install --user --upgrade oauth2client &&
pip install --user google-api-python-client pyopenssl ndg-httpsclient pyasn1 &&
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 &&
./deploy/GooglePlayUpload.py ${GOOGLE_PLAY_PKG};
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
edge: true # Use V2 provider to work around V1 bug
access_key_id: AKIAIVORNALE7NHD3T6Q
secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package
upload-dir: builds/${TRAVIS_BRANCH}
acl: public_read
region: us-west-2
skip_cleanup: true
on:
all_branches: true
condition: $CONFIG = installer
# deploy tagged installers to s3 latest/
- provider: s3
edge: true # Use V2 provider to work around V1 bug
access_key_id: AKIAIVORNALE7NHD3T6Q
secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package
upload-dir: latest
acl: public_read
region: us-west-2
skip_cleanup: true
on:
tags: true
condition: $CONFIG = installer
# deploy tagged installers to s3 version folder
- provider: s3
edge: true # Use V2 provider to work around V1 bug
access_key_id: AKIAIVORNALE7NHD3T6Q
secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package
upload-dir: ${TRAVIS_BRANCH}
acl: public_read
region: us-west-2
skip_cleanup: true
on:
tags: true
condition: $CONFIG = installer
# deploy installers to Github releases if on a tag
- provider: releases
edge: true # Use V2 provider to work around V1 bug
api-key:
secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ=
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
condition: $SPEC != macx-clang # GitHub OSX deploy broken due to travis problem
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/60b033428ae9dc715662
on_success: change
on_failure: always
on_start: never
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/awesomeoy/qgroundcontrol.git
git@gitee.com:awesomeoy/qgroundcontrol.git
awesomeoy
qgroundcontrol
qgroundcontrol
master

搜索帮助