Implement support for ESP32 C6 and P4 SOCs (#421)

- Implement generic ESP32 devices
- Updated GitHub Actions to first build the SDKs. These are now based on the generic device implementations and the build act as a filter before compiling the dozens of other devices. It should save on resources when boards fail to compile.
- Adapted code to C6 and P4 differences, heavily borrowed from from https://github.com/ByteWelder/Tactility/pull/394 written by @marciogranzotto, with some changes of my own
- Updated `device.py` to make the `[display]` section optional
This commit is contained in:
Ken Van Hoeylandt
2025-11-24 19:28:07 +01:00
committed by GitHub
parent fec8033fd7
commit b565d56029
33 changed files with 279 additions and 72 deletions
-26
View File
@@ -1,26 +0,0 @@
name: Build SDK
on:
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened ]
permissions: read-all
jobs:
Build:
strategy:
matrix:
board: [
{ id: cyd-2432s028r, arch: esp32 },
{ id: lilygo-tdeck, arch: esp32s3 },
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Build"
uses: ./.github/actions/build-sdk
with:
board_id: ${{ matrix.board.id }}
arch: ${{ matrix.board.arch }}
@@ -11,7 +11,24 @@ on:
permissions: read-all
jobs:
Build:
BuildSdk:
strategy:
matrix:
board: [
{ id: generic-esp32, arch: esp32 },
{ id: generic-esp32c6, arch: esp32c6 },
{ id: generic-esp32p4, arch: esp32p4 },
{ id: generic-esp32s3, arch: esp32s3 },
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Build SDK"
uses: ./.github/actions/build-sdk
with:
board_id: ${{ matrix.board.id }}
arch: ${{ matrix.board.arch }}
BuildFirmware:
strategy:
matrix:
board: [
@@ -52,30 +69,31 @@ jobs:
{ id: waveshare-s3-touch-lcd-43, arch: esp32s3 }
]
runs-on: ubuntu-latest
needs: [ BuildSdk ]
steps:
- uses: actions/checkout@v4
- name: "Build"
- name: "Build Firmware"
uses: ./.github/actions/build-firmware
with:
board_id: ${{ matrix.board.id }}
arch: ${{ matrix.board.arch }}
Bundle:
BundleFirmware:
runs-on: ubuntu-latest
needs: [ Build ]
needs: [ BuildFirmware ]
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@v4
- name: "Bundle"
- name: "Bundle Firmware"
uses: ./.github/actions/bundle-firmware
PublishSnapshot:
PublishFirmwareSnapshot:
runs-on: ubuntu-latest
needs: [ Bundle ]
needs: [ BundleFirmware ]
if: (github.event_name == 'push' && github.ref == 'refs/heads/main')
steps:
- uses: actions/checkout@v4
- name: "Publish Snapshot"
- name: "Publish Firmware Snapshot"
env:
CDN_ID: ${{ secrets.CDN_ID }}
CDN_TOKEN_NAME: ${{ secrets.CDN_TOKEN_NAME }}
@@ -83,13 +101,13 @@ jobs:
uses: ./.github/actions/publish-firmware
with:
cdn_version: snapshot
PublishRelease:
PublishFirmwareStable:
runs-on: ubuntu-latest
needs: [ Bundle ]
needs: [ BundleFirmware ]
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@v4
- name: "Publish Stable"
- name: "Publish Firmware Stable"
env:
CDN_ID: ${{ secrets.CDN_ID }}
CDN_TOKEN_NAME: ${{ secrets.CDN_TOKEN_NAME }}