2014-12-20 13:54:35 -04:00
|
|
|
# Build and autotest script for PX4 Firmware
|
|
|
|
# http://travis-ci.org
|
|
|
|
|
|
|
|
language: cpp
|
|
|
|
|
2015-04-17 23:12:44 -03:00
|
|
|
# use travis-ci docker based infrastructure
|
|
|
|
sudo: false
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.ccache
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- build-essential
|
|
|
|
- ccache
|
|
|
|
- cmake
|
2015-07-05 08:47:33 -03:00
|
|
|
- clang-3.5
|
2015-04-17 23:12:44 -03:00
|
|
|
- g++-4.8
|
|
|
|
- gcc-4.8
|
|
|
|
- genromfs
|
|
|
|
- libc6-i386
|
|
|
|
- libncurses5-dev
|
|
|
|
- python-argparse
|
|
|
|
- python-empy
|
|
|
|
- python-serial
|
|
|
|
- s3cmd
|
|
|
|
- texinfo
|
|
|
|
- zlib1g-dev
|
|
|
|
|
2014-12-20 13:54:35 -04:00
|
|
|
before_script:
|
2015-01-05 18:23:20 -04:00
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
|
2015-04-04 07:07:05 -03:00
|
|
|
# General toolchain dependencies
|
2014-12-20 14:55:24 -04:00
|
|
|
- pushd .
|
|
|
|
- cd ~
|
2015-04-04 06:25:29 -03:00
|
|
|
- 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"
|
2014-12-20 14:55:24 -04:00
|
|
|
- if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
|
|
|
|
- . ~/.profile
|
|
|
|
- popd
|
2015-04-17 23:27:36 -03:00
|
|
|
# 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/g++-4.8
|
|
|
|
- ln -s /usr/bin/ccache ~/bin/gcc-4.8
|
|
|
|
- export PATH=~/bin:$PATH
|
2014-12-20 19:50:06 -04:00
|
|
|
|
2014-12-21 12:01:26 -04:00
|
|
|
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
|
|
|
|
|
2014-12-20 13:54:35 -04:00
|
|
|
script:
|
2015-04-17 23:27:36 -03:00
|
|
|
- ccache -z
|
2014-12-21 12:01:26 -04:00
|
|
|
- arm-none-eabi-gcc --version
|
2015-05-19 18:02:16 -03:00
|
|
|
- echo 'Building POSIX Firmware..' && echo -en 'travis_fold:start:script.1\\r'
|
|
|
|
- make posix -j4
|
|
|
|
- ccache -s
|
|
|
|
- echo -en 'travis_fold:end:script.1\\r'
|
|
|
|
- echo 'Running Tests..' && echo -en 'travis_fold:start:script.2\\r'
|
2014-12-20 14:02:37 -04:00
|
|
|
- make tests
|
2015-01-05 15:54:57 -04:00
|
|
|
- cat src/modules/systemlib/mixer/mixer_multirotor.generated.h
|
2014-12-21 08:23:26 -04:00
|
|
|
- echo -en 'travis_fold:end:script.2\\r'
|
2015-05-19 18:02:16 -03:00
|
|
|
- echo 'Building NuttX..' && echo -en 'travis_fold:start:script.3\\r'
|
|
|
|
- make archives
|
2015-04-17 23:27:36 -03:00
|
|
|
- ccache -s
|
2014-12-21 08:23:26 -04:00
|
|
|
- echo -en 'travis_fold:end:script.3\\r'
|
2015-05-19 18:02:16 -03:00
|
|
|
- echo 'Building NuttX Firmware..' && echo -en 'travis_fold:start:script.4\\r'
|
|
|
|
- make -j4
|
2015-06-13 13:07:57 -03:00
|
|
|
- make size
|
2015-05-19 17:59:27 -03:00
|
|
|
- ccache -s
|
|
|
|
- echo -en 'travis_fold:end:script.4\\r'
|
2015-05-19 18:02:16 -03:00
|
|
|
- zip Firmware.zip Images/*.px4
|
2014-12-20 16:49:52 -04:00
|
|
|
|
2015-01-20 02:09:20 -04:00
|
|
|
after_script:
|
|
|
|
- git clone git://github.com/PX4/CI-Tools.git
|
|
|
|
- ./CI-Tools/s3cmd-configure
|
|
|
|
# upload newest build for this branch with s3 index
|
2015-01-20 10:34:03 -04:00
|
|
|
- ./CI-Tools/s3cmd-put Images/px4*.px4 CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
|
2015-01-20 02:09:20 -04:00
|
|
|
# archive newest build by date with s3 index
|
2015-03-05 15:05:11 -04:00
|
|
|
- ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
|
2015-01-20 10:34:03 -04:00
|
|
|
- ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
|
2015-01-20 02:09:20 -04:00
|
|
|
# upload top level index.html and timestamp.html
|
2015-01-21 18:18:55 -04:00
|
|
|
- ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
|
|
|
|
- ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
|
2015-03-05 17:43:42 -04:00
|
|
|
- echo ""
|
|
|
|
- echo "Binaries have been posted to:"
|
|
|
|
- echo https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
|
2014-12-21 12:01:26 -04:00
|
|
|
|
2014-12-20 19:50:06 -04:00
|
|
|
deploy:
|
2014-12-20 16:49:52 -04:00
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
|
2014-12-21 13:30:10 -04:00
|
|
|
file: "Firmware.zip"
|
2014-12-20 19:50:06 -04:00
|
|
|
skip_cleanup: true
|
2014-12-20 16:49:52 -04:00
|
|
|
on:
|
2014-12-20 19:50:06 -04:00
|
|
|
tags: true
|
|
|
|
all_branches: true
|
2014-12-20 16:49:52 -04:00
|
|
|
repo: PX4/Firmware
|
2014-12-21 07:09:47 -04:00
|
|
|
|
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
|