From 2003275377ac8902e859bf4e105c87bea72c25bc Mon Sep 17 00:00:00 2001 From: Baozhu Zuo Date: Tue, 4 Feb 2020 20:20:45 +0800 Subject: [PATCH] Seeed:Arduino: fix travis.yml write error --- .gitlab-ci.yml | 8 +++ .travis.yml | 160 ++++++------------------------------------------- 2 files changed, 26 insertions(+), 142 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5e2b6aa --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,8 @@ +build: + tags: + - nas + script: + - wget -c https://files.seeedstudio.com/arduino/seeed-arduino-ci.sh + - chmod +x seeed-arduino-ci.sh + - bash $PWD/seeed-arduino-ci.sh test + diff --git a/.travis.yml b/.travis.yml index 5e34442..202d2e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,145 +1,21 @@ + language: generic -matrix: - include: - - env: - - BOARD = "arduino:avr:uno" - - env: - - BOARD = "Seeeduino:samd:seeed_XIAO_m0" -# default phases +dist: bionic +sudo: false +cache: + directories: + - ~/arduino_ide + - ~/.arduino15/packages/ + before_install: - - mkdir -p "$HOME/bin" - - curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$HOME/bin" sh - - export PATH="$PATH:$HOME/bin" - - arduino-cli core update-index --additional-urls https://downloads.arduino.cc/packages/package_index.json - - arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json - - arduino-cli core install arduino:avr --additional-urls https://downloads.arduino.cc/packages/package_index.json - - arduino-cli core install Seeeduino:samd --additional-urls https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json - - | - installLibrary() { - local -r repositoryFullName="$1" - local -r repositoryName="${repositoryFullName##*/}" - # clone repository to the libraries folder of the sketchbook - git clone https://github.com/${repositoryFullName} "${HOME}/Arduino/libraries/${repositoryName}" - cd "${HOME}/Arduino/libraries/${repositoryName}" - cd "${TRAVIS_BUILD_DIR}" - } -- installLibrary Seeeed-Studio/Grove_LoRa_433MHz_and_915MHz_RF - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_reliable_datagram_client; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_server; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_HardwareSerial_server; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch Grove_LoRa_firmware; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_router_address1; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_mesh_address3; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_client; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_reliable_datagram_server; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_router_address4; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_mesh_address1; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_mesh_address2; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_router_address2; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_router_address3; - fi - - | - if [ "$BOARD" == "arduino:avr:uno" ]; then - buildExampleSketch rf95_mesh_address4; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_reliable_datagram_client; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_server; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_HardwareSerial_server; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch Grove_LoRa_firmware; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_router_address1; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_mesh_address3; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_client; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_reliable_datagram_server; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_router_address4; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_mesh_address1; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_mesh_address2; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_router_address2; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_router_address3; - fi - - | - if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then - buildExampleSketch rf95_mesh_address4; - fi -notifications: - webhooks: - urls: - - https://www.travisbuddy.com/ - on_success: never - on_failure: always + - wget -c https://files.seeedstudio.com/arduino/seeed-arduino-ci.sh +script: + - chmod +x seeed-arduino-ci.sh + - cat $PWD/seeed-arduino-ci.sh + - bash $PWD/seeed-arduino-ci.sh test + +notifications: + email: + on_success: change + on_failure: change