Tools: Travis scripts build updated.

Build only for apm1 apm2 and sitl.
This commit is contained in:
hiro2233 2016-11-05 11:02:25 +00:00 committed by Andrew Tridgell
parent 7c3103d851
commit 5703981f34
3 changed files with 15 additions and 68 deletions

View File

@ -1,3 +1,4 @@
dist: trusty
language: cpp
sudo: required
@ -21,7 +22,7 @@ env:
# via the "travis encrypt" command using the project repo's public key
- secure: "FjIwqZQV2FhNPWYITX5LZXTE38yYqBaQdbm3QmbEg/30wnPTm1ZOLIU7o/aSvX615ImR8kHoryvFPDQDWc6wWfqTEs3Ytq2kIvcIJS2Y5l/0PFfpWJoH5gRd6hDThnoi+1oVMLvj1+bhn4yFlCCQ2vT/jxoGfiQqqgvHtv4fLzI="
matrix:
- TRAVIS_BUILD_TARGET="sitl linux apm2 navio"
- TRAVIS_BUILD_TARGET="sitl apm2 apm1"
addons:
coverity_scan:

View File

@ -12,21 +12,21 @@ set -x
# If TRAVIS_BUILD_TARGET is not set, default to all of them
if [ -z "$TRAVIS_BUILD_TARGET" ]; then
TRAVIS_BUILD_TARGET="sitl linux apm2 navio"
TRAVIS_BUILD_TARGET="sitl apm2 apm1"
fi
declare -A build_platforms
declare -A build_concurrency
declare -A build_extra_clean
build_platforms=( ["ArduPlane"]="apm2 navio sitl linux"
["ArduCopter"]="navio sitl linux"
["APMrover2"]="apm2 navio sitl linux"
["AntennaTracker"]="apm2 navio sitl linux"
build_platforms=( ["ArduPlane"]="apm1 apm2 sitl"
["ArduCopter"]="sitl"
["APMrover2"]="apm1 apm2 sitl"
["AntennaTracker"]="apm1 apm2 sitl"
["Tools/Replay"]="linux")
build_concurrency=(["apm2"]="-j2"
["navio"]="-j2"
["apm1"]="-j2"
["sitl"]="-j2"
["linux"]="-j2")

View File

@ -8,33 +8,21 @@ CWD=$(pwd)
OPT="$HOME/opt"
echo "PATH=$PATH"
BASE_PKGS="gawk make git arduino-core curl"
BASE_PKGS="gawk make git arduino-core arduino curl"
SITL_PKGS="g++ python-pip python-matplotlib python-serial python-wxgtk2.8 python-scipy python-opencv python-numpy python-pyparsing ccache python-empy"
AVR_PKGS="gcc-avr binutils-avr avr-libc"
PYTHON_PKGS="pymavlink MAVProxy catkin_pkg"
PX4_PKGS="python-serial python-argparse openocd flex bison libncurses5-dev \
autoconf texinfo build-essential libftdi-dev libtool zlib1g-dev \
zip genromfs"
UBUNTU64_PKGS="libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386 gcc-multilib"
# We do not make ARM builds on master-AVR branch.
# GNU Tools for ARM Embedded Processors
# (see https://launchpad.net/gcc-arm-embedded/)
ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
ARM_TARBALL_URL="http://firmware.ardupilot.org/Tools/PX4-tools/$ARM_TARBALL"
RPI_ROOT="master"
RPI_TARBALL="$RPI_ROOT.tar.gz"
RPI_TARBALL_URL="http://firmware.ardupilot.org/Tools/Travis/NavIO/$RPI_TARBALL"
UBUNTU64_PKGS="libc6-i386"
# Ardupilot Tools
ARDUPILOT_TOOLS="ardupilot/Tools/autotest"
APT_GET="sudo apt-get -qq --assume-yes"
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
$APT_GET update
$APT_GET install $BASE_PKGS $SITL_PKGS $PX4_PKGS $UBUNTU64_PKGS $AVR_PKGS
$APT_GET install $BASE_PKGS $SITL_PKGS $UBUNTU64_PKGS $AVR_PKGS
sudo pip install --upgrade pip || {
echo "pip upgrade failed"
}
@ -46,60 +34,18 @@ for pkg in $PYTHON_PKGS; do
sudo pip -q install $pkg || echo "FAILED INSTALL OF $pkg"
done
# install some extra packages (for later AVR compiler)
rsync -av firmware.ardupilot.org::Tools/Travis/*.deb ExtraPackages
sudo dpkg -i ExtraPackages/*.deb || echo "FAILED INSTALL OF EXTRA DEBS"
# try to upgrade to g++ 4.8. See https://github.com/travis-ci/travis-ci/issues/1379
(sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test &&
sudo apt-get -qq update &&
sudo apt-get -qq install g++-4.8 &&
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90) || {
echo "upgrade to gcc 4.8 failed"
sudo apt-get -qq install g++-4.9 &&
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90) || {
echo "upgrade to gcc 4.9 failed"
}
if [ ! -d PX4Firmware ]; then
git clone https://github.com/ArduPilot/PX4Firmware.git
fi
if [ ! -d PX4NuttX ]; then
git clone https://github.com/ArduPilot/PX4NuttX.git
fi
if [ ! -d uavcan ]; then
git clone https://github.com/ArduPilot/uavcan.git
fi
if [ ! -d VRNuttX ]; then
git clone https://github.com/virtualrobotix/vrbrain_nuttx.git VRNuttX
fi
mkdir -p $OPT
cd $OPT
wget $ARM_TARBALL_URL
tar xjf ${ARM_TARBALL}
rm -f ${ARM_TARBALL}
cd $OPT
wget $RPI_TARBALL_URL
tar xzf ${RPI_TARBALL}
rm -f ${RPI_TARBALL}
exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH";
echo $exportline >> ~/.profile
exportline2="export PATH=$CWD/$ARDUPILOT_TOOLS:\$PATH";
echo $exportline2 >> ~/.profile
exportline3="export PATH=$OPT/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:\$PATH";
echo $exportline3 >> ~/.profile
. ~/.profile
echo $PATH
ls -l $OPT/$ARM_ROOT/bin
$OPT/$ARM_ROOT/bin/arm-none-eabi-gcc --version
echo "Compiler for NavIO"
arm-linux-gnueabihf-gcc --version