Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1 add continuous integration testing
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |