Merge pull request #279 from MallocArray/patch-2

Update workflow to use compile-sketches action
This commit is contained in:
Samuel Siburian
2025-02-16 04:32:28 +07:00
committed by GitHub

View File

@ -17,11 +17,14 @@ jobs:
- "esp32:esp32:esp32c3" - "esp32:esp32:esp32c3"
include: include:
- fqbn: "esp8266:esp8266:d1_mini" - fqbn: "esp8266:esp8266:d1_mini"
core: "esp8266:esp8266@3.1.2" core: "esp8266:esp8266"
core_version: "3.1.2"
core_url: "https://arduino.esp8266.com/stable/package_esp8266com_index.json" core_url: "https://arduino.esp8266.com/stable/package_esp8266com_index.json"
- fqbn: "esp32:esp32:esp32c3" - fqbn: "esp32:esp32:esp32c3"
core: "esp32:esp32"
core_version: "2.0.17"
core_url: "https://espressif.github.io/arduino-esp32/package_esp32_index.json"
board_options: "JTAGAdapter=default,CDCOnBoot=cdc,PartitionScheme=min_spiffs,CPUFreq=160,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=verbose,EraseFlash=none" board_options: "JTAGAdapter=default,CDCOnBoot=cdc,PartitionScheme=min_spiffs,CPUFreq=160,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=verbose,EraseFlash=none"
core: "esp32:esp32@2.0.11"
exclude: exclude:
- example: "BASIC" - example: "BASIC"
fqbn: "esp32:esp32:esp32c3" fqbn: "esp32:esp32:esp32c3"
@ -31,30 +34,27 @@ jobs:
fqbn: "esp32:esp32:esp32c3" fqbn: "esp32:esp32:esp32c3"
- example: "OneOpenAir" - example: "OneOpenAir"
fqbn: "esp8266:esp8266:d1_mini" fqbn: "esp8266:esp8266:d1_mini"
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4.2.2
- run: - uses: arduino/compile-sketches@v1.1.2
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | with:
sh -s 0.35.3 fqbn: ${{ matrix.fqbn }}
- run: bin/arduino-cli --verbose core install '${{ matrix.core }}' sketch-paths: |
--additional-urls '${{ matrix.core_url }}' examples/${{ matrix.example }}
- run: bin/arduino-cli --verbose lib install libraries: |
WiFiManager@2.0.16-rc.2 - source-path: ./
Arduino_JSON@0.2.0 cli-compile-flags: |
U8g2@2.34.22 - --warnings
# In some cases, actions/checkout@v4 will check out a detached HEAD; for - none
# example, this happens on pull request events, where an hypothetical - --board-options
# PR merge commit is checked out. This tends to confuse - "${{ matrix.board_options }}"
# `arduino-cli lib install --git-url`, making it fail with errors such as: platforms: |
# Error installing Git Library: Library install failed: object not found - name: ${{ matrix.core }}
# Create and check out a dummy branch to work around this issue. version: ${{ matrix.core_version}}
- run: git checkout -b check source-url: ${{ matrix.core_url }}
- run: bin/arduino-cli --verbose lib install --git-url . enable-deltas-report: true
env:
ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL: "true"
- run: bin/arduino-cli --verbose compile 'examples/${{ matrix.example }}'
--fqbn '${{ matrix.fqbn }}' --board-options '${{ matrix.board_options }}'
# TODO: at this point it would be a good idea to run some smoke tests on # TODO: at this point it would be a good idea to run some smoke tests on
# the resulting image (e.g. that it boots successfully and sends metrics) # the resulting image (e.g. that it boots successfully and sends metrics)
# but that would either require a high fidelity device emulator, or a # but that would either require a high fidelity device emulator, or a