Merge pull request #199 from hayschan/add-esp-idf-examples #174
Workflow file for this run
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 ESP8266 Sketches | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/esp8266-compile.yml" | |
- "library.json" | |
- "examples/**" | |
- "src/**" | |
push: | |
paths: | |
- ".github/workflows/esp8266-compile.yml" | |
- "library.json" | |
- "examples/**" | |
- "src/**" | |
workflow_dispatch: | |
repository_dispatch: | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
SKETCHES_REPORTS_NAME: esp8266 | |
jobs: | |
build: | |
name: ${{ matrix.board.fqbn }} | |
runs-on: ubuntu-latest | |
env: | |
LIBRARIES: | | |
# Install the additionally needed dependency from the respository | |
- source-path: ./ | |
- name: TBPubSubClient | |
- name: ArduinoHttpClient | |
- { name: ArduinoJson, version: 6.21.4 } | |
- name: Seeed_Arduino_mbedtls | |
- name: StreamUtils | |
strategy: | |
matrix: | |
board: | |
- fqbn: "esp8266:esp8266:generic" | |
platform-name: esp8266:esp8266 | |
# Make board type-specific customizations to the matrix jobs | |
include: | |
- board: | |
platform-name: esp8266:esp8266 | |
platforms: | | |
# Install ESP8266 platform via Boards Manager | |
- name: esp8266:esp8266 | |
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
version: 3.1.1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Compile examples | |
uses: arduino/compile-sketches@v1 | |
with: | |
platforms: ${{ matrix.platforms }} | |
fqbn: ${{ matrix.board.fqbn }} | |
libraries: ${{ env.LIBRARIES }} | |
enable-deltas-report: true | |
sketch-paths: | | |
- examples/0003-esp8266_esp32_send_data/0003-esp8266_esp32_send_data.ino | |
- examples/0006-esp8266_esp32_process_shared_attribute_update/0006-esp8266_esp32_process_shared_attribute_update.ino | |
- examples/0007-esp8266_esp32_claim_device/0007-esp8266_esp32_claim_device.ino | |
- examples/0008-esp8266_esp32_provision_device/0008-esp8266_esp32_provision_device.ino | |
- examples/0009-esp8266_esp32_process_OTA_MQTT/0009-esp8266_esp32_process_OTA_MQTT.ino | |
- examples/0010-esp8266_esp32_rpc/0010-esp8266_esp32_rpc.ino | |
- examples/0011-esp8266_esp32_subscribe_OTA_MQTT/0011-esp8266_esp32_subscribe_OTA_MQTT.ino | |
- examples/0012-esp8266_esp32_request_shared_attribute/0012-esp8266_esp32_request_shared_attribute.ino | |
- examples/0013-esp8266_esp32_request_rpc/0013-esp8266_esp32_request_rpc.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 }} |