parent
8c309d648c
commit
1f05e2b8ca
|
|
@ -16,8 +16,14 @@ jobs:
|
||||||
# Code Quality & Linting
|
# Code Quality & Linting
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
quality-check:
|
quality-check:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os-hosts:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
|
||||||
name: Arduino Lint Check
|
name: Arduino Lint Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os-hosts }}
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -25,8 +31,9 @@ jobs:
|
||||||
|
|
||||||
- uses: arduino/setup-arduino-cli@v2
|
- uses: arduino/setup-arduino-cli@v2
|
||||||
|
|
||||||
- name: Cache Arduino Core
|
- name: Restore Arduino Core Cache
|
||||||
uses: actions/cache@v4
|
id: cache-core
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.arduino15/packages
|
~/.arduino15/packages
|
||||||
|
|
@ -36,10 +43,20 @@ jobs:
|
||||||
arduino-core-${{ runner.os }}-
|
arduino-core-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Install ESP32 Core
|
- name: Install ESP32 Core
|
||||||
|
if: steps.cache-core.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
arduino-cli core install esp32:esp32
|
arduino-cli core install esp32:esp32
|
||||||
|
|
||||||
|
- name: Save Arduino Core Cache
|
||||||
|
if: always() && steps.cache-core.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.arduino15/packages
|
||||||
|
~/.arduino15/cache
|
||||||
|
key: arduino-core-${{ runner.os }}-esp32-v1
|
||||||
|
|
||||||
- uses: arduino/arduino-lint-action@v2
|
- uses: arduino/arduino-lint-action@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
|
|
@ -51,26 +68,26 @@ jobs:
|
||||||
# Compilation Test
|
# Compilation Test
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
compile-test:
|
compile-test:
|
||||||
name: Compile Example Sketches
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
example:
|
example:
|
||||||
- examples/dshot300/dshot300.ino
|
- examples/dshot300/dshot300.ino
|
||||||
- examples/command_manager/command_manager.ino
|
os-hosts:
|
||||||
- examples/web_control/web_control.ino
|
- ubuntu-latest
|
||||||
- examples/web_client/web_client.ino
|
- windows-latest
|
||||||
|
|
||||||
|
name: Compile Sketches
|
||||||
|
runs-on: ${{ matrix.os-hosts }}
|
||||||
|
timeout-minutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: arduino/setup-arduino-cli@v2
|
- uses: arduino/setup-arduino-cli@v2
|
||||||
|
|
||||||
- name: Cache Arduino Core & Libraries
|
- name: Restore Arduino Core & Libraries Cache
|
||||||
uses: actions/cache@v4
|
id: cache-all
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.arduino15/packages
|
~/.arduino15/packages
|
||||||
|
|
@ -80,32 +97,55 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
arduino-full-${{ runner.os }}-
|
arduino-full-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Install ESP32 Core and Dependencies
|
- name: Install ESP32 Core and Dependencies (Linux)
|
||||||
|
if: steps.cache-all.outputs.cache-hit != 'true' && runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
arduino-cli core install esp32:esp32
|
arduino-cli core install esp32:esp32
|
||||||
|
|
||||||
mkdir -p ~/Arduino/libraries
|
mkdir -p ~/Arduino/libraries
|
||||||
|
|
||||||
# Cached repository check
|
|
||||||
if [ ! -d ~/Arduino/libraries/ArduinoJson ]; then
|
if [ ! -d ~/Arduino/libraries/ArduinoJson ]; then
|
||||||
git clone --depth=1 https://github.com/bblanchon/ArduinoJson.git ~/Arduino/libraries/Json
|
git clone --depth=1 https://github.com/bblanchon/ArduinoJson.git ~/Arduino/libraries/ArduinoJson
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d ~/Arduino/libraries/ESPAsyncWebServer ]; then
|
if [ ! -d ~/Arduino/libraries/ESPAsyncWebServer ]; then
|
||||||
git clone --depth=1 https://github.com/ESP32Async/ESPAsyncWebServer ~/Arduino/libraries/ESPAsyncWebServer
|
git clone --depth=1 https://github.com/ESP32Async/ESPAsyncWebServer ~/Arduino/libraries/ESPAsyncWebServer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d ~/Arduino/libraries/AsyncTCP ]; then
|
if [ ! -d ~/Arduino/libraries/AsyncTCP ]; then
|
||||||
git clone --depth=1 https://github.com/ESP32Async/AsyncTCP ~/Arduino/libraries/AsyncTCP
|
git clone --depth=1 https://github.com/ESP32Async/AsyncTCP ~/Arduino/libraries/AsyncTCP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Install ESP32 Core and Dependencies (Windows)
|
||||||
|
if: steps.cache-all.outputs.cache-hit != 'true' && runner.os == 'Windows'
|
||||||
|
run: |
|
||||||
|
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
|
arduino-cli core install esp32:esp32
|
||||||
|
|
||||||
|
# PowerShell If-Bedingungen, um nur fehlende Bibliotheken zu klonen
|
||||||
|
if (-not (Test-Path -Path "$env:USERPROFILE/Arduino/libraries/ArduinoJson")) {
|
||||||
|
git clone --depth=1 https://github.com/bblanchon/ArduinoJson.git "$env:USERPROFILE/Arduino/libraries/ArduinoJson"
|
||||||
|
}
|
||||||
|
if (-not (Test-Path -Path "$env:USERPROFILE/Arduino/libraries/ESPAsyncWebServer")) {
|
||||||
|
git clone --depth=1 https://github.com/ESP32Async/ESPAsyncWebServer "$env:USERPROFILE/Arduino/libraries/ESPAsyncWebServer"
|
||||||
|
}
|
||||||
|
if (-not (Test-Path -Path "$env:USERPROFILE/Arduino/libraries/AsyncTCP")) {
|
||||||
|
git clone --depth=1 https://github.com/ESP32Async/AsyncTCP "$env:USERPROFILE/Arduino/libraries/AsyncTCP"
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Save Arduino Core & Libraries Cache
|
||||||
|
if: always() && steps.cache-all.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.arduino15/packages
|
||||||
|
~/.arduino15/cache
|
||||||
|
~/Arduino/libraries
|
||||||
|
key: arduino-full-${{ runner.os }}-esp32-v1
|
||||||
|
|
||||||
- name: Compile Sketch
|
- name: Compile Sketch
|
||||||
run: |
|
run: |
|
||||||
arduino-cli compile \
|
arduino-cli compile --fqbn esp32:esp32:esp32 --library ${{ github.workspace }} ${{ matrix.example }}
|
||||||
--fqbn esp32:esp32:esp32 \
|
|
||||||
--library ${{ github.workspace }} \
|
|
||||||
${{ matrix.example }}
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Build Status Report
|
# Build Status Report
|
||||||
|
|
@ -138,3 +178,4 @@ jobs:
|
||||||
&& echo "Your DShotRMT library is ready for deployment." >> $GITHUB_STEP_SUMMARY \
|
&& echo "Your DShotRMT library is ready for deployment." >> $GITHUB_STEP_SUMMARY \
|
||||||
|| echo "## ⚠️ Action Required" >> $GITHUB_STEP_SUMMARY \
|
|| echo "## ⚠️ Action Required" >> $GITHUB_STEP_SUMMARY \
|
||||||
&& echo "Please review the failed checks and address any issues." >> $GITHUB_STEP_SUMMARY
|
&& echo "Please review the failed checks and address any issues." >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
Loading…
Reference in New Issue