2014-12-20 13:54:35 -04:00
|
|
|
# Build and autotest script for PX4 Firmware
|
|
|
|
# http://travis-ci.org
|
|
|
|
|
|
|
|
language: cpp
|
|
|
|
|
2016-10-19 21:31:56 -03:00
|
|
|
git:
|
2017-01-14 10:38:28 -04:00
|
|
|
depth: 2000
|
2016-10-19 21:31:56 -03:00
|
|
|
|
2015-09-13 14:53:47 -03:00
|
|
|
matrix:
|
2015-10-18 11:10:33 -03:00
|
|
|
fast_finish: true
|
2015-09-13 14:53:47 -03:00
|
|
|
include:
|
2017-01-14 18:37:16 -04:00
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
env: BUILD_TARGET=check_format
|
2017-01-14 13:53:04 -04:00
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
2017-04-23 19:10:17 -03:00
|
|
|
env: BUILD_TARGET=tests
|
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
env: BUILD_TARGET=tests_coverage
|
2017-01-29 18:24:52 -04:00
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
env: BUILD_TARGET=clang-tidy
|
2017-04-23 15:48:35 -03:00
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
env: BUILD_TARGET=scan-build
|
2017-04-06 17:06:11 -03:00
|
|
|
- os: linux
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
2017-04-22 21:40:42 -03:00
|
|
|
env: BUILD_TARGET=px4_metadata
|
2017-04-23 19:39:51 -03:00
|
|
|
- os: linux
|
2017-04-23 20:34:27 -03:00
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
2017-04-23 19:39:51 -03:00
|
|
|
env: BUILD_TARGET=coverity_scan
|
2015-04-17 23:12:44 -03:00
|
|
|
|
|
|
|
cache:
|
2016-06-22 18:42:49 -03:00
|
|
|
ccache: true
|
2015-04-17 23:12:44 -03:00
|
|
|
|
2015-09-13 14:53:47 -03:00
|
|
|
before_install:
|
2017-04-23 20:40:57 -03:00
|
|
|
# install dependencies for the coverity build (target and branch), otherwise exit early
|
|
|
|
- if [[ "${TRAVIS_BRANCH}" = "coverity" ]]; then
|
|
|
|
if [[ "${BUILD_TARGET}" = "coverity_scan" ]]; then sudo apt-get install genromfs && pip install empy jinja2; else exit 0; fi;
|
|
|
|
fi
|
2015-09-13 14:53:47 -03:00
|
|
|
|
2014-12-21 12:01:26 -04:00
|
|
|
env:
|
|
|
|
global:
|
2017-01-03 00:34:45 -04:00
|
|
|
# COVERITY KEY
|
|
|
|
- secure: "NyaJoCGjU0Xc90Y6bxVYWLgjrJX5HlZsm/SPxruZ6I7xkGo19fJIFzGegOHQFR32D4AiKjllfjTUNy+ncckWplind0QwxtF4/kxXrz9XBfiby6X8jLYXIekrB6Ay0mBLGbniDdh+lpWtcyop6Dmkt5bdJCJuKY2nv9ENnhhs07M="
|
2014-12-21 12:01:26 -04:00
|
|
|
# AWS KEY: $PX4_AWS_KEY
|
|
|
|
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
|
|
|
|
# AWS SECRET: $PX4_AWS_SECRET
|
|
|
|
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
|
|
|
|
|
2014-12-20 13:54:35 -04:00
|
|
|
script:
|
2017-04-23 20:40:57 -03:00
|
|
|
- if [[ "${BUILD_TARGET}" = "coverity_scan" ]]; then
|
2017-04-22 19:25:47 -03:00
|
|
|
echo "no script for coverity build";
|
2017-04-23 20:40:57 -03:00
|
|
|
elif [[ "${TRAVIS_BRANCH}" = "coverity" ]]; then
|
2017-04-23 19:39:51 -03:00
|
|
|
echo "exit early for coverity build" && exit 0;
|
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-23 19:10:17 -03:00
|
|
|
elif [[ "${BUILD_TARGET}" = "tests" ]]; then
|
2017-01-29 18:24:52 -04:00
|
|
|
./Tools/docker_run.sh 'make tests';
|
2017-04-23 19:10:17 -03:00
|
|
|
elif [[ "${BUILD_TARGET}" = "tests_coverage" ]]; then
|
|
|
|
./Tools/docker_run.sh 'make tests_coverage';
|
2017-04-22 21:40:42 -03:00
|
|
|
elif [[ "${BUILD_TARGET}" = "px4_metadata" ]]; then
|
|
|
|
./Tools/docker_run.sh 'make px4_metadata';
|
2017-04-22 19:25:47 -03:00
|
|
|
elif [[ "${BUILD_TARGET}" = "clang-tidy" ]]; then
|
2017-04-23 15:48:35 -03:00
|
|
|
./Tools/docker_run.sh 'make clang-tidy-quiet';
|
|
|
|
elif [[ "${BUILD_TARGET}" = "scan-build" ]]; then
|
|
|
|
./Tools/docker_run.sh 'make scan-build';
|
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-04-23 15:48:35 -03:00
|
|
|
# s3 deploy airframe and parameter metadata
|
2017-04-23 20:40:57 -03:00
|
|
|
- if [[ "${BUILD_TARGET}" = "px4_metadata" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" != "coverity" ]]; then
|
2017-04-23 20:26:55 -03:00
|
|
|
./Tools/docker_run.sh 'make s3put_px4_metadata AWS_S3_BUCKET="px4-travis/Firmware/${TRAVIS_BRANCH}"';
|
2017-04-06 17:06:11 -03:00
|
|
|
fi
|
2017-04-23 15:48:35 -03:00
|
|
|
# s3 upload clang scan-build output for master branch
|
2017-04-23 20:40:57 -03:00
|
|
|
- if [[ "${BUILD_TARGET}" = "scan-build" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
|
2017-04-23 20:34:27 -03:00
|
|
|
./Tools/docker_run.sh 'make s3put_scan-build AWS_S3_BUCKET="px4-travis/scan-build"';
|
2017-04-23 15:48:35 -03:00
|
|
|
fi
|
2017-04-23 19:10:17 -03:00
|
|
|
# coveralls code coverage report
|
2017-04-23 20:40:57 -03:00
|
|
|
- if [[ "${BUILD_TARGET}" = "tests_coverage" && "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
|
2017-04-23 19:10:17 -03:00
|
|
|
./Tools/docker_run.sh 'cpp-coveralls -l coverage.info';
|
|
|
|
fi
|
2014-12-21 12:01:26 -04:00
|
|
|
|
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
|
2016-09-06 18:34:02 -03:00
|
|
|
on_failure: never # options: [always|never|change] default: always
|