knx/.travis.yml

71 lines
3.9 KiB
YAML
Raw Normal View History

2019-06-01 23:37:52 +02:00
language: cpp
2019-06-02 00:42:38 +02:00
cache:
directories:
- ~/arduino_ide
- ~/.arduino15/packages/
2019-06-12 19:10:16 +02:00
git:
depth: false
quiet: true
2019-06-01 23:53:14 +02:00
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
2019-06-02 00:54:09 +02:00
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
2019-06-02 00:29:12 +02:00
- MODE=LINUX
- os: linux
env:
- MODE=ARDUINO
2019-06-01 23:53:14 +02:00
before_install:
2019-06-03 22:59:42 +02:00
- downloadArduinoLib() { wget -O $1.zip $2; unzip -o $1.zip -d $HOME/arduino_ide/libraries; }
2019-06-02 00:54:09 +02:00
- if [ "$MODE" = "LINUX" ]; then eval "${MATRIX_EVAL}"; fi
2019-06-03 22:59:42 +02:00
- if [ "$MODE" = "ARDUINO" ]; then source <(curl -SLs "https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh"); fi
2019-06-03 23:06:51 +02:00
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib FlashStorage "https://github.com/thelsing/FlashStorage/archive/master.zip"; fi
2019-06-04 00:09:40 +02:00
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib BSEC "https://github.com/BoschSensortec/BSEC-Arduino-library/archive/master.zip"; fi
2019-06-12 21:27:15 +02:00
# only default warning level
2019-06-12 19:35:52 +02:00
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.warning_level=all#compiler.warning_level=default#' ~/.arduino15/preferences.txt; fi
2019-06-12 21:27:15 +02:00
# changes for bsec lib
2019-06-12 23:02:54 +02:00
# samd
2019-10-15 09:50:46 +02:00
- if [ "$MODE" = "ARDUINO" ]; then sed -ri 's#(recipe.c.combine.pattern=[^$]*\{archive_file\}")( -Wl,--end-group)#\1 {compiler.libraries.ldflags}\2#' ~/.arduino15/packages/arduino/hardware/samd/1.8.4/platform.txt; fi
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/arduino/hardware/samd/1.8.4/platform.txt; fi
2019-06-12 23:02:54 +02:00
# esp8266
- if [ "$MODE" = "ARDUINO" ]; then sed -ri 's#(recipe.c.combine.pattern=[^$]*\{compiler.c.elf.libs\})( -Wl,--end-group "-L\{build.path\}")#\1 {compiler.libraries.ldflags}\2#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/platform.txt; fi
2019-06-12 22:35:18 +02:00
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/platform.txt; fi
2019-06-12 23:02:54 +02:00
- if [ "$MODE" = "ARDUINO" ]; then sed -i '/^.*libalgobsec.*$/d' ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/sdk/ld/eagle.app.v6.common.ld.h; fi
- if [ "$MODE" = "ARDUINO" ]; then sed -ri 's#(\*libwps\.a:\(\.literal\.\* \.text\.\*\))#\1\n *libalgobsec.a:(.literal.* .text.*)#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/sdk/ld/eagle.app.v6.common.ld.h; fi
2019-06-03 23:56:21 +02:00
# the HDC100X lib is not properly set up in githup so move things around a bit
2019-06-04 01:12:12 +02:00
- if [ "$MODE" = "ARDUINO" ]; then rm -rf $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master; fi
2019-06-04 00:30:45 +02:00
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib HDC100X "https://github.com/RFgermany/HDC100X_Arduino_Library/archive/master.zip"; fi
2019-06-04 01:12:12 +02:00
- if [ "$MODE" = "ARDUINO" ]; then mv $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master/HDC100X/* $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master; fi
2019-06-12 23:10:44 +02:00
#- buildExampleSketch() { arduino --verify --board $BOARD $PWD/examples/$1/$1.ino; }
2019-06-03 22:25:46 +02:00
2019-06-02 00:54:09 +02:00
install:
- if [ "$MODE" = "ARDUINO" ]; then arduino --install-library "WiFiManager"; fi
2019-06-01 23:37:52 +02:00
script:
2019-06-02 00:29:12 +02:00
- if [ "$MODE" = "LINUX" ]; then cd knx-linux; fi
2019-06-02 00:31:12 +02:00
- 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
2019-06-12 22:09:05 +02:00
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform zero; fi
2019-06-12 22:16:48 +02:00
- if [ "$MODE" = "ARDUINO" ]; then build_platform esp8266; fi
2019-06-12 22:09:05 +02:00
2019-06-02 01:19:45 +02:00
notifications:
email:
on_success: change
on_failure: change