px4-firmware/.travis.yml

150 lines
5.7 KiB
YAML
Raw Normal View History

# Build and autotest script for PX4 Firmware
# http://travis-ci.org
language: cpp
2015-09-13 14:53:47 -03:00
matrix:
fast_finish: true
2015-09-13 14:53:47 -03:00
include:
- os: linux
sudo: false
- os: osx
osx_image: xcode7
2015-10-17 01:47:16 -03:00
sudo: true
cache:
directories:
- $HOME/.ccache
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
2015-10-25 07:59:42 -03:00
- george-edison55-precise-backports
packages:
- build-essential
- ccache
- clang-3.5
2015-10-25 07:59:42 -03:00
- cmake
2016-01-08 21:07:27 -04:00
- g++-4.9
- gcc-4.9
- genromfs
- libc6-i386
- libncurses5-dev
2015-10-17 01:47:16 -03:00
- ninja-build
- python-argparse
- python-empy
- python-serial
- s3cmd
- texinfo
- zlib1g-dev
2015-09-13 14:53:47 -03:00
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
&& git clone git://github.com/PX4/CI-Tools.git
&& ./CI-Tools/s3cmd-configure
2015-09-13 14:53:47 -03:00
&& 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
2016-01-08 21:07:27 -04:00
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
2015-09-13 14:53:47 -03:00
;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew tap PX4/homebrew-px4
2015-11-24 04:03:55 -04:00
&& brew update; brew update
2015-11-18 06:57:01 -04:00
&& brew install cmake ninja astyle gcc-arm-none-eabi
2015-09-13 14:53:47 -03:00
&& brew install genromfs
&& brew install kconfig-frontends
&& sudo easy_install pip
&& sudo pip install pyserial empy
;
fi
before_script:
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
2015-10-24 07:12:18 -03:00
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-size
2015-10-24 07:22:45 -03:00
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-objcopy
2015-08-29 19:22:52 -03:00
- 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
2015-04-17 23:27:36 -03:00
- export PATH=~/bin:$PATH
2014-12-20 19:50:06 -04:00
env:
global:
2015-10-17 01:47:16 -03:00
- NINJA_BUILD=1
# 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:
2016-01-12 05:18:05 -04:00
- git submodule update --init --recursive
2015-10-06 16:26:19 -03:00
- make check_format
- arm-none-eabi-gcc --version
2015-10-24 17:22:29 -03:00
- echo 'Building POSIX Firmware..' && make posix_sitl_default
- echo 'Running Tests..' && make posix_sitl_default test
2015-12-06 07:00:22 -04:00
- echo 'Running Unittests..' && cd unittests && ./run_tests.sh
- cd ..
2015-10-17 01:47:16 -03:00
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
2015-12-24 05:51:08 -04:00
# Only provide UAVCAN firmware binaries for Pixracer and Pixhawk 3
2015-12-24 06:29:56 -04:00
- echo 'Building UAVCAN node firmware..' && git clone https://github.com/thiemar/vectorcontrol
- cd vectorcontrol
- BOARD=s2740vc_1_0 make && BOARD=px4esc_1_6 make
2015-12-24 05:51:08 -04:00
- ../Tools/uavcan_copy.sh
2015-12-24 06:29:56 -04:00
- cd ..
2015-12-03 11:10:14 -04:00
- echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
- echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
2015-10-17 01:47:16 -03:00
- echo 'Running Tests..' && make px4fmu-v2_default test
2015-09-10 03:21:40 -03:00
2015-10-17 11:33:18 -03:00
after_success:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cp build_px4fmu-v1_default/src/firmware/nuttx/nuttx-px4fmu-v1-default.px4 px4fmu-v1_default.px4
&& cp build_px4fmu-v2_default/src/firmware/nuttx/nuttx-px4fmu-v2-default.px4 px4fmu-v2_default.px4
2015-12-03 12:23:47 -04:00
&& cp build_px4fmu-v4_default/src/firmware/nuttx/nuttx-px4fmu-v4-default.px4 px4fmu-v4_default.px4
&& cp build_px4-stm32f4discovery_default/src/firmware/nuttx/nuttx-px4-stm32f4discovery-default.px4 px4-stm32f4discovery-default.px4
&& zip Firmware.zip px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 px4-stm32f4discovery-default.px4
&& ./CI-Tools/s3cmd-put px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 px4-stm32f4discovery-default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
2015-10-17 11:33:18 -03:00
&& ./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/
&& ./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
;
fi
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-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