save work

This commit is contained in:
nanosonde 2019-12-15 16:02:39 +01:00
parent 47e17ea164
commit d711f18260

View File

@ -1,5 +1,6 @@
matrix: matrix:
include: include:
# Test build for Linux platform
- language: cpp - language: cpp
os: linux os: linux
addons: addons:
@ -10,7 +11,6 @@
- g++-7 - g++-7
env: env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- MODE=LINUX
cache: cache:
directories: directories:
- ~/arduino_ide - ~/arduino_ide
@ -19,48 +19,19 @@
depth: false depth: false
quiet: true quiet: true
before_install: before_install:
- downloadArduinoLib() { wget -O $1.zip $2; unzip -o $1.zip -d $HOME/arduino_ide/libraries; } - eval "${MATRIX_EVAL}"
- 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" ]; then downloadArduinoLib FlashStorage "https://github.com/thelsing/FlashStorage/archive/master.zip"; fi
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib BSEC "https://github.com/BoschSensortec/BSEC-Arduino-library/archive/master.zip"; fi
# only default warning level
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.warning_level=all#compiler.warning_level=default#' ~/.arduino15/preferences.txt; fi
# changes for bsec lib
# samd
- 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
# 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.6.2/platform.txt; fi
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/platform.txt; fi
- if [ "$MODE" = "ARDUINO" ]; then sed -i '/^.*libalgobsec.*$/d' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.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.6.2/tools/sdk/ld/eagle.app.v6.common.ld.h; fi
# the HDC100X lib is not properly set up in githup so move things around a bit
- if [ "$MODE" = "ARDUINO" ]; then rm -rf $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master; fi
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib HDC100X "https://github.com/RFgermany/HDC100X_Arduino_Library/archive/master.zip"; fi
- if [ "$MODE" = "ARDUINO" ]; then mv $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master/HDC100X/* $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master; fi
#- buildExampleSketch() { arduino --verify --board $BOARD $PWD/examples/$1/$1.ino; }
install: install:
- if [ "$MODE" = "ARDUINO" ]; then arduino --install-library "WiFiManager"; fi
script: script:
- if [ "$MODE" = "LINUX" ]; then cd knx-linux; fi - cd knx-linux
- if [ "$MODE" = "LINUX" ]; then mkdir -p build; fi - mkdir -p build
- if [ "$MODE" = "LINUX" ]; then cd build; fi - cd build
- if [ "$MODE" = "LINUX" ]; then cmake ..; fi - cmake ..
- if [ "$MODE" = "LINUX" ]; then make; fi - make
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi # Test build for Arduino platform
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform zero; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform esp8266; fi
- language: cpp - language: cpp
os: linux os: linux
env: env:
- MODE=ARDUINO
cache: cache:
directories: directories:
- ~/arduino_ide - ~/arduino_ide
@ -70,43 +41,38 @@
quiet: true quiet: true
before_install: before_install:
- downloadArduinoLib() { wget -O $1.zip $2; unzip -o $1.zip -d $HOME/arduino_ide/libraries; } - downloadArduinoLib() { wget -O $1.zip $2; unzip -o $1.zip -d $HOME/arduino_ide/libraries; }
- if [ "$MODE" = "LINUX" ]; then eval "${MATRIX_EVAL}"; fi - source <(curl -SLs "https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh")
- if [ "$MODE" = "ARDUINO" ]; then source <(curl -SLs "https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh"); fi - downloadArduinoLib FlashStorage "https://github.com/thelsing/FlashStorage/archive/master.zip"
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib FlashStorage "https://github.com/thelsing/FlashStorage/archive/master.zip"; fi - downloadArduinoLib BSEC "https://github.com/BoschSensortec/BSEC-Arduino-library/archive/master.zip"
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib BSEC "https://github.com/BoschSensortec/BSEC-Arduino-library/archive/master.zip"; fi
# only default warning level # only default warning level
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.warning_level=all#compiler.warning_level=default#' ~/.arduino15/preferences.txt; fi - sed -i 's#compiler.warning_level=all#compiler.warning_level=default#' ~/.arduino15/preferences.txt
# changes for bsec lib # changes for bsec lib
# samd # samd
- 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 - 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
- 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 - sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/arduino/hardware/samd/1.8.4/platform.txt
# esp8266 # 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.6.2/platform.txt; fi - 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.6.2/platform.txt
- if [ "$MODE" = "ARDUINO" ]; then sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/platform.txt; fi - sed -i 's#compiler.elf2hex.extra_flags=#compiler.elf2hex.extra_flags=\ncompiler.libraries.ldflags=#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/platform.txt
- if [ "$MODE" = "ARDUINO" ]; then sed -i '/^.*libalgobsec.*$/d' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/sdk/ld/eagle.app.v6.common.ld.h; fi - sed -i '/^.*libalgobsec.*$/d' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/sdk/ld/eagle.app.v6.common.ld.h
- if [ "$MODE" = "ARDUINO" ]; then sed -ri 's#(\*libwps\.a:\(\.literal\.\* \.text\.\*\))#\1\n *libalgobsec.a:(.literal.* .text.*)#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/sdk/ld/eagle.app.v6.common.ld.h; fi - sed -ri 's#(\*libwps\.a:\(\.literal\.\* \.text\.\*\))#\1\n *libalgobsec.a:(.literal.* .text.*)#' ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/sdk/ld/eagle.app.v6.common.ld.h
# the HDC100X lib is not properly set up in githup so move things around a bit # the HDC100X lib is not properly set up in githup so move things around a bit
- if [ "$MODE" = "ARDUINO" ]; then rm -rf $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master; fi - rm -rf $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master
- if [ "$MODE" = "ARDUINO" ]; then downloadArduinoLib HDC100X "https://github.com/RFgermany/HDC100X_Arduino_Library/archive/master.zip"; fi - downloadArduinoLib HDC100X "https://github.com/RFgermany/HDC100X_Arduino_Library/archive/master.zip"
- if [ "$MODE" = "ARDUINO" ]; then mv $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master/HDC100X/* $HOME/arduino_ide/libraries/HDC100X_Arduino_Library-master; fi - 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; } #- buildExampleSketch() { arduino --verify --board $BOARD $PWD/examples/$1/$1.ino; }
install: install:
- if [ "$MODE" = "ARDUINO" ]; then arduino --install-library "WiFiManager"; fi - arduino --install-library "WiFiManager"
script: script:
- if [ "$MODE" = "LINUX" ]; then cd knx-linux; fi # - buildExampleSketch knx-demo
- if [ "$MODE" = "LINUX" ]; then mkdir -p build; fi # - buildExampleSketch knx-sonoffS20
- if [ "$MODE" = "LINUX" ]; then cd build; fi # - buildExampleSketch knx-bme680
- if [ "$MODE" = "LINUX" ]; then cmake ..; fi # - buildExampleSketch knx-hdc1008
- if [ "$MODE" = "LINUX" ]; then make; fi - build_platform zero
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-demo; fi - build_platform esp8266
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-sonoffS20; fi
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-bme680; fi # Test build for PlatformIO based projects
# - if [ "$MODE" = "ARDUINO" ]; then buildExampleSketch knx-hdc1008; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform zero; fi
- if [ "$MODE" = "ARDUINO" ]; then build_platform esp8266; fi
- language: python - language: python
python: python:
- "2.7" - "2.7"
@ -120,7 +86,7 @@
- pip install -U platformio - pip install -U platformio
- platformio update - platformio update
script: script:
- platformio ci --project-conf=examples/knx-usb/platformio.ini - platformio ci --lib="." --project-conf=examples/knx-usb/platformio.ini
#- platformio run -c examples/knx-usb/platformio.ini #- platformio run -c examples/knx-usb/platformio.ini
notifications: notifications: