Skip to content

Commit

Permalink
Seeed:Arduino: Add travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pillar1989 committed Feb 4, 2020
1 parent d2c3656 commit 2da7de4
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
language: generic
matrix:
include:
- env:
- BOARD = "arduino:avr:uno"
- env:
- BOARD = "Seeeduino:samd:seeed_XIAO_m0"
# default phases
before_install:
- mkdir -p "$HOME/bin"
- curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$HOME/bin" sh
- export PATH="$PATH:$HOME/bin"
- arduino-cli core update-index --additional-urls https://downloads.arduino.cc/packages/package_index.json
- arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json
- arduino-cli core install arduino:avr --additional-urls https://downloads.arduino.cc/packages/package_index.json
- arduino-cli core install Seeeduino:samd --additional-urls https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json
- |
installLibrary() {
local -r repositoryFullName="$1"
local -r repositoryName="${repositoryFullName##*/}"
# clone repository to the libraries folder of the sketchbook
git clone https://github.com/${repositoryFullName} "${HOME}/Arduino/libraries/${repositoryName}"
cd "${HOME}/Arduino/libraries/${repositoryName}"
cd "${TRAVIS_BUILD_DIR}"
}
- installLibrary Seeeed-Studio/Grove_Digital_Light_Sensor
- |
if [ "$BOARD" == "arduino:avr:uno" ]; then
buildExampleSketch Digital_Light_Sensor_IR;
fi
- |
if [ "$BOARD" == "arduino:avr:uno" ]; then
buildExampleSketch Digital_Light_Sensor_v2;
fi
- |
if [ "$BOARD" == "arduino:avr:uno" ]; then
buildExampleSketch Digital_Light_Sensor;
fi
- |
if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then
buildExampleSketch Digital_Light_Sensor_IR;
fi
- |
if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then
buildExampleSketch Digital_Light_Sensor_v2;
fi
- |
if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then
buildExampleSketch Digital_Light_Sensor;
fi
notifications:
webhooks:
urls:
- https://www.travisbuddy.com/
on_success: never
on_failure: always

0 comments on commit 2da7de4

Please sign in to comment.