2019-12-16 19:52:10 +01:00
matrix :
2019-06-01 23:53:14 +02:00
include :
2019-12-16 19:52:10 +01:00
# Test build for Linux platform
- language : cpp
os : linux
2019-06-01 23:53:14 +02:00
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-12-16 19:52:10 +01:00
cache :
directories :
git :
depth : false
quiet : true
before_install :
- eval "${MATRIX_EVAL}"
install :
script :
2019-12-18 22:36:21 +01:00
- echo "building knx-linux"
2019-12-16 19:52:10 +01:00
- cd examples/knx-linux
- mkdir -p build
- cd build
- cmake ..
- make
# Test build for Arduino platform
- language : cpp
os : linux
2019-06-02 00:29:12 +02:00
env :
2020-05-07 19:35:10 +02:00
- ARDUINO_IDE_VERSION="1.8.11"
2019-12-16 19:52:10 +01:00
cache :
directories :
- ~/arduino_ide
- ~/.arduino15/packages/
git :
depth : false
quiet : true
before_install :
- downloadArduinoLib() { wget -O $1.zip $2; unzip -o $1.zip -d $HOME/arduino_ide/libraries; }
- source <(curl -SLs "https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh")
- downloadArduinoLib FlashStorage "https://github.com/thelsing/FlashStorage/archive/master.zip"
- downloadArduinoLib BSEC "https://github.com/BoschSensortec/BSEC-Arduino-library/archive/master.zip"
# only default warning level
- sed -i 's#compiler.warning_level=all#compiler.warning_level=default#' ~/.arduino15/preferences.txt
# changes for bsec lib
# samd
2020-05-07 19:35:10 +02:00
- ls -l ~/.arduino15/packages/arduino/hardware/samd
- sed -ri 's#(recipe.c.combine.pattern=[^$]*\{archive_file\}")( -Wl,--end-group)#\1 {compiler.libraries.ldflags}\2#' ~/.arduino15/packages/arduino/hardware/samd/1.8.6/platform.txt
- sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/arduino/hardware/samd/1.8.6/platform.txt
2019-12-16 19:52:10 +01:00
# esp8266
2020-05-07 19:35:10 +02:00
- ls -l ~/.arduino15/packages/esp8266/hardware/esp8266
2020-05-08 02:33:53 +02:00
- 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.7.1/platform.txt
- sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.7.1/platform.txt
- sed -i '/^.*libalgobsec.*$/d' ~/.arduino15/packages/esp8266/hardware/esp8266/2.7.1/tools/sdk/ld/eagle.app.v6.common.ld.h
- sed -ri 's#(\*libwps\.a:\(\.literal\.\* \.text\.\*\))#\1\n *libalgobsec.a:(.literal.* .text.*)#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.7.1/tools/sdk/ld/eagle.app.v6.common.ld.h
2019-12-16 19:52:10 +01:00
# the HDC100X lib is not properly set up in githup so move things around a bit
- rm -rf $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master
- downloadArduinoLib HDC100X "https://github.com/RFgermany/HDC100X_Arduino_Library/archive/master.zip"
- mv $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master/HDC100X/* $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master
#- buildExampleSketch() { arduino --verify --board $BOARD $PWD/examples/$1/$1.ino; }
2019-06-01 23:53:14 +02:00
2019-12-16 19:52:10 +01:00
install :
- arduino --install-library "WiFiManager"
script :
# - buildExampleSketch knx-demo
# - buildExampleSketch knx-sonoffS20
# - buildExampleSketch knx-bme680
# - buildExampleSketch knx-hdc1008
- build_platform zero
2020-06-08 11:43:06 +02:00
# - build_platform esp8266
2019-06-12 23:02:54 +02:00
2019-12-16 19:52:10 +01:00
# Test build for PlatformIO based projects
- language : python
python :
2020-05-07 19:35:10 +02:00
- "3.8"
2019-12-16 19:52:10 +01:00
cache :
directories :
- "~/.platformio"
env :
- PLATFORMIO_EXTRA_SCRIPTS=pre:/tmp/scripts/custom_hwids.py
install :
- pip install -U platformio
- platformio update
script :
# PRE scripts have to be copied manually as "platformio ci does not care about it"
- mkdir -p /tmp/scripts
- cp examples/knx-usb/custom_hwids.py /tmp/scripts
2019-12-17 17:32:50 +01:00
# Enable verbose output of platformio
#- platformio settings set force_verbose yes
- echo "-------";echo "Compiling example knx-usb";echo "--------";
2019-12-16 19:52:10 +01:00
- platformio ci --lib="." --project-conf=examples/knx-usb/platformio-ci.ini examples/knx-usb/src/main.cpp
2019-12-17 17:32:50 +01:00
- echo "-------";echo "Compiling example knx-demo";echo "--------";
- platformio ci --lib="." --project-conf=examples/knx-demo/platformio-ci.ini examples/knx-demo/knx-demo.ino
2019-06-02 01:19:45 +02:00
notifications :
email :
on_success : change
on_failure : change