-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #78 Use platformio to build multiple boards
- Loading branch information
Showing
3 changed files
with
46 additions
and
67 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 |
---|---|---|
@@ -1,19 +1,30 @@ | ||
language: c | ||
before_install: | ||
- export ARDUINO_VERSION=1.6.5 | ||
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16" | ||
- sleep 3 | ||
- export DISPLAY=:1.0 | ||
- wget http://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz | ||
- tar xf arduino-${ARDUINO_VERSION}-linux64.tar.xz | ||
- sudo mv arduino-${ARDUINO_VERSION} /usr/local/share/arduino | ||
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino | ||
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: | ||
- ln -s ${PWD} /usr/local/share/arduino/libraries/ModbusMaster | ||
- arduino --pref "compiler.warning_level=all" --save-prefs | ||
script: | ||
- echo $PWD | ||
- pip install -U platformio | ||
|
||
before_script: | ||
- env | ||
- echo $HOME | ||
- echo $TRAVIS_BUILD_DIR | ||
- ls -al $PWD | ||
- source ${TRAVIS_BUILD_DIR}/travis/common.sh | ||
- build_examples | ||
|
||
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 := . | ||
|
||
#--------------------------------------------------------------------- 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 |
This file was deleted.
Oops, something went wrong.