diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a9cbf86 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: python + +python: + - 2.7 + +sudo: false + +cache: + directories: + - ~/.platformio + +# update Makefile if target boards added +env: + - PLATFORMIO_BOARD=uno + - PLATFORMIO_BOARD=due + - PLATFORMIO_BOARD=huzzah + - PLATFORMIO_BOARD=genuino101 + - PLATFORMIO_BOARD=teensy31 + +install: + - pip install -U platformio + +before_script: + - env + - echo $HOME + - echo $TRAVIS_BUILD_DIR + - ls -al $PWD + +script: + - make build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..536f874 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +#-------------------------------------------------------------------- settings +FIND := find +DIR := $(PWD)/examples +CRITERIA := \( -name "*.ino" -o -name "*.pde" \) +EACH_EXAMPLE := $(FIND) $(DIR) $(CRITERIA) -exec +BUILD := platformio ci +LIB := src + +#--------------------------------------------------------------------- targets +# update .travis.yml if target boards added +all: uno due huzzah genuino101 teensy31 + +uno due huzzah genuino101 teensy31: + PLATFORMIO_BOARD=$@ $(MAKE) build + +build: + $(EACH_EXAMPLE) $(BUILD) --board=$(PLATFORMIO_BOARD) --lib=$(LIB) {} \; + +.PHONY: all uno due huzzah genuino101 teensy31 build