language: python
python:
  - "2.7"

# Short duration job, use the container/without sudo image as it boots faster
sudo: false
# Use the latest Travis images since they are more up to date than the stable release.
group: edge

cache:
  directories:
    - "~/.platformio"

env:
  global:
   # Warnings are errors
   - PLATFORMIO_BUILD_FLAGS="-Werror"

matrix:
  fast_finish: true
  include:
    - env: BOARD=teensylc PLATFORMIO_CI_SRC=examples/PrintInfo
    - env: BOARD=teensy30 PLATFORMIO_CI_SRC=examples/PrintInfo
    - env: BOARD=teensy31 PLATFORMIO_CI_SRC=examples/PrintInfo
    - env: BOARD=teensy35 PLATFORMIO_CI_SRC=examples/PrintInfo
    - env: BOARD=teensy36 PLATFORMIO_CI_SRC=examples/PrintInfo

install:
  - pip install -U platformio

script:
  - platformio ci --lib="." --board=$BOARD
