language: cpp cache: directories: - ~/arduino_ide - ~/.arduino15/packages/ matrix: include: - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-7 env: - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" - MODE=LINUX - os: linux env: - MODE=ARDUINO - BOARD=arduino:samd:arduino_zero_native before_install: - downloadArduinoLib() { wget -O $1.zip $2; unzip -o $1.zip -d $HOME/arduino_ide/libraries; } - if [ "$MODE" = "LINUX" ]; then eval "${MATRIX_EVAL}"; fi - if [ "$MODE" = "ARDUINO" ]; then source <(curl -SLs "https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh"); fi - if [ "$MODE" = "ARDUINO" ]; downloadArduinoLib FlashStorage "https://github.com/thelsing/FlashStorage/archive/master.zip"; fi # - if [ "$MODE" = "ARDUINO" ]; then wget https://github.com/thelsing/FlashStorage/archive/master.zip; fi # - if [ "$MODE" = "ARDUINO" ]; then unzip -o master.zip -d $HOME/arduino_ide/libraries; fi - if [ "$MODE" = "ARDUINO" ]; then wget "https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1.4.7.3_Generic_Release_20190410.zip"; fi - if [ "$MODE" = "ARDUINO" ]; then unzip -o BSEC_1.4.7.3_Generic_Release_20190410.zip -d $HOME/arduino_ide/libraries/bsec; fi - if [ "$MODE" = "ARDUINO" ]; then ls -l $HOME/arduino_ide/libraries/bsec; fi - buildExampleSketch() { arduino --verbose-build --verify --board $BOARD $PWD/examples/$1/$1.ino; } install: - if [ "$MODE" = "ARDUINO" ]; then arduino --install-library "WiFiManager"; fi script: - if [ "$MODE" = "LINUX" ]; then cd knx-linux; fi - if [ "$MODE" = "LINUX" ]; then mkdir -p build; fi - if [ "$MODE" = "LINUX" ]; then cd build; fi - if [ "$MODE" = "LINUX" ]; then cmake ..; fi - if [ "$MODE" = "LINUX" ]; then make; fi - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi notifications: email: on_success: change on_failure: change