2016-12-02 15:46:02 +01:00
|
|
|
# Workaround for the issue found in the stable image promoted on Dec 1, 2016.
|
|
|
|
# See https://github.com/travis-ci/travis-ci/issues/6928#issuecomment-264227708
|
|
|
|
group: deprecated
|
|
|
|
|
2013-01-10 08:16:20 +01:00
|
|
|
notifications:
|
|
|
|
email: false
|
2012-11-12 23:26:17 +01:00
|
|
|
language: c #NOTE: this will set CC=gcc which might cause trouble
|
|
|
|
before_script:
|
2014-07-05 21:18:00 +02:00
|
|
|
- WGET="travis_retry wget --continue --tries=20 --waitretry=10 --retry-connrefused --no-dns-cache --timeout 300"
|
2014-07-05 21:08:54 +02:00
|
|
|
- sudo apt-get -qq update
|
|
|
|
|
2014-10-14 10:03:28 +02:00
|
|
|
## Support building a binary that is identical to the CI
|
2014-10-14 10:00:28 +02:00
|
|
|
- echo -n "Contiki will be compiled with RELSTR=" ; git --git-dir .git describe --tags --always
|
|
|
|
|
2014-11-18 17:43:38 +01:00
|
|
|
## Install doxygen
|
|
|
|
- if [ ${BUILD_CATEGORY:-0} = doxygen ] ; then
|
2015-08-08 02:04:12 +02:00
|
|
|
sudo add-apt-repository ppa:libreoffice/libreoffice-4-4 -y && sudo apt-get -qq update &&
|
2014-11-18 17:43:38 +01:00
|
|
|
sudo apt-get --no-install-suggests --no-install-recommends -qq install doxygen &&
|
|
|
|
doxygen --version ;
|
|
|
|
fi
|
|
|
|
|
2014-07-05 21:08:54 +02:00
|
|
|
## Install msp430 toolchain
|
|
|
|
- sudo apt-get -qq install lib32z1
|
2015-08-20 10:09:45 +02:00
|
|
|
- $WGET http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 &&
|
2014-07-05 21:18:00 +02:00
|
|
|
tar xjf mspgcc*.tar.bz2 -C /tmp/ &&
|
|
|
|
sudo cp -f -r /tmp/msp430/* /usr/local/ &&
|
|
|
|
rm -rf /tmp/msp430 mspgcc*.tar.bz2 &&
|
|
|
|
msp430-gcc --version
|
2014-07-05 21:08:54 +02:00
|
|
|
|
|
|
|
## Install avr toolchain
|
2016-02-22 20:50:49 +01:00
|
|
|
- $WGET http://atiselsts.github.io/resources/avr-gcc-4.9.2-compiled.tar.bz2 &&
|
|
|
|
tar xjf avr-gcc*.tar.bz2 -C /tmp/ &&
|
|
|
|
sudo cp -f -r /tmp/avr-gcc/* /usr/local/ &&
|
|
|
|
rm -rf /tmp/avr-gcc avr-gcc*.tar.bz2 &&
|
|
|
|
avr-gcc --version
|
2014-07-05 21:08:54 +02:00
|
|
|
|
|
|
|
## Install 32-bit compatibility libraries
|
|
|
|
- sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386
|
|
|
|
libstdc++5:i386 libstdc++6:i386
|
2013-08-07 13:55:33 +02:00
|
|
|
|
2015-02-17 01:04:34 +01:00
|
|
|
## Install old APCS ARM toolchain for mc1233x and mbxxx
|
2014-07-06 03:40:01 +02:00
|
|
|
- if [ ${BUILD_ARCH:-0} = arm-apcs ] ; then
|
2014-07-05 21:18:00 +02:00
|
|
|
$WGET https://raw.githubusercontent.com/wiki/malvira/libmc1322x/files/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 &&
|
|
|
|
tar xjf arm-2008q3*.tar.bz2 -C /tmp/ &&
|
2014-07-05 21:08:54 +02:00
|
|
|
sudo cp -f -r /tmp/arm-2008q3/* /usr/ &&
|
2014-07-05 21:18:00 +02:00
|
|
|
rm -rf /tmp/arm-2008q3 arm-2008q3*.tar.bz2 &&
|
2015-09-14 14:19:42 +02:00
|
|
|
sudo apt-get -qq install libconfig-dev uuid-dev libqrencode-dev &&
|
2014-07-05 21:08:54 +02:00
|
|
|
arm-none-eabi-gcc --version ;
|
|
|
|
fi
|
2013-08-07 13:55:33 +02:00
|
|
|
|
2016-04-06 15:02:51 +02:00
|
|
|
## Install mainline ARM toolchain and srecord.
|
2015-02-17 01:07:07 +01:00
|
|
|
- if [ ${BUILD_ARCH:-0} = arm-aapcs ] ; then
|
2016-04-06 15:02:51 +02:00
|
|
|
sudo apt-get -qq install srecord &&
|
|
|
|
$WGET https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 &&
|
|
|
|
tar xjf gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 -C /tmp/ &&
|
|
|
|
sudo cp -f -r /tmp/gcc-arm-none-eabi-5_2-2015q4/* /usr/local/ &&
|
|
|
|
rm -rf /tmp/gcc-arm-none-eabi-* gcc-arm-none-eabi-*-linux.tar.bz2 &&
|
2014-07-06 03:48:56 +02:00
|
|
|
arm-none-eabi-gcc --version ;
|
|
|
|
fi
|
|
|
|
|
2014-07-05 21:08:54 +02:00
|
|
|
## Install RL78 GCC toolchain
|
|
|
|
- sudo apt-get install libncurses5:i386 zlib1g:i386
|
2014-07-05 21:18:00 +02:00
|
|
|
- $WGET http://adamdunkels.github.io/contiki-fork/gnurl78-v13.02-elf_1-2_i386.deb &&
|
|
|
|
sudo dpkg -i gnurl78*.deb
|
2014-01-05 00:56:51 +01:00
|
|
|
|
2012-12-16 20:26:29 +01:00
|
|
|
## Install SDCC from a purpose-built bundle
|
2014-07-05 21:08:54 +02:00
|
|
|
- if [ ${BUILD_ARCH:-0} = 8051 ] ; then
|
2014-07-05 21:18:00 +02:00
|
|
|
$WGET https://raw.githubusercontent.com/wiki/g-oikonomou/contiki-sensinode/files/sdcc.tar.gz &&
|
|
|
|
tar xzf sdcc.tar.gz -C /tmp/ &&
|
2014-07-05 21:08:54 +02:00
|
|
|
sudo cp -f -r /tmp/sdcc/* /usr/local/ &&
|
2014-07-05 21:18:00 +02:00
|
|
|
rm -rf /tmp/sdcc sdcc.tar.gz &&
|
2014-07-05 21:08:54 +02:00
|
|
|
sdcc --version &&
|
|
|
|
sudo apt-get -qq install srecord ;
|
|
|
|
fi
|
2014-01-05 00:56:51 +01:00
|
|
|
|
2013-11-20 13:54:14 +01:00
|
|
|
## Clone and build cc65 when testing 6502 ports
|
2014-07-05 21:08:54 +02:00
|
|
|
- if [ ${BUILD_ARCH:-0} = 6502 ] ; then
|
|
|
|
git clone https://github.com/cc65/cc65 /tmp/cc65 &&
|
|
|
|
make -C /tmp/cc65 bin apple2enh atarixl c64 c128 &&
|
|
|
|
sudo make -C /tmp/cc65 avail &&
|
|
|
|
cc65 --version ;
|
|
|
|
fi
|
2012-12-16 20:26:29 +01:00
|
|
|
|
2015-09-21 11:02:16 +02:00
|
|
|
## Install NXP toolchain
|
|
|
|
- if [ ${BUILD_ARCH:-0} = jn516x ] ; then
|
|
|
|
$WGET http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 &&
|
|
|
|
$WGET http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part2.tar.bz2 &&
|
2017-03-08 11:24:35 +01:00
|
|
|
$WGET http://simonduq.github.io/resources/jn516x-sdk-4163-1416.tar.bz2 &&
|
2015-09-21 11:02:16 +02:00
|
|
|
mkdir /tmp/jn516x-sdk /tmp/ba-elf-gcc &&
|
|
|
|
tar xjf jn516x-sdk-*.tar.bz2 -C /tmp/jn516x-sdk &&
|
|
|
|
tar xjf ba-elf-gcc-*part1.tar.bz2 -C /tmp/ba-elf-gcc &&
|
|
|
|
tar xjf ba-elf-gcc-*part2.tar.bz2 -C /tmp/ba-elf-gcc &&
|
|
|
|
sudo cp -f -r /tmp/jn516x-sdk /usr/ &&
|
|
|
|
sudo cp -f -r /tmp/ba-elf-gcc /usr/ &&
|
|
|
|
export PATH=/usr/ba-elf-gcc/bin:$PATH &&
|
|
|
|
rm -rf /tmp/ba-elf-gcc* /tmp/jn516x-sdk* &&
|
|
|
|
ba-elf-gcc --version ;
|
|
|
|
fi
|
2016-01-22 11:13:07 +01:00
|
|
|
|
|
|
|
## Install mainline ARM toolchain and download nRF52 SDK
|
|
|
|
- if [ ${BUILD_ARCH:-0} = nrf52dk ] ; then
|
2016-06-02 09:32:24 +02:00
|
|
|
sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa &&
|
2016-01-22 11:13:07 +01:00
|
|
|
sudo apt-get -qq update &&
|
2016-06-02 09:32:24 +02:00
|
|
|
sudo apt-get -qq install gcc-arm-embedded srecord &&
|
2016-01-22 11:13:07 +01:00
|
|
|
arm-none-eabi-gcc --version &&
|
|
|
|
$WGET https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip &&
|
|
|
|
mkdir /tmp/nrf52-sdk &&
|
|
|
|
unzip nrf5_iot_sdk_3288530.zip -d /tmp/nrf52-sdk &&
|
|
|
|
export NRF52_SDK_ROOT=/tmp/nrf52-sdk ;
|
|
|
|
fi
|
2015-09-21 11:02:16 +02:00
|
|
|
|
2012-11-13 01:07:04 +01:00
|
|
|
## Compile cooja.jar only when it's going to be needed
|
2014-07-05 21:08:54 +02:00
|
|
|
- if [ ${BUILD_CATEGORY:-sim} = sim ] ; then
|
|
|
|
java -version &&
|
|
|
|
ant -q -f tools/cooja/build.xml jar &&
|
|
|
|
sudo java -Xshare:dump -version ;
|
|
|
|
fi
|
2012-11-12 23:26:17 +01:00
|
|
|
|
|
|
|
script:
|
2013-08-07 13:55:33 +02:00
|
|
|
## regression-tests/Makefile handles most of generic logic
|
2012-12-08 22:59:48 +01:00
|
|
|
- "make -C regression-tests/??-$BUILD_TYPE RUNALL=true summary"
|
2012-11-12 23:26:17 +01:00
|
|
|
|
|
|
|
after_script:
|
2013-05-18 03:07:12 +02:00
|
|
|
## Print cooja test logs
|
2013-08-07 15:50:48 +02:00
|
|
|
- "[ ${BUILD_CATEGORY:-sim} = sim ] && tail regression-tests/??-$BUILD_TYPE/*.testlog"
|
2014-07-06 03:48:56 +02:00
|
|
|
## Print a basic summary
|
2012-12-08 22:59:48 +01:00
|
|
|
- "echo 'Summary:'; cat regression-tests/??-$BUILD_TYPE/summary"
|
2014-10-08 10:59:59 +02:00
|
|
|
- "FAILS=`grep -c ' FAIL ' regression-tests/??-$BUILD_TYPE/summary`"
|
2012-11-12 23:26:17 +01:00
|
|
|
## This will detect whether the build should pass or fail
|
2012-12-17 12:34:58 +01:00
|
|
|
- "test $FAILS -eq 0; exit $?"
|
2012-11-12 23:26:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
## This magically kick-off parallel jobs for each of the for the sets
|
|
|
|
## of environment variable defined below
|
2014-11-18 17:43:38 +01:00
|
|
|
- BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen'
|
2013-08-07 13:55:33 +02:00
|
|
|
- BUILD_TYPE='compile-base' BUILD_CATEGORY='compile'
|
2015-05-11 08:41:05 +02:00
|
|
|
- BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile'
|
2013-03-25 00:28:24 +01:00
|
|
|
- BUILD_TYPE='collect'
|
|
|
|
- BUILD_TYPE='collect-lossy'
|
|
|
|
- BUILD_TYPE='rpl'
|
2016-02-03 19:12:48 +01:00
|
|
|
- BUILD_TYPE='rpl-non-storing'
|
2015-08-26 16:45:43 +02:00
|
|
|
- BUILD_TYPE='large-rpl'
|
2013-03-25 00:28:24 +01:00
|
|
|
- BUILD_TYPE='rime'
|
|
|
|
- BUILD_TYPE='ipv6'
|
2015-03-24 15:04:30 +01:00
|
|
|
- BUILD_TYPE='ip64' MAKE_TARGETS='cooja'
|
2013-03-25 00:28:24 +01:00
|
|
|
- BUILD_TYPE='hello-world'
|
|
|
|
- BUILD_TYPE='base'
|
2013-05-19 15:59:02 +02:00
|
|
|
# XXX: netperf disabled b/c it's flaky
|
|
|
|
# - BUILD_TYPE='netperf' MAKE_TARGETS='cooja'
|
2013-03-25 00:28:24 +01:00
|
|
|
- BUILD_TYPE='shell'
|
|
|
|
- BUILD_TYPE='elfloader'
|
2013-08-30 11:39:59 +02:00
|
|
|
# Tests under the ipv4 dir are individually disabled. Thus the entire job can be off
|
|
|
|
# - BUILD_TYPE='ipv4'
|
2013-03-25 00:28:24 +01:00
|
|
|
- BUILD_TYPE='ipv6-apps'
|
2013-08-07 13:55:33 +02:00
|
|
|
- BUILD_TYPE='compile-8051-ports' BUILD_CATEGORY='compile' BUILD_ARCH='8051'
|
2014-07-06 03:40:01 +02:00
|
|
|
- BUILD_TYPE='compile-arm-apcs-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-apcs'
|
2013-11-20 13:54:14 +01:00
|
|
|
- BUILD_TYPE='compile-6502-ports' BUILD_CATEGORY='compile' BUILD_ARCH='6502'
|
2015-02-17 01:07:07 +01:00
|
|
|
- BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs'
|
2015-09-21 11:02:16 +02:00
|
|
|
- BUILD_TYPE='compile-nxp-ports' BUILD_CATEGORY='compile' BUILD_ARCH='jn516x'
|
2016-01-22 11:13:07 +01:00
|
|
|
- BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='nrf52dk'
|
2013-03-12 02:06:58 +01:00
|
|
|
- BUILD_TYPE='slip-radio' MAKE_TARGETS='cooja'
|
2014-06-11 21:06:42 +02:00
|
|
|
- BUILD_TYPE='llsec' MAKE_TARGETS='cooja'
|
2016-02-22 20:50:49 +01:00
|
|
|
- BUILD_TYPE='compile-avr' BUILD_CATEGORY='compile' BUILD_ARCH='avr-rss2'
|
2016-10-31 16:18:02 +01:00
|
|
|
- BUILD_TYPE='ieee802154'
|