language: generic
before_install:
  - curl http://downloads.arduino.cc/arduino-cli/arduino-cli-latest-linux64.tar.bz2 | tar xj
  - mkdir -p $HOME/bin
  - mv arduino-cli $HOME/bin/arduino-cli
  - export PATH=$PATH:$HOME/bin
  - printf "board_manager:\n  additional_urls:\n    - https://dl.espressif.com/dl/package_esp32_index.json\n" > .arduino-cli.yaml
  - arduino-cli core update-index --config-file .arduino-cli.yaml
  - arduino-cli core install esp32:esp32 --config-file .arduino-cli.yaml
install:
  - mkdir -p $HOME/Arduino/libraries
  - git clone https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library.git $HOME/Arduino/libraries/TTGO_TWatch_Library
  - ln -s $PWD $HOME/Arduino/libraries/.
script:
  - arduino-cli compile -b esp32:esp32:ttgo-t-watch SimpleWatch.ino
notifications:
  email:
    recipients:
      - merkez-ul-icadat@protonmail.com
    on_success: change # default: change
    on_failure: always # default: always    
  slack: merkez-ul-icadat:lDvOOf5bILddEQCvzwOegVeh#smartwatch-app
