test: Add travis CI

Signed-off-by: Sebastian Meyer <ich@sebmeyer.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Sebastian Meyer 2018-02-01 22:49:50 +01:00 committed by Kevin O'Connor
parent 58dd6d9106
commit a6b0649cb1
8 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# Base config file for atmega2560
CONFIG_MACH_AVR=y
CONFIG_MACH_atmega2560=y
CONFIG_CLOCK_FREQ=16000000

View file

@ -0,0 +1,4 @@
# Base config file for atmega328
CONFIG_MACH_AVR=y
CONFIG_MACH_atmega328=y
CONFIG_CLOCK_FREQ=16000000

View file

@ -0,0 +1,2 @@
# Base config file for beaglebone
CONFIG_MACH_PRU=y

View file

@ -0,0 +1,2 @@
# Base config file for host simulator
CONFIG_MACH_SIMU=y

View file

@ -0,0 +1,2 @@
# Base config file for linux process
CONFIG_MACH_LINUX=y

View file

@ -0,0 +1,2 @@
# Base config file for Atmel SAM3x8e ARM processor
CONFIG_MACH_SAM3X8E=y

35
test/travis-build.sh Executable file
View file

@ -0,0 +1,35 @@
#!/bin/bash
set -eux
if [ -z ${TARGET+x} ]; then
if [ -z ${1+x} ]; then
echo "Need a TARGET as environment variable or first parameter!"
exit 1
else
TARGET="$1"
fi
fi
echo "Target is '$TARGET'"
make clean
make distclean
unset CC
cp test/configs/${TARGET}.config .config
make olddefconfig
if [ ! -z ${GCC_SRC+x} ]; then
if [ -z ${GCC_DIR+x} ]; then
echo "Need a GCC_DIR together with GCC_SRC!"
exit 1
fi
if [ -e "$GCC_DIR" ]; then
echo "Reusing GCC in '$GCC_DIR'"
else
echo "Getting GCC from '$GCC_SRC'"
wget "$GCC_SRC"
echo "Unpacking GCC to '$GCC_DIR'"
tar xf $(basename "$GCC_SRC")
fi
export PATH=$GCC_DIR/bin:$PATH
fi
make V=1