RadioLib/.travis.yml

196 wiersze
7.7 KiB
YAML
Czysty Zwykły widok Historia

2018-09-22 14:36:35 +00:00
env:
global:
matrix:
2019-09-10 16:48:51 +00:00
# see https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#options
2019-09-10 17:41:12 +00:00
# and https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification#boardstxt
- BOARD="arduino:avr:uno"
- BOARD="arduino:avr:mega:cpu=atmega2560"
- BOARD="arduino:avr:leonardo"
- BOARD="esp8266:esp8266:generic:xtal=80,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=qio,eesz=512K"
2019-09-09 07:18:38 +00:00
- BOARD="esp32:esp32:esp32"
2019-11-19 17:28:38 +00:00
- BOARD="STM32:stm32:GenF3:pnum=BLACKPILL_F303CC"
2019-09-10 16:48:51 +00:00
- BOARD="arduino:samd:arduino_zero_native"
2019-10-27 16:18:37 +00:00
- BOARD="arduino:sam:arduino_due_x"
- BOARD="adafruit:nrf52:feather52832:softdevice=s132v6,debug=l0"
- BOARD="Intel:arc32:arduino_101"
- BOARD="arduino:megaavr:uno2018:mode=on"
- BOARD="SparkFun:apollo3:amap3redboard"
- BOARD="arduino:mbed:nano33ble"
- BOARD="stm32duino:STM32F1:mapleMini:bootloader_version=original,cpu_speed=speed_72mhz"
2020-05-12 06:42:10 +00:00
- BOARD="adafruit:samd:adafruit_feather_m0:usbstack=arduino,debug=off"
- BOARD="arduino-beta:mbed:envie_m4"
2019-05-24 13:13:04 +00:00
addons:
apt:
packages:
# required for Adafruit nRF52 (adafruit-nrfutil package)
- python3
- python3-pip
- python3-setuptools
2018-09-22 14:36:35 +00:00
before_install:
# install Arduino CLI
2020-07-06 14:28:38 +00:00
- curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
2020-07-06 14:48:07 +00:00
- export PATH=$PATH:$PWD/bin
2019-05-24 13:13:04 +00:00
# check every board in matrix and install 3rd party definitions
2020-07-06 14:45:18 +00:00
- |
if [[ "$BOARD" =~ "arduino:avr:uno" ]]; then
2020-04-15 07:32:39 +00:00
export BUILD_EXAMPLES=true;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
2020-07-06 14:51:37 +00:00
arduino-cli core install arduino:avr;
2020-04-15 07:29:05 +00:00
elif [[ "$BOARD" =~ "arduino:avr:mega" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
2020-07-06 14:51:37 +00:00
arduino-cli core install arduino:avr;
2020-04-15 07:29:05 +00:00
elif [[ "$BOARD" =~ "arduino:avr:leonardo" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
2020-07-06 14:51:37 +00:00
arduino-cli core install arduino:avr;
2020-04-15 07:29:05 +00:00
elif [[ "$BOARD" =~ "esp8266:esp8266:" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls http://arduino.esp8266.com/stable/package_esp8266com_index.json;
arduino-cli core install esp8266:esp8266 --additional-urls http://arduino.esp8266.com/stable/package_esp8266com_index.json;
2019-07-31 08:02:45 +00:00
export SKIP_PAT='(HTTP|MQTT).*ino';
2019-09-09 07:18:38 +00:00
elif [[ "$BOARD" =~ "esp32:esp32:" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json;
arduino-cli core install esp32:esp32 --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json;
2019-09-10 17:41:12 +00:00
elif [[ "$BOARD" =~ "STM32:stm32:" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json;
arduino-cli core install STM32:stm32 --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json;
2019-09-10 16:48:51 +00:00
elif [[ "$BOARD" =~ "arduino:samd:" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
arduino-cli core install arduino:samd;
2019-10-27 16:18:37 +00:00
elif [[ "$BOARD" =~ "arduino:sam:" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
arduino-cli core install arduino:sam;
elif [[ "$BOARD" =~ "adafruit:nrf52:" ]]; then
pip3 install --user adafruit-nrfutil;
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls https://www.adafruit.com/package_adafruit_index.json;
arduino-cli core install adafruit:nrf52 --additional-urls https://www.adafruit.com/package_adafruit_index.json;
elif [[ "$BOARD" =~ "Intel:arc32:" ]]; then
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
arduino-cli core install Intel:arc32;
elif [[ "$BOARD" =~ "arduino:megaavr:" ]]; then
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
arduino-cli core install arduino:megaavr;
2019-12-24 09:02:17 +00:00
elif [[ "$BOARD" =~ "SparkFun:apollo3:" ]]; then
2020-04-15 07:36:29 +00:00
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=none;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json;
arduino-cli core install SparkFun:apollo3 --additional-urls https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json;
elif [[ "$BOARD" =~ "arduino:mbed:" ]]; then
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index;
arduino-cli core install arduino:mbed;
export SKIP_PAT='(HTTP|MQTT).*ino';
elif [[ "$BOARD" =~ "stm32duino:STM32F1:" ]]; then
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls http://dan.drown.org/stm32duino/package_STM32duino_index.json;
arduino-cli core install stm32duino:STM32F1 --additional-urls http://dan.drown.org/stm32duino/package_STM32duino_index.json;
2020-05-12 06:42:10 +00:00
elif [[ "$BOARD" =~ "adafruit:samd:" ]]; then
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:28:38 +00:00
arduino-cli core update-index --additional-urls https://www.adafruit.com/package_adafruit_index.json
arduino-cli core install adafruit:samd --additional-urls https://www.adafruit.com/package_adafruit_index.json
2020-05-12 06:42:10 +00:00
elif [[ "$BOARD" =~ "arduino-beta:mbed:" ]]; then
export BUILD_EXAMPLES=false;
2020-07-06 16:31:05 +00:00
export WARNINGS=all;
2020-07-06 14:45:18 +00:00
arduino-cli core update-index;
2020-07-06 14:28:38 +00:00
arduino-cli core install arduino-beta:mbed;
export SKIP_PAT='(HTTP|MQTT).*ino';
fi
2020-04-15 07:29:05 +00:00
# check if this release commit (or forced build) and if so, build for every board
2020-04-15 07:36:29 +00:00
- if [[ "$TRAVIS_COMMIT_MESSAGE" =~ "Bump version to" || "$TRAVIS_COMMIT_MESSAGE" =~ "TRAVIS_FORCE_BUILD" ]]; then
2020-04-15 07:32:39 +00:00
export BUILD_EXAMPLES=true;
2020-04-15 07:29:05 +00:00
fi
2019-05-24 13:13:04 +00:00
# create directory to save the library and create symbolic link
2018-09-22 14:36:35 +00:00
install:
- mkdir -p $HOME/Arduino/libraries
2019-02-08 14:58:29 +00:00
- ln -s $PWD $HOME/Arduino/libraries/RadioLib
2019-05-24 13:13:04 +00:00
# only build the master branch
branches:
only:
- master
2018-09-22 14:36:35 +00:00
script:
# build all example sketches
2019-07-31 08:19:10 +00:00
- |
2020-04-15 07:36:29 +00:00
if [ ! -z "$BUILD_EXAMPLES" ] && [ "$BUILD_EXAMPLES" = true ] ; then
2020-04-15 07:29:05 +00:00
for example in $(find $PWD/examples -name '*.ino' | sort); do
# check whether to skip this sketch
if [ ! -z "$SKIP_PAT" ] && [[ ${example} =~ $SKIP_PAT ]]; then
# skip sketch
echo -e "\n\033[1;33mSkipped ${example##*/} (matched with $SKIP_PAT)\033[0m";
2019-07-31 07:38:04 +00:00
else
2020-04-15 07:29:05 +00:00
# build sketch
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
arduino-cli compile --fqbn $BOARD $example --warnings=$WARNINGS
2020-04-15 07:29:05 +00:00
if [ $? -ne 0 ]; then
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
exit 1;
else
echo -e "\033[1;32m${example##*/} build PASSED\033[0m\n";
fi
2019-07-31 07:38:04 +00:00
fi
2020-04-15 07:29:05 +00:00
done
else
2020-04-15 07:36:29 +00:00
echo -e "\n\033[1;33mExample builds skipped for $BOARD\033[0m";
2020-04-15 07:29:05 +00:00
fi
2019-07-31 07:38:04 +00:00
2019-05-24 13:13:04 +00:00
# generate Doxygen documentation (only for Arduino UNO)
- if [ $BOARD = "arduino:avr:uno" ]; then
sudo apt-get update;
sudo apt-get install -y doxygen;
doxygen Doxyfile;
fi
# deploy Doxygen docs on master branch and only when building for Arduino UNO
deploy:
provider: pages
skip_cleanup: true
local_dir: docs/html
github_token: $GH_REPO_TOKEN
on:
branch: master
condition: $BOARD = "arduino:avr:uno"