Implement non blocking OTA update over MQTT #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile Arduino Sketches | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/arduino-compile.yml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
push: | |
paths: | |
- ".github/workflows/arduino-compile.yml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
workflow_dispatch: | |
repository_dispatch: | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
SKETCHES_REPORTS_NAME: esp32 | |
jobs: | |
build: | |
name: Arduino Uno | |
runs-on: ubuntu-latest | |
env: | |
LIBRARIES: | | |
# Install the additionally needed dependency from the respository | |
- source-path: ./ | |
- name: TBPubSubClient | |
- name: ArduinoHttpClient | |
- name: ArduinoJson | |
- name: WiFiEsp | |
- name: TinyGSM | |
- name: StreamUtils | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Compile examples | |
uses: arduino/compile-sketches@v1 | |
with: | |
libraries: ${{ env.LIBRARIES }} | |
enable-deltas-report: true | |
sketch-paths: | | |
- examples/0000-arduino_send_telemetry/0000-arduino_send_telemetry.ino | |
- examples/0001-arduino_send_batch/0001-arduino_send_batch.ino | |
- examples/0002-arduino_rpc/0002-arduino_rpc.ino | |
- examples/0004-arduino-sim900_send_telemetry/0004-arduino-sim900_send_telemetry.ino | |
- examples/0005-arduino-sim900_send_telemetry_http/0005-arduino-sim900_send_telemetry_http.ino | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}/${{ env.SKETCHES_REPORTS_NAME }} | |
enable-warnings-report: 'true' | |
- name: Save memory usage change report as artifact | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: ${{ env.SKETCHES_REPORTS_NAME }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }}/${{ env.SKETCHES_REPORTS_NAME }} | |
report: | |
needs: build # Wait for the build job to finish to get the data for the report | |
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request | |
runs-on: ubuntu-latest | |
steps: | |
# This step is needed to get the size data produced by the build jobs | |
- name: Download sketches reports artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.SKETCHES_REPORTS_NAME }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }}/${{ env.SKETCHES_REPORTS_NAME }} | |
- uses: arduino/report-size-deltas@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}/${{ env.SKETCHES_REPORTS_NAME }} |