Skip to content

Commit

Permalink
Fix #1 add continuous integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
4-20ma committed Sep 26, 2016
1 parent 8abc2f5 commit 8c3d12f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .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
19 changes: 19 additions & 0 deletions 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

0 comments on commit 8c3d12f

Please sign in to comment.