-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
110 lines (99 loc) · 4.08 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
# Build and autotest script for PX4 Firmware
# http://travis-ci.org
language: cpp
git:
depth: 2000
matrix:
fast_finish: true
include:
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=qgc_firmware
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=check_format
- os: linux
sudo: required
services:
- docker
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=px4_metadata
cache:
ccache: true
before_install:
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_BRANCH}" == "coverity" ]]; then sudo apt-get install genromfs && pip install empy jinja2; fi
env:
global:
# 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:
- if [[ "${TRAVIS_BRANCH}" == "coverity" ]]; then
echo "no script for coverity build";
elif [[ "${BUILD_TARGET}" = "qgc_firmware" ]]; then
./Tools/docker_run.sh 'make qgc_firmware';
elif [[ "${BUILD_TARGET}" = "check_format" ]]; then
./Tools/docker_run.sh 'make check_format';
elif [[ "${BUILD_TARGET}" = "tests_linux" ]]; then
./Tools/docker_run.sh 'make tests';
elif [[ "${BUILD_TARGET}" = "px4_metadata" ]]; then
./Tools/docker_run.sh 'make px4_metadata';
elif [[ "${BUILD_TARGET}" = "clang-tidy" ]]; then
PX4_DOCKER_REPO=px4io/px4-dev-clang:2017-04-22 ./Tools/docker_run.sh 'make clang-tidy-parallel';
fi
after_success:
# 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}" = "px4_metadata" && "${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
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
addons:
coverity_scan:
project:
name: PX4/Firmware
notification_email: [email protected]
build_command: make posix_sitl_default
branch_pattern: coverity
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
slack:
rooms:
- secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
on_pull_requests: false
on_success: never # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always