aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml20
-rw-r--r--test/configs/atmega2560-16mhz.config4
-rw-r--r--test/configs/atmega328-16mhz.config4
-rw-r--r--test/configs/beaglebone.config2
-rw-r--r--test/configs/hostsimulator.config2
-rw-r--r--test/configs/linuxprocess.config2
-rw-r--r--test/configs/sam3x8e.config2
-rwxr-xr-xtest/travis-build.sh35
8 files changed, 71 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..a7230a03
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,20 @@
+language: c
+
+addons:
+ apt:
+ sourceline: 'ppa:team-gcc-arm-embedded/ppa'
+ packages:
+ - gcc-avr
+ - avr-libc
+ - wget
+
+env:
+ - TARGET=atmega2560-16mhz
+ - TARGET=atmega328-16mhz
+ # - TARGET=beaglebone needs pru-gcc (not out of the box available on Ubuntu)
+ - TARGET=hostsimulator
+ - TARGET=linuxprocess
+ - TARGET=sam3x8e GCC_SRC=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 GCC_DIR=gcc-arm-none-eabi-7-2017-q4-major
+
+script: ./test/travis-build.sh
+
diff --git a/test/configs/atmega2560-16mhz.config b/test/configs/atmega2560-16mhz.config
new file mode 100644
index 00000000..ec4d6cde
--- /dev/null
+++ b/test/configs/atmega2560-16mhz.config
@@ -0,0 +1,4 @@
+# Base config file for atmega2560
+CONFIG_MACH_AVR=y
+CONFIG_MACH_atmega2560=y
+CONFIG_CLOCK_FREQ=16000000
diff --git a/test/configs/atmega328-16mhz.config b/test/configs/atmega328-16mhz.config
new file mode 100644
index 00000000..b231660e
--- /dev/null
+++ b/test/configs/atmega328-16mhz.config
@@ -0,0 +1,4 @@
+# Base config file for atmega328
+CONFIG_MACH_AVR=y
+CONFIG_MACH_atmega328=y
+CONFIG_CLOCK_FREQ=16000000
diff --git a/test/configs/beaglebone.config b/test/configs/beaglebone.config
new file mode 100644
index 00000000..9e56034b
--- /dev/null
+++ b/test/configs/beaglebone.config
@@ -0,0 +1,2 @@
+# Base config file for beaglebone
+CONFIG_MACH_PRU=y
diff --git a/test/configs/hostsimulator.config b/test/configs/hostsimulator.config
new file mode 100644
index 00000000..49c2c4db
--- /dev/null
+++ b/test/configs/hostsimulator.config
@@ -0,0 +1,2 @@
+# Base config file for host simulator
+CONFIG_MACH_SIMU=y
diff --git a/test/configs/linuxprocess.config b/test/configs/linuxprocess.config
new file mode 100644
index 00000000..ec3a09ef
--- /dev/null
+++ b/test/configs/linuxprocess.config
@@ -0,0 +1,2 @@
+# Base config file for linux process
+CONFIG_MACH_LINUX=y
diff --git a/test/configs/sam3x8e.config b/test/configs/sam3x8e.config
new file mode 100644
index 00000000..a388f836
--- /dev/null
+++ b/test/configs/sam3x8e.config
@@ -0,0 +1,2 @@
+# Base config file for Atmel SAM3x8e ARM processor
+CONFIG_MACH_SAM3X8E=y
diff --git a/test/travis-build.sh b/test/travis-build.sh
new file mode 100755
index 00000000..58be7768
--- /dev/null
+++ b/test/travis-build.sh
@@ -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