px4-firmware/.travis.yml

118 lines
4.4 KiB
YAML
Raw Normal View History

# Build and autotest script for PX4 Firmware
# http://travis-ci.org
language: cpp
2016-10-19 21:31:56 -03:00
git:
depth: 2000
2016-10-19 21:31:56 -03:00
2015-09-13 14:53:47 -03:00
matrix:
fast_finish: true
2015-09-13 14:53:47 -03:00
include:
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=qgc_firmware
2017-01-14 18:37:16 -04:00
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=check_format
- os: linux
sudo: required
services:
- docker
2017-01-29 18:24:52 -04:00
env: BUILD_TARGET=tests_linux
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=clang-tidy
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=parameters_markdown
2015-09-13 14:53:47 -03:00
- os: osx
2015-10-17 01:47:16 -03:00
sudo: true
2016-09-26 18:37:13 -03:00
osx_image: xcode8
env: BUILD_TARGET=tests
cache:
ccache: true
2015-09-13 14:53:47 -03:00
before_install:
2017-01-14 18:36:51 -04:00
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_BRANCH}" == "coverity" ]]; then sudo apt-get install genromfs && pip install empy jinja2; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then sudo -H easy_install pip && sudo -H pip install empy jinja2; fi
2015-09-13 14:53:47 -03:00
env:
global:
2017-01-03 00:34:45 -04:00
# COVERITY KEY
- secure: "NyaJoCGjU0Xc90Y6bxVYWLgjrJX5HlZsm/SPxruZ6I7xkGo19fJIFzGegOHQFR32D4AiKjllfjTUNy+ncckWplind0QwxtF4/kxXrz9XBfiby6X8jLYXIekrB6Ay0mBLGbniDdh+lpWtcyop6Dmkt5bdJCJuKY2nv9ENnhhs07M="
# AWS KEY: $PX4_AWS_KEY
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
# AWS SECRET: $PX4_AWS_SECRET
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
script:
2017-04-22 19:25:47 -03:00
- if [[ "${TRAVIS_BRANCH}" == "coverity" ]]; then
echo "no script for coverity build";
elif [[ "${BUILD_TARGET}" = "qgc_firmware" ]]; then
./Tools/docker_run.sh 'make qgc_firmware';
2017-04-22 19:25:47 -03:00
elif [[ "${BUILD_TARGET}" = "check_format" ]]; then
2017-01-14 18:37:16 -04:00
./Tools/docker_run.sh 'make check_format';
2017-04-22 19:25:47 -03:00
elif [[ "${BUILD_TARGET}" = "tests_linux" ]]; then
2017-01-29 18:24:52 -04:00
./Tools/docker_run.sh 'make tests';
2017-04-22 19:25:47 -03:00
elif [[ "${BUILD_TARGET}" = "parameters_markdown" ]]; then
./Tools/docker_run.sh 'make parameters_markdown';
elif [[ "${BUILD_TARGET}" = "clang-tidy" ]]; then
PX4_DOCKER_REPO=px4io/px4-dev-clang:2017-04-22 ./Tools/docker_run.sh 'make clang-tidy-parallel';
2016-04-17 18:18:26 -03:00
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
2016-08-26 04:54:49 -03:00
make tests;
2016-02-17 23:39:48 -04:00
fi
2015-09-10 03:21:40 -03:00
2015-10-17 11:33:18 -03:00
after_success:
2017-01-14 11:10:15 -04:00
# s3 deploy individual firmware files (.px4), Firmware.zip, airframe.xml, and param.xml
- if [[ "${BUILD_TARGET}" = "qgc_firmware" && "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" != "coverity" ]]; then
./Tools/docker_run.sh 'make s3put_firmware AWS_S3_BUCKET="px4-travis/archives/Firmware/${TRAVIS_BRANCH}/${TRAVIS_BUILD_ID}"'
&& ./Tools/docker_run.sh 'make s3put_qgc_firmware AWS_S3_BUCKET="px4-travis/Firmware/${TRAVIS_BRANCH}"';
fi
- if [[ "${BUILD_TARGET}" = "parameters_markdown" && "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" != "coverity" ]]; then
./Tools/docker_run.sh 'make s3put_parameters_markdown AWS_S3_BUCKET="px4-travis/Firmware/${TRAVIS_BRANCH}"';
fi
2014-12-20 19:50:06 -04:00
deploy:
# on tags deploy Firmware.zip to Github releases
- provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
condition: $BUILD_TARGET = qgc_firmware
2017-01-03 00:34:45 -04:00
addons:
coverity_scan:
project:
name: PX4/Firmware
notification_email: ci@px4.io
build_command: make posix_sitl_default
branch_pattern: coverity
2014-12-24 04:44:52 -04:00
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/2b9c4a4cb2211f8befba
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
2016-03-30 15:47:25 -03:00
slack:
2016-08-26 04:54:49 -03:00
rooms:
- secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
2016-08-26 07:09:07 -03:00
on_pull_requests: false
on_success: never # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always