From 7486a2b1565f0d48d3b6b4df1d7783aafa8fc90c Mon Sep 17 00:00:00 2001 From: "Konstantin Sharlaimov (DigitalEntity)" Date: Sun, 29 Jan 2017 18:08:35 +1000 Subject: [PATCH] Run unittests each travis build --- .travis.sh | 2 ++ .travis.yml | 26 ++++++++++++-------------- Makefile | 6 ++++++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.travis.sh b/.travis.sh index 128e45372..379def6d6 100755 --- a/.travis.sh +++ b/.travis.sh @@ -63,6 +63,8 @@ elif [ $TARGET ] ; then else make -j2 $MAKEFILE fi +elif [ $GOAL ] ; then + make V=0 $GOAL else # No target specified, build all with very low verbosity. make V=0 all diff --git a/.travis.yml b/.travis.yml index 654f43366..2d3b717b6 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,9 @@ env: +# Specify the main Mafile supported goals. + - GOAL=test + - GOAL=all # - TARGET=CC3D -# - TARGET=CJMCU -# - TARGET=NAZE -# - TARGET=STM32F3DISCOVERY -# - TARGET=RMDO -# - TARGET=SPRACINGF3 -# - TARGET=SPRACINGF3EVO -# - TARGET=SPARKY -# - TARGET=FURYF3 -# - TARGET=RCEXPLORERF3 -# - TARGET=REVO - + # use new docker environment sudo: false @@ -28,12 +21,17 @@ addons: language: cpp compiler: clang -before_install: ./install-toolchain.sh +before_install: install: - - export PATH=$PATH:$PWD/gcc-arm-none-eabi-6_2-2016q4/bin + - ./install-toolchain.sh + - export TOOLCHAINPATH=$PWD/gcc-arm-none-eabi-6_2-2016q4/bin + +before_script: + - $TOOLCHAINPATH/arm-none-eabi-gcc --version + - clang --version + - clang++ --version -before_script: arm-none-eabi-gcc --version script: ./.travis.sh cache: diff --git a/Makefile b/Makefile index 998a5a6f8..315f78b8f 100644 --- a/Makefile +++ b/Makefile @@ -743,9 +743,15 @@ VPATH := $(VPATH):$(STDPERIPH_DIR)/src # # Tool names +ifneq ($(TOOLCHAINPATH),) +CC = $(TOOLCHAINPATH)/arm-none-eabi-gcc +OBJCOPY = $(TOOLCHAINPATH)/arm-none-eabi-objcopy +SIZE = $(TOOLCHAINPATH)/arm-none-eabi-size +else CC = arm-none-eabi-gcc OBJCOPY = arm-none-eabi-objcopy SIZE = arm-none-eabi-size +endif # # Tool options.