Tools: Semaphoreci scripts build updated.

Build only for apm1 apm2 and sitl.
This commit is contained in:
hiro2233 2016-11-05 10:17:39 +00:00 committed by Andrew Tridgell
parent 681f6d39df
commit 7c3103d851
2 changed files with 8 additions and 57 deletions

View File

@ -15,32 +15,23 @@ rm -rf $BUILDROOT
# If CI_BUILD_TARGET is not set, default to all of them
if [ -z "$CI_BUILD_TARGET" ]; then
CI_BUILD_TARGET="sitl linux apm2 navio bebop"
CI_BUILD_TARGET="sitl apm1 apm2"
fi
declare -A build_platforms
declare -A build_concurrency
declare -A build_extra_clean
declare -A waf_supported_boards
build_platforms=( ["ArduPlane"]="apm2 navio bebop sitl linux"
["ArduCopter"]="navio bebop sitl linux"
["APMrover2"]="apm2 navio bebop sitl linux"
["AntennaTracker"]="apm2 navio bebop 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"
["bebop"]="-j2"
["apm1"]="-j2"
["sitl"]="-j2"
["linux"]="-j2")
build_extra_clean=(["px4-v2"]="make px4-cleandep")
#waf=modules/waf/waf-light
# get list of boards supported by the waf build
#for board in $($waf list_boards | head -n1); do waf_supported_boards[$board]=1; done
echo "Targets: $CI_BUILD_TARGET"
for t in $CI_BUILD_TARGET; do
@ -53,23 +44,9 @@ for t in $CI_BUILD_TARGET; do
pushd $v
make clean
if [ ${build_extra_clean[$t]+_} ]; then
${build_extra_clean[$t]}
fi
make $t ${build_concurrency[$t]}
popd
done
# if [[ -n ${waf_supported_boards[$t]} ]]; then
# echo "Starting waf build for board ${t}..."
# $waf configure --board $t
# $waf clean
# $waf ${build_concurrency[$t]} all
# if [[ $t == linux ]]; then
# $waf check
# fi
# fi
done
echo build OK

View File

@ -3,17 +3,11 @@
set -ex
PKGS="build-essential gawk ccache arduino-core curl genromfs libc6-i386 \
PKGS="build-essential gawk ccache arduino-core arduino curl genromfs libc6-i386 \
python-argparse python-empy python-serial zlib1g-dev gcc-4.9 g++-4.9"
AVR_PKGS="gcc-avr binutils-avr avr-libc"
ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
RPI_ROOT="master"
RPI_TARBALL="$RPI_ROOT.tar.gz"
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get -qq -y update
sudo apt-get -qq -y install $PKGS $AVR_PKGS
@ -25,20 +19,6 @@ pushd $HOME
mkdir -p $HOME/opt
pushd $HOME/opt
# PX4 toolchain
compiler=$ARM_ROOT
if [ ! -d "$HOME/opt/$compiler" ]; then
wget http://firmware.ardupilot.org/Tools/PX4-tools/$ARM_TARBALL
tar -xf $ARM_TARBALL
fi
# RPi/BBB toolchain
compiler="tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64"
if [ ! -d "$HOME/opt/$compiler" ]; then
wget http://firmware.ardupilot.org/Tools/Travis/NavIO/$RPI_TARBALL
tar -xf $RPI_TARBALL
fi
popd
mkdir -p $HOME/bin
@ -46,14 +26,8 @@ mkdir -p $HOME/bin
# configure ccache
ln -s /usr/bin/ccache ~/bin/g++
ln -s /usr/bin/ccache ~/bin/gcc
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/arm-linux-gnueabihf-g++
ln -s /usr/bin/ccache ~/bin/arm-linux-gnueabihf-gcc
exportline="export PATH=$HOME/bin:"
exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-4_9-2015q3/bin:"
exportline="${exportline}:$HOME/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:"
exportline="${exportline}:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then