-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[travis] Add travis and build targets
- Loading branch information
Showing
2 changed files
with
65 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,24 @@ | ||
language: c | ||
before_install: | ||
- pushd .. | ||
- wget http://downloads.arduino.cc/arduino-1.6.7-linux64.tar.xz | ||
- tar xf arduino-1.6.7-linux64.tar.xz | ||
- popd | ||
script: | ||
- make smoke ARDUINO_PATH=../arduino-1.6.7 ARDUINO_LOCAL_LIB_PATH=.. | ||
|
||
notifications: | ||
irc: | ||
channels: | ||
- "chat.freenode.net#keyboardio" | ||
use_notice: true | ||
skip_join: true | ||
template: | ||
- "%{repository_name}/%{branch} %{commit} by %{author}: %{commit_subject} %{build_url} %{message}" | ||
email: | ||
on_success: change | ||
on_failure: change | ||
slack: | ||
secure: geVAHVhYQ5bY7ja5vx1Tgxc5y64WLuXVEWKmw4LqiThFYCjtpdWkHGiZJfhUwkVI11u5w8w1FUmrB7ZP4EUGoXhCK/z1mvVMVJ9+fS+WoaqcTHFJi0hGbvXaFPD7QA+ef7TLrFcU643kf6KHN/P+dVVndLyhctXZqOZHHwXmKZNMt8qM5Gh5h41HOi0YjT9yFafSU0qf5jphF5qvjlxKsVJF+WxtMSU4xMYxzq7rf80bPi2pu4ijgqR5+Haaa71DJ1V2TA4wZ+BFTBo2YUJIGZ8qDlqmb7RdF/u72G/8HbT/Hzj55blrpBXU/BPkokGOPJlIGHPV76ESpJI0ZUILRifmkZY6ylMjl/hutDYPNjhMq8Z/UKSLN6pJQAq0PjqAoHCtPsXTbRMT0lhVt2itkCPwAXVgszTrE6INsNylY/soaDu66Sjmz2zQH8sC6hbL8SrZ0xGs1Q+e3q5WMETPIAS9f4n2YCxkIz4ORoL9IrOXUcebVNriiWKzOBt6bleWPJlGc6yVYkkUhvURH+jEp6v2Y5SqsaJVTD3I5Gq/H/0PJBtPdzu470yQ3/FD4g6M0AmWx8DCuvl1O295QOZbUtujpIowTm7PynFrAgW3ptSidjzWjzZaHc0iQJBiNi86dg3GomoEEOPzx8hnX7fhFgsR+Ixqfzx0srrQYqleQGY= | ||
cache: | ||
ccache: true |
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,41 @@ | ||
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile | ||
|
||
#BOARD_TAG = keyboardio | ||
BOARD = model01 | ||
MCU = atmega32u4 | ||
|
||
ARDUINO_LIBS = | ||
|
||
ARDUINO_PATH=/Applications/Arduino.app/Contents/Java/ | ||
ARDUINO_TOOLS_PATH=$(ARDUINO_PATH)/hardware/tools | ||
FQBN=arduino:avr:leonardo | ||
BUILD_PATH := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'build') | ||
ARDUINO_LOCAL_LIB_PATH=~/Documents/Arduino/libraries | ||
ARDUINO_IDE_VERSION=100607 | ||
VERBOSE := #-verbose | ||
|
||
EXAMPLES=$(shell find ./examples -type f -name \*.ino ) | ||
EXAMPLES_HEX := $(addsuffix .hex,${EXAMPLES}) | ||
|
||
|
||
astyle: | ||
find . -type f -name \*.cpp |xargs -n 1 astyle --style=google | ||
find . -type f -name \*.ino |xargs -n 1 astyle --style=google | ||
find . -type f -name \*.h |xargs -n 1 astyle --style=google | ||
|
||
smoke: ${EXAMPLES_HEX} | ||
|
||
${EXAMPLES_HEX}: %.hex: | ||
|
||
$(ARDUINO_PATH)/arduino-builder \ | ||
-hardware $(ARDUINO_PATH)/hardware \ | ||
-tools $(ARDUINO_TOOLS_PATH) \ | ||
-tools $(ARDUINO_PATH)/tools-builder \ | ||
-fqbn $(FQBN) \ | ||
-libraries $(ARDUINO_PATH)/libraries \ | ||
-libraries $(ARDUINO_LOCAL_LIB_PATH) \ | ||
$(VERBOSE) \ | ||
-build-path $(BUILD_PATH) \ | ||
-ide-version $(ARDUINO_IDE_VERSION) \ | ||
$* | ||
$(ARDUINO_TOOLS_PATH)/avr/bin/avr-size -C --mcu=$(MCU) $(BUILD_PATH)/$(shell basename $*).elf |