actions fix test #27
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 Firmware + Lint Check | |
on: | |
- pull_request | |
- workflow_dispatch | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports | |
jobs: | |
compile_firmware: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Unzip libraries | |
run: | | |
unzip -q ${{ github.workspace }}/libs/Adafruit_GFX_Library.zip -d ${{ github.workspace }}/libs/ | |
unzip -q ${{ github.workspace }}/libs/ArduinoAsync-master.zip -d ${{ github.workspace }}/libs/ | |
unzip -q ${{ github.workspace }}/libs/ESPAsyncWebServer-master.zip -d ${{ github.workspace }}/libs/ | |
- name: Compile firmware | |
uses: Foroxon/compile-sketches@2c502ef3d6bb2052153f646a096bc8d70a69e2b7 | |
with: | |
sketch-paths: | | |
- ${{ github.workspace }}/src/firmware | |
fqbn: esp32:esp32:esp32 | |
libraries: | | |
- source-path: ${{ github.workspace }}/libs/Adafruit_GFX_Library | |
- source-path: ${{ github.workspace }}/libs/ArduinoAsync-master | |
- source-path: ${{ github.workspace }}/libs/ESPAsyncWebServer-master | |
destination-name: ESP_Async_WebServer | |
- name: Adafruit SSD1306 | |
version: 2.5.7 | |
- name: home-assistant-integration | |
version: 2.0.0 | |
- name: NeoPixelBus by Makuna | |
version: 2.7.7 | |
- name: NTPClient | |
version: 3.2.1 | |
- name: WiFiManager | |
version: 2.0.16-rc.2 | |
- name: AsyncTCP | |
version: 1.1.4 | |
- name: ArduinoJson | |
version: 7.0.1 | |
enable-warnings-report: true | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
cli-compile-flags: | | |
- --export-binaries | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload firmware | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware.bin | |
path: ${{ github.workspace }}/src/firmware/build/esp32.esp32.esp32/firmware.ino.bin | |
- name: Upload reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
lint_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Lint check | |
uses: arduino/arduino-lint-action@v1 | |
with: | |
path: ${{ github.workspace }}/src/firmware | |
verbose: true | |
compliance: specification | |
report-file: ${{ github.workspace }}/lint-report.json | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lint-report | |
path: ${{ github.workspace }}/lint-report.json | |
report: | |
needs: compile_firmware # Wait for the compile 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 compile jobs | |
- name: Download sketches reports artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- uses: arduino/report-size-deltas@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} |