Adding complete Espressif IDF compatibility #99
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 ESP32 Sketches | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/esp32-compile.yml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
push: | |
paths: | |
- ".github/workflows/esp32-compile.yml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
workflow_dispatch: | |
repository_dispatch: | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
SKETCHES_REPORTS_NAME: esp32 | |
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 | |
- name: StreamUtils | |
strategy: | |
matrix: | |
board: | |
- fqbn: "esp32:esp32:esp32" | |
platform-name: esp32:esp32 | |
# Make board type-specific customizations to the matrix jobs | |
include: | |
- board: | |
platform-name: esp32:esp32 | |
platforms: | | |
# Install ESP32 platform via Boards Manager | |
- name: esp32:esp32 | |
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install ESP32 platform dependencies | |
if: matrix.board.platform-name == 'esp32:esp32' | |
run: pip3 install pyserial | |
- 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 }} |