Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/gridlights-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: GridLights Build

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
name: Build (${{ matrix.environment }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment:
- esp32dev
# Add more GridLights target environments here as needed

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Cache PlatformIO toolchains and packages
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-platformio-${{ hashFiles('platformio.ini') }}
restore-keys: |
${{ runner.os }}-platformio-

- name: Cache .pio build directory
uses: actions/cache@v4
with:
path: .pio
key: ${{ runner.os }}-pio-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'wled00/**') }}
restore-keys: |
${{ runner.os }}-pio-${{ matrix.environment }}-

- name: Install PlatformIO
run: pip install -r requirements.txt

- name: Build ${{ matrix.environment }}
run: pio run -e ${{ matrix.environment }}

- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.environment }}
path: .pio/build/${{ matrix.environment }}/firmware.bin
if-no-files-found: error
41 changes: 41 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Version Check

on:
pull_request:
branches:
- main

jobs:
check-version-bump:
name: GRIDLIGHTS_VERSION bumped
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Extract version on PR branch
id: pr_version
run: |
VERSION=$(grep GRIDLIGHTS_VERSION platformio_override.ini | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Extract version on main
id: main_version
run: |
VERSION=$(git show origin/main:platformio_override.ini | grep GRIDLIGHTS_VERSION | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Fail if version not bumped
run: |
PR="${{ steps.pr_version.outputs.version }}"
MAIN="${{ steps.main_version.outputs.version }}"
echo "main: $MAIN"
echo "PR: $PR"
if [ "$PR" = "$MAIN" ]; then
echo "❌ GRIDLIGHTS_VERSION ($MAIN) must be bumped before merging."
echo " Update GRIDLIGHTS_VERSION in platformio_override.ini."
exit 1
fi
echo "✅ Version bumped: $MAIN → $PR"
91 changes: 0 additions & 91 deletions .github/workflows/wled-ci.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
.vscode

esp01-update.sh
platformio_override.ini
replace_fs.py
wled-update.sh

Expand Down
Binary file added firmware.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# CI binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth # ESP32 variant builds are temporarily excluded from CI due to toolchain issues on the GitHub Actions Linux environment
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, esp32dev, esp32_eth, esp32dev_audioreactive, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB, esp32s3dev_8MB_PSRAM_opi
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, esp32dev, esp32_eth, esp32dev_audioreactive, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB, esp32s3dev_8MB_PSRAM_opi

# Release binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB
Expand All @@ -30,7 +30,7 @@ default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_compat, esp8266_2
; default_envs = h803wf
; default_envs = d1_mini_debug
; default_envs = d1_mini_ota
; default_envs = esp32dev
default_envs = esp32dev
; default_envs = esp8285_4CH_MagicHome
; default_envs = esp8285_H801
; default_envs = d1_mini_5CH_Shojo_PCB
Expand Down
11 changes: 11 additions & 0 deletions platformio_override.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; GridLights hardware configuration
; Overrides for the GridLights ESP32 board on top of upstream WLED platformio.ini

[env:esp32dev]
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32
-D LEDPIN=4
-D DEFAULT_LED_COUNT=37
-D DEFAULT_LED_TYPE=30
-D RLYPIN=5
-D RLYMDE=0
-D GRIDLIGHTS_VERSION=\"2.2.1\"
Loading