Add Woodpecker CI pipeline with Gitea release upload
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
ClearGrow Controller CI / CI Status Summary (push) Has been cancelled
ClearGrow Controller CI / Run Unit Tests (push) Has been cancelled
ClearGrow Controller CI / Build Development Firmware (push) Has been cancelled
ClearGrow Controller CI / Build Production Firmware (push) Has been cancelled
Release Build / Build and Release Firmware (push) Has been cancelled

- ESP-IDF v5.3 Docker image for building
- Builds on push, PR, and tag events
- Uploads firmware binaries to Gitea releases on tags
- Includes bootloader, partition table, and ELF with debug symbols

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CI System
2025-12-10 20:58:50 -07:00
parent 40d78e553a
commit 5bfcbf414b

View File

@@ -1,8 +1,8 @@
# ClearGrow Controller - ESP-IDF Build Pipeline
# Triggers on push to any branch and pull requests
# Triggers on push to any branch, pull requests, and tags
when:
- event: [push, pull_request]
- event: [push, pull_request, tag]
steps:
- name: build
@@ -11,26 +11,58 @@ steps:
- echo "=== ClearGrow Controller Build ==="
- 'echo "Commit: ${CI_COMMIT_SHA}"'
- 'echo "Branch: ${CI_COMMIT_BRANCH}"'
- 'echo "Tag: ${CI_COMMIT_TAG}"'
- echo ""
# Source ESP-IDF environment
- . /opt/esp/idf/export.sh
- 'echo "ESP-IDF version:"'
- idf.py --version
- echo ""
# Set target if not already set
- |
if [ ! -f build/CMakeCache.txt ] || ! grep -q "IDF_TARGET:STRING=esp32s3" build/CMakeCache.txt 2>/dev/null; then
echo "Setting target to ESP32-S3..."
idf.py set-target esp32s3
else
echo "Target already set to ESP32-S3"
fi
# Build with parallel jobs
- NPROC=$(nproc)
- 'echo "Starting build with $NPROC parallel jobs..."'
- idf.py build -- -j$NPROC
# Set target and build
- idf.py set-target esp32s3
- idf.py build
- echo ""
- echo "=== Build successful ==="
- echo ""
- 'echo "Binary sizes:"'
- ls -lh build/*.bin 2>/dev/null || true
- ls -lh build/bootloader/*.bin 2>/dev/null || true
# Copy artifacts to release directory
- mkdir -p release
- cp build/cleargrow-controller.bin release/cleargrow-controller-${CI_COMMIT_TAG:-dev}.bin 2>/dev/null || true
- cp build/bootloader/bootloader.bin release/bootloader-${CI_COMMIT_TAG:-dev}.bin 2>/dev/null || true
- cp build/partition_table/partition-table.bin release/partition-table-${CI_COMMIT_TAG:-dev}.bin 2>/dev/null || true
- cp build/cleargrow-controller.elf release/cleargrow-controller-${CI_COMMIT_TAG:-dev}.elf 2>/dev/null || true
- name: release
image: quay.io/thegeeklab/wp-gitea-release
when:
- event: tag
settings:
base_url: https://git.cleargrow.io
api_key:
from_secret: gitea_release_token
files:
- release/*.bin
- release/*.elf
title: "Controller Firmware ${CI_COMMIT_TAG}"
note: |
## ClearGrow Controller Firmware ${CI_COMMIT_TAG}
Firmware release for the ESP32-S3 touchscreen controller.
### Files
- `cleargrow-controller-${CI_COMMIT_TAG}.bin` - Main application binary
- `bootloader-${CI_COMMIT_TAG}.bin` - Bootloader binary
- `partition-table-${CI_COMMIT_TAG}.bin` - Partition table
- `cleargrow-controller-${CI_COMMIT_TAG}.elf` - ELF with debug symbols
### Flashing
```bash
# Using esptool.py (flash all)
esptool.py --chip esp32s3 -b 460800 --before default_reset --after hard_reset write_flash \
0x0 bootloader-${CI_COMMIT_TAG}.bin \
0x8000 partition-table-${CI_COMMIT_TAG}.bin \
0x10000 cleargrow-controller-${CI_COMMIT_TAG}.bin
# Or using idf.py with the ELF
idf.py -p /dev/ttyUSB0 flash
```