forked from PX4/PX4-Autopilot
/
.travis.yml
155 lines (144 loc) · 5.33 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Build and autotest script for PX4 Firmware
# http://travis-ci.org
language: cpp
matrix:
include:
- os: linux
sudo: false
- os: osx
osx_image: beta-xcode6.3
cache:
directories:
- $HOME/.ccache
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
packages:
- build-essential
- ccache
- cmake
- clang-3.5
- g++-4.8
- gcc-4.8
- genromfs
- libc6-i386
- libncurses5-dev
- python-argparse
- python-empy
- python-serial
- s3cmd
- texinfo
- zlib1g-dev
before_install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
pushd .
&& cd ~
&& wget https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
&& tar -jxf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
&& exportline="export PATH=$HOME/gcc-arm-none-eabi-4_8-2014q3/bin:\$PATH"
&& if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
&& . ~/.profile
&& popd
&& mkdir -p ~/bin
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
&& astyle --version
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew tap PX4/homebrew-px4
&& brew update
&& brew install genromfs
&& brew install kconfig-frontends
&& brew install gcc-arm-none-eabi
&& brew install astyle
&& sudo easy_install pip
&& sudo pip install pyserial empy
;
fi
before_script:
# setup ccache
- mkdir -p ~/bin
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
- ln -s /usr/bin/ccache ~/bin/clang++
- ln -s /usr/bin/ccache ~/bin/clang++-3.4
- ln -s /usr/bin/ccache ~/bin/clang++-3.5
- ln -s /usr/bin/ccache ~/bin/clang
- ln -s /usr/bin/ccache ~/bin/clang-3.4
- ln -s /usr/bin/ccache ~/bin/clang-3.5
- ln -s /usr/bin/ccache ~/bin/g++-4.8
- ln -s /usr/bin/ccache ~/bin/gcc-4.8
- export PATH=~/bin:$PATH
env:
global:
# AWS KEY: $PX4_AWS_KEY
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
# AWS SECRET: $PX4_AWS_SECRET
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
- PX4_AWS_BUCKET=px4-travis
script:
#- make check_format
- arm-none-eabi-gcc --version
- echo 'Building POSIX Firmware..' && echo -en 'travis_fold:start:script.1\\r'
- make posix_sitl_simple -j4
- echo -en 'travis_fold:end:script.1\\r'
- echo 'Running Tests..' && echo -en 'travis_fold:start:script.2\\r'
- make posix_sitl_simple test
- cat build_posix_sitl_simple/src/modules/systemlib/mixer/mixer_multirotor.generated.h
- echo -en 'travis_fold:end:script.2\\r'
- echo 'Building NuttX Firmware..' && echo -en 'travis_fold:start:script.3\\r'
- make px4fmu-v2_default -j4
- echo -en 'travis_fold:end:script.3\\r'
- echo 'Running Tests..' && echo -en 'travis_fold:start:script.4\\r'
- make px4fmu-v2_default test
- echo -en 'travis_fold:end:script.4\\r'
- make px4fmu-v2_default package
#- make posix -j4
#- ccache -s
#- echo -en 'travis_fold:end:script.1\\r'
#- echo 'Running Tests..' && echo -en 'travis_fold:start:script.2\\r'
#- make tests
#- cat src/modules/systemlib/mixer/mixer_multirotor.generated.h
#- echo -en 'travis_fold:end:script.2\\r'
#- echo 'Building NuttX..' && echo -en 'travis_fold:start:script.3\\r'
#- make archives
#- ccache -s
#- echo -en 'travis_fold:end:script.3\\r'
#- echo 'Building NuttX Firmware..' && echo -en 'travis_fold:start:script.4\\r'
#- make -j4
#- make size
#- ccache -s
#- echo -en 'travis_fold:end:script.4\\r'
#- zip Firmware.zip Images/*.px4
#after_script:
#- git clone git://github.com/PX4/CI-Tools.git
#- ./CI-Tools/s3cmd-configure
## upload newest build for this branch with s3 index
#- ./CI-Tools/s3cmd-put Images/px4*.px4 CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
## archive newest build by date with s3 index
#- ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
#- ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
## upload top level index.html and timestamp.html
#- ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
#- ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
#- echo ""
#- echo "Binaries have been posted to:"
#- echo https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
deploy:
provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
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