2019-08-06 05:35:32 +02:00
|
|
|
language: c
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
# You can uncomment this to explicitly choose an (old) version of the Arduino IDE
|
|
|
|
#- ARDUINO_IDE_VERSION="1.8.7"
|
2020-03-09 19:09:25 +01:00
|
|
|
- ADDITIONAL_URLS="https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json"
|
2020-03-11 20:40:48 +01:00
|
|
|
- DOXYFILE=$TRAVIS_BUILD_DIR/.travis/Doxyfile
|
|
|
|
|
2019-11-07 01:04:09 +01:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- ~/arduino_ide
|
|
|
|
- ~/.arduino15/packages/
|
2020-03-09 19:09:25 +01:00
|
|
|
|
2020-03-11 20:40:48 +01:00
|
|
|
# Blacklist
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- gh-pages
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- doxygen
|
|
|
|
|
2019-11-07 01:04:09 +01:00
|
|
|
jobs:
|
|
|
|
include:
|
2020-03-09 19:09:25 +01:00
|
|
|
- stage: "Build"
|
|
|
|
name: "Feather M0"
|
|
|
|
env: CORE="adafruit:samd" BOARD="adafruit:samd:adafruit_feather_m0"
|
|
|
|
- name: "Arduino Zero"
|
|
|
|
env: CORE="arduino:samd" BOARD="arduino:samd:mzero_bl"
|
|
|
|
- name: "ESP32"
|
|
|
|
env: CORE="esp32:esp32" BOARD="esp32:esp32:d32"
|
|
|
|
- name: "STM32"
|
2020-03-09 19:24:41 +01:00
|
|
|
env: CORE="STM32:stm32" BOARD="STM32:stm32:Nucleo_144:pnum=NUCLEO_F767ZI"
|
2020-03-09 19:09:25 +01:00
|
|
|
script:
|
2020-03-09 19:24:41 +01:00
|
|
|
- arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/stm32/EthernetHTTPSstm32
|
2020-03-11 20:40:48 +01:00
|
|
|
|
|
|
|
- stage: "Documentation"
|
|
|
|
if: branch = master
|
|
|
|
install: skip
|
|
|
|
script:
|
|
|
|
- doxygen $DOXYFILE
|
|
|
|
deploy:
|
|
|
|
provider: pages
|
|
|
|
skip_cleanup: true
|
2020-03-11 20:48:17 +01:00
|
|
|
local_dir: docs
|
2020-03-11 20:40:48 +01:00
|
|
|
github_token: $GITHUB_TOKEN
|
|
|
|
|
2020-03-09 19:09:25 +01:00
|
|
|
- stage: "Deploy"
|
2020-04-10 20:35:26 +02:00
|
|
|
# if: tag is present
|
2020-04-10 20:45:48 +02:00
|
|
|
env: CORE="arduino:samd esp32:esp32 STM32:stm32"
|
2020-03-09 19:09:25 +01:00
|
|
|
script: skip
|
2020-04-10 20:35:26 +02:00
|
|
|
before_deploy:
|
|
|
|
- mkdir tmp-bin
|
|
|
|
- echo "dot_a_linkage=true" >> library.properties
|
|
|
|
- rm -rf /tmp/arduino-sketch*
|
|
|
|
# cortex-m0plus
|
|
|
|
- arduino-cli compile --fqbn arduino:samd:mzero_bl $PWD/examples/EthernetHTTPS
|
2020-04-10 20:45:48 +02:00
|
|
|
- mkdir tmp-bin/cortex-m0plus
|
2020-04-10 20:35:26 +02:00
|
|
|
- cp "$(find /tmp/ -maxdepth 1 -type d -name "arduino-sketch*" -print | head -n 1)/libraries/SSLClient/SSLClient.a" tmp-bin/cortex-m0plus/SSLClient.a
|
|
|
|
- rm -rf /tmp/arduino-sketch*
|
|
|
|
# cortex-m7
|
|
|
|
- arduino-cli compile --fqbn STM32:stm32:Nucleo_144:pnum=NUCLEO_F767ZI $PWD/examples/EthernetHTTPS
|
2020-04-10 20:45:48 +02:00
|
|
|
- mkdir tmp-bin/cortex-m7
|
2020-04-10 20:35:26 +02:00
|
|
|
- cp "$(find /tmp/ -maxdepth 1 -type d -name "arduino-sketch*" -print | head -n 1)/libraries/SSLClient/SSLClient.a" tmp-bin/cortex-m7/SSLClient.a
|
|
|
|
- rm -rf /tmp/arduino-sketch*
|
|
|
|
# esp32
|
|
|
|
- arduino-cli compile --fqbn esp32:esp32:d32 $PWD/examples/EthernetHTTPS
|
2020-04-10 20:45:48 +02:00
|
|
|
- mkdir tmp-bin/esp32
|
2020-04-10 20:35:26 +02:00
|
|
|
- cp "$(find /tmp/ -maxdepth 1 -type d -name "arduino-sketch*" -print | head -n 1)/libraries/SSLClient/SSLClient.a" tmp-bin/esp32/SSLClient.a
|
|
|
|
# bundle it up!
|
|
|
|
- echo "precompiled=true" >> library.properties
|
|
|
|
- mv tmp-bin/* src/
|
|
|
|
- rm -rf tmp-bin
|
|
|
|
- rm -rf .git
|
|
|
|
- find src/ -iname "*.c" -delete
|
|
|
|
- find src/ -iname "*.cpp" -delete
|
|
|
|
- zip -r SSLClient-precompiled.zip .
|
2020-03-09 19:09:25 +01:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: $GITHUB_TOKEN
|
|
|
|
skip_cleanup: true
|
2020-04-10 20:35:26 +02:00
|
|
|
file: "SSLClient-precompiled.zip"
|
|
|
|
draft: true
|
|
|
|
#on:
|
|
|
|
# tags: true
|
2020-03-09 19:09:25 +01:00
|
|
|
|
|
|
|
install:
|
2019-11-07 01:04:09 +01:00
|
|
|
- curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/bin sudo sh
|
|
|
|
- arduino-cli core update-index --additional-urls $ADDITIONAL_URLS
|
|
|
|
- arduino-cli core install arduino:samd -v
|
2020-03-09 19:09:25 +01:00
|
|
|
- arduino-cli core install $CORE -v --additional-urls $ADDITIONAL_URLS
|
2019-11-07 01:04:09 +01:00
|
|
|
- mkdir -p $HOME/Arduino/libraries
|
2020-02-21 20:45:14 +01:00
|
|
|
- rm -rf $HOME/Arduino/libraries/EthernetLarge
|
2019-11-07 01:04:09 +01:00
|
|
|
- git clone https://github.com/OPEnSLab-OSU/EthernetLarge.git $HOME/Arduino/libraries/EthernetLarge
|
2020-03-09 19:09:25 +01:00
|
|
|
- arduino-cli lib install "STM32duino STM32Ethernet"
|
|
|
|
- arduino-cli lib install "PubSubClient"
|
2019-11-07 01:04:09 +01:00
|
|
|
- ln -s $PWD $HOME/Arduino/libraries/.
|
2020-03-09 19:09:25 +01:00
|
|
|
|
2019-08-06 05:35:32 +02:00
|
|
|
script:
|
2020-03-09 19:24:41 +01:00
|
|
|
- arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/EthernetHTTPS
|
|
|
|
- arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/EthernetMultiHTTPS
|
|
|
|
- arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/EthernetMQTT
|