forked from Archive/PX4-Autopilot
travis-ci optimizations (#4870)
* move gcc 4.9 build to circleci * travis-ci update to xcode 7.3 * travis-ci limit git fetching for OSX * Makefile split firmware targets for CI * OSX ccache
This commit is contained in:
parent
56ddd29f1a
commit
b247dac120
34
.travis.yml
34
.travis.yml
|
@ -3,11 +3,6 @@
|
|||
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
global:
|
||||
# build thiemar/vectorcontrol.git and include in px4fmu-v4
|
||||
- VECTORCONTROL=1
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
|
@ -16,30 +11,31 @@ matrix:
|
|||
env: GCC_VER=4.8 DOCKER_REPO="px4io/px4-dev-base"
|
||||
services:
|
||||
- docker
|
||||
- os: linux
|
||||
sudo: required
|
||||
env: GCC_VER=4.9 DOCKER_REPO="px4io/px4-dev-nuttx-gcc4.9"
|
||||
services:
|
||||
- docker
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
sudo: true
|
||||
osx_image: xcode7.3
|
||||
env: CCACHE_CPP2=1
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
pip: true
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
- $HOME/.pip/cache/
|
||||
- $HOME/Library/Caches/pip
|
||||
|
||||
before_install:
|
||||
- cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags && git submodule update --quiet --init --recursive
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
docker pull ${DOCKER_REPO};
|
||||
git fetch --unshallow && git fetch --all --tags
|
||||
&& docker pull ${DOCKER_REPO}
|
||||
;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
brew tap PX4/homebrew-px4
|
||||
&& brew update; brew update
|
||||
&& brew install cmake ninja
|
||||
&& brew install genromfs
|
||||
&& brew update
|
||||
&& brew update
|
||||
&& brew install ccache cmake ninja genromfs
|
||||
&& sudo easy_install pip
|
||||
&& sudo pip install empy
|
||||
&& export PATH=/usr/local/opt/ccache/libexec:$PATH
|
||||
;
|
||||
fi
|
||||
|
||||
|
@ -52,11 +48,13 @@ env:
|
|||
- PX4_AWS_BUCKET=px4-travis
|
||||
|
||||
script:
|
||||
- ccache -M 1GB; ccache -z
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -w=`pwd` --user=$UID -it ${DOCKER_REPO} /bin/bash -c "make qgc_firmware";
|
||||
docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -w=`pwd` --user=$UID -it ${DOCKER_REPO} /bin/bash -c "make check_qgc_firmware VECTORCONTROL=1";
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
make check_posix_sitl_default;
|
||||
fi
|
||||
- ccache -s
|
||||
|
||||
after_success:
|
||||
- make package_firmware && mkdir s3deploy-archive && cp Firmware.zip s3deploy-archive/
|
||||
|
|
9
Makefile
9
Makefile
|
@ -289,7 +289,9 @@ endif
|
|||
unittest: posix_sitl_test
|
||||
$(call cmake-build-other,unittest, ../unittests)
|
||||
@(cd build_unittest && ctest -j2 --output-on-failure)
|
||||
|
||||
|
||||
tests: posix_sitl_test unittest
|
||||
|
||||
test_onboard_sitl:
|
||||
@HEADLESS=1 make posix_sitl_test gazebo_iris
|
||||
|
||||
|
@ -301,6 +303,11 @@ qgc_firmware: \
|
|||
check_mindpx-v2_default \
|
||||
check_px4fmu-v4_default_and_uavcan
|
||||
|
||||
extra_firmware: \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_px4fmu-v2_test \
|
||||
check_px4fmu-v2_ekf2
|
||||
|
||||
package_firmware:
|
||||
@zip --junk-paths Firmware.zip `find . -name \*.px4`
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ checkout:
|
|||
## Customize dependencies
|
||||
dependencies:
|
||||
pre:
|
||||
- docker pull px4io/px4-dev-base
|
||||
- docker pull px4io/px4-dev-nuttx-gcc4.9
|
||||
- docker info
|
||||
|
||||
test:
|
||||
override:
|
||||
#- sudo docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -w=`pwd` --user=$UID -it px4io/px4-dev-base /bin/bash -c "make"
|
||||
- docker run -v `pwd`:`pwd`:rw -w=`pwd` --user=$UID -it px4io/px4-dev-base /bin/bash -c "make"
|
||||
- docker run -v `pwd`:`pwd`:rw -w=`pwd` --user=$UID -it px4io/px4-dev-nuttx-gcc4.9 /bin/bash -c "make px4fmu-v4_default"
|
||||
|
|
Loading…
Reference in New Issue