mirror of
https://github.com/Fishwaldo/ESP32-Chimera-Core.git
synced 2025-03-16 03:41:39 +00:00
131 lines
8.4 KiB
YAML
131 lines
8.4 KiB
YAML
sudo: required
|
|
|
|
language: python
|
|
python: 3.6
|
|
|
|
|
|
env:
|
|
global:
|
|
# The Arduino IDE will be installed at APPLICATION_FOLDER/arduino
|
|
- APPLICATION_FOLDER="${HOME}/arduino-ide"
|
|
- SKETCHBOOK_FOLDER="${HOME}/arduino-sketchbook"
|
|
|
|
before_install:
|
|
|
|
# TODO: undo
|
|
# remove submodules, we don't want those to be actually tested for compliance
|
|
# - git submodule status | rm -Rf `cut -d ' ' -f 3`
|
|
|
|
# Formatting checks:
|
|
# Check for files starting with a blank line
|
|
#- find . -type d \( -path './.git' -o -path './examples' -o -path './src/Fonts' \) -prune -or -type f -print0 | xargs -0 -L1 bash -c 'head -1 "$0" | grep --binary-files=without-match --regexp="^$"; if [[ "$?" == "0" ]]; then echo "Blank line found at start of $0."; false; fi'
|
|
# don't check for tabs
|
|
#- find . -type d \( -path './.git' -o -path './examples' -o -path './src/Fonts' \) -prune -or -type f \( ! -iname ".gitmodules" \) -exec grep --with-filename --line-number --binary-files=without-match --regexp=$'\t' '{}' \; -exec echo 'Tab found.' \; -exec false '{}' +
|
|
# Check for trailing whitespace
|
|
#- find . -type d \( -path './.git' -o -path './examples' -o -path './src/Fonts' \) -prune -or -type f -exec grep --with-filename --line-number --binary-files=without-match --regexp='[[:blank:]]$' '{}' \; -exec echo 'Trailing whitespace found.' \; -exec false '{}' +
|
|
# Check for non-Unix line endings
|
|
#- find . -type d \( -path './.git' -o -path './examples' -o -path './src/Fonts' \) -prune -or -type f -exec grep --files-with-matches --binary-files=without-match --regexp=$'\r$' '{}' \; -exec echo 'Non-Unix EOL detected.' \; -exec false '{}' +
|
|
# Check for blank lines at end of files
|
|
#- find . -type d \( -path './.git' -o -path './examples' -o -path './src/Fonts' \) -prune -or -type f -print0 | xargs -0 -L1 bash -c 'tail -1 "$0" | grep --binary-files=without-match --regexp="^$"; if [[ "$?" == "0" ]]; then echo "Blank line found at end of $0."; false; fi'
|
|
# Check for files that don't end in a newline (https://stackoverflow.com/a/25686825)
|
|
#- find . -type d \( -path './.git' -o -path './examples' -o -path './src/Fonts' \) -prune -or -type f -print0 | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
|
|
|
|
- git clone https://github.com/per1234/arduino-ci-script.git "${HOME}/scripts/arduino-ci-script"
|
|
- cd "${HOME}/scripts/arduino-ci-script"
|
|
# Get new tags from the remote
|
|
- git fetch --tags
|
|
# Checkout the latest tag
|
|
- git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
|
- source "${HOME}/scripts/arduino-ci-script/arduino-ci-script.sh"
|
|
|
|
#- set_script_verbosity 1
|
|
#- set_verbose_output_during_compilation "true"
|
|
|
|
# Check for library issues that don't affect compilation
|
|
- set_library_testing "true"
|
|
|
|
- set_application_folder "$APPLICATION_FOLDER"
|
|
- set_sketchbook_folder "$SKETCHBOOK_FOLDER"
|
|
|
|
#- install_ide '("1.8.0" "1.8.10" "1.8.11")'
|
|
# - install_ide '("1.8.12" "newest")' # note: 'newest' often fails on new release of arduino IDE
|
|
- install_ide '("1.8.13")'
|
|
|
|
# Install the library from the repository
|
|
- install_library
|
|
- install_library "LovyanGFX"
|
|
#- install_library "https://github.com/lovyan03/LovyanGFX/archive/develop.zip"
|
|
- install_package "esp32:esp32" "https://dl.espressif.com/dl/package_esp32_index.json"
|
|
# - install_package "m5stack:esp32" "https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json" # m5stack:esp32:m5stack-core2
|
|
# install ESP32-Chimera-Core custom boards + pins variants
|
|
- cp -R ${TRAVIS_BUILD_DIR}/boards/* ~/.arduino15/packages/esp32/hardware/esp32/1.0.6/
|
|
# Arduino CLI wants pyserial
|
|
- pip install pyserial
|
|
|
|
script:
|
|
# Compile all example sketches included with the library
|
|
# build_sketch arguments: sketch name, fqbn, allow failure, IDE version/list/range
|
|
- check_library_manager_compliance "$TRAVIS_BUILD_DIR"
|
|
# no need to treat compiler warnings as error
|
|
- set_ide_preference "compiler.warning_level=auto"
|
|
# compile at least one basic example
|
|
# TODO: test different boards (odroid, wrover)
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/Cellular_Automata/Cellular_Automata.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/Sprite/Sprite_scroll_16bit/Sprite_scroll_16bit.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/Sprite/Sprite_scroll_8bit/Sprite_scroll_8bit.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/TFT_ArcFill/TFT_ArcFill.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/TFT_FillArcSpiral/TFT_FillArcSpiral.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/TFT_Mandlebrot/TFT_Mandlebrot.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
#- build_sketch "${TRAVIS_BUILD_DIR}/examples/Advanced/Display/TFT_Spiro/TFT_Spiro.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "oldest" "newest"
|
|
|
|
# multiple devices tests
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:m5stick-c" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:odroid_esp32" "false" "newest"
|
|
# - build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "m5stack:esp32:m5stack-core2" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:m5stack-core2" "false" "newest"
|
|
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:esp32" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:esp32wroverkit" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:d32_pro" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:d-duino-32-xs" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:twatch" "false" "newest"
|
|
- build_sketch "${TRAVIS_BUILD_DIR}/examples/Basics/Display/Display.ino" "esp32:esp32:ttgo-t1" "false" "newest"
|
|
|
|
#- if [ "$TRAVIS_BRANCH" != "master" ]; then echo "This commit was made against the $TRAVIS_BRANCH, skipping examples compilation"; exit 0; fi
|
|
#- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "This is a pull request, skipping examples compilation"; exit 0; fi
|
|
# compile all examples (will result in timeout if too many sketches are found)
|
|
#- find "$TRAVIS_BUILD_DIR/examples/" -name *ino | while read file; do build_sketch "$file" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "newest"; done | echo "Skipping examples build"
|
|
|
|
|
|
after_script:
|
|
# Commit a report of the job results to the CI-reports repository
|
|
- USER_NAME="$(echo "$TRAVIS_REPO_SLUG" | cut -d'/' -f 1)"
|
|
- REPOSITORY_NAME="$(echo "$TRAVIS_REPO_SLUG" | cut -d'/' -f 2)"
|
|
- publish_report_to_repository "$REPORT_GITHUB_TOKEN" "https://github.com/${USER_NAME}/CI-reports.git" "$REPOSITORY_NAME" "build_$(printf "%05d\n" "${TRAVIS_BUILD_NUMBER}")" "false"
|
|
# Print a tab separated report of all sketch verification results to the log
|
|
- display_report
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
on_failure: always
|
|
webhooks:
|
|
urls:
|
|
- https://www.travisbuddy.com/
|
|
on_success: never
|
|
on_failure: always
|
|
|
|
before_deploy:
|
|
- cd /home/travis/build/tobozo/
|
|
- tar -zcf ${TRAVIS_BUILD_DIR}${TRAVIS_TAG}.tar.gz ESP32-Chimera-Core
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key: "$GH_TOKEN"
|
|
file: ${TRAVIS_BUILD_DIR}${TRAVIS_TAG}.tar.gz
|
|
skip_cleanup: true
|
|
draft: true
|
|
#on:
|
|
# tags: true
|