Skip to content

Merge pull request #804 from MartinMueller2003/main #10

Merge pull request #804 from MartinMueller2003/main

Merge pull request #804 from MartinMueller2003/main #10

Workflow file for this run

name: ESPixelStick CI
on: [push, pull_request, workflow_dispatch]
env:
VERSION_BASE: "4.0"
jobs:
firmware:
strategy:
matrix:
include:
# ESPixelStick V3
- target: "espsv3"
chip: "esp8266"
# Wemos D1 Mini ESP8266
- target: "d1_mini"
chip: "esp8266"
# Wemos D1 Mini PRO ESP8266
- target: "d1_mini_pro"
chip: "esp8266"
# Wemos D1 Mini ESP8266 Plus LoLinSD Card
- target: "d1_mini_lolinsd"
chip: "esp8266"
# ESP01S
- target: "esp01s"
chip: "esp8266"
# Wemos D1 Mini ESP32
- target: "d1_mini32"
chip: "esp32"
# Wemos D1 Mini ESP32
- target: "d1_mini32_eth"
chip: "esp32"
# Lolin D32 Pro
- target: "d32_pro"
chip: "esp32"
# ESP32 Bong69
- target: "esp32_bong69"
chip: "esp32"
# ESP32 CAM
- target: "esp32_cam"
chip: "esp32"
# Lolin D32 Pro eth
- target: "d32_pro_eth"
chip: "esp32"
# TTGO T8
- target: "esp32_ttgo_t8"
chip: "esp32"
# WT 32 Ethernet Board
- target: "esp32_wt32eth01"
chip: "esp32"
# QuinLed QUAD Dig OCTA
- target: "esp32_quinled_dig_octa"
chip: "esp32"
# QuinLed QUAD
- target: "esp32_quinled_quad"
chip: "esp32"
# QuinLed QUAD AE+
- target: "esp32_quinled_quad_ae_plus"
chip: "esp32"
# QuinLed QUAD AE+ 8
- target: "esp32_quinled_quad_ae_plus_8"
chip: "esp32"
# QuinLed QUAD Eth
- target: "esp32_quinled_quad_eth"
chip: "esp32"
# QuinLed UNO
- target: "esp32_quinled_uno"
chip: "esp32"
# QuinLed UNO AE +
- target: "esp32_quinled_uno_ae_plus"
chip: "esp32"
# QuinLed UNO Eth
- target: "esp32_quinled_uno_eth"
chip: "esp32"
# QuinLed UNO Eth
- target: "esp32_quinled_uno_eth_espsv3"
chip: "esp32"
# Wasatch
- target: "esp32_wasatch"
chip: "esp32"
# mh et esp32 mini kit
- target: "d1_mini_mhetesp32minikit"
chip: "esp32"
# Olimex ESP32 Gateway
- target: "olimex_esp32_gw"
chip: "esp32"
# Twilight Lord
- target: "d1_mini_twilightlord"
chip: "esp32"
# Twilight Lord ETH
- target: "d1_mini_twilightlord_eth"
chip: "esp32"
# DEVKITC
- target: "esp32_devkitc"
chip: "esp32"
# M5Stack Atom
- target: "m5stack_atom"
chip: "esp32"
#
- target: "esp3deuxquatro_dmx"
chip: "esp32"
#
- target: "esp32_quinled_uno_espsv3"
chip: "esp32"
#
- target: "esp32_tetra2go"
chip: "esp32"
#
- target: "esp32_octa2go"
chip: "esp32"
# KR Lights
- target: "esp32_kr_lights_msm"
chip: "esp32"
#
- target: "esp32_ka"
chip: "esp32"
#
- target: "esp32_breakdancev2"
chip: "esp32"
runs-on: ubuntu-latest
steps:
# Checkout ESPixelStick
- uses: actions/checkout@v4
- name: Create version file
run: |
mkdir firmware
echo "${VERSION_BASE}-ci${GITHUB_RUN_ID}" > firmware/VERSION
- name: Tagged version release
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo "${GITHUB_REF#refs/*/v}" > firmware/VERSION
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
# Build and move / rename firmware files
# Make sure to update bootloader and boot_app0.bin location when the ESP32 core updates
- name: Compile for ${{ matrix.target }}
env:
chip: ${{ matrix.chip }}
run: |
pio run -e ${{ matrix.target }}
ls -al ./firmware/${{ matrix.chip }}
ls -al ./debug/${{ matrix.chip }}
- name: Upload Firmware Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-binary-${{ matrix.target }}
path: firmware
- name: Upload Debugging Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-debug-${{ matrix.target }}
path: debug
package:
needs: firmware
runs-on: ubuntu-latest
steps:
# Checkout ESPixelStick
- uses: actions/checkout@v4
- name: Set release flag
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo "ESPS_RELEASE=''" >> $GITHUB_ENV
# Download firmware binary artifact
- uses: actions/download-artifact@v4
with:
path: dist/firmware
pattern: firmware-binary-*
merge-multiple: true
# Install Node
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install
# Build and move the web pages
- name: Compile Web Pages
run: |
gulp
gulp md
if [ -z "$ESPS_RELEASE" ]; then
gulp ci
fi
mv data/* dist/fs
- name: Set release archive filename
run: |
_VERSION=$(< dist/firmware/VERSION)
echo "ARCHFILE=ESPixelStick_Firmware-${_VERSION}.zip" >> $GITHUB_ENV
- name: Update firmware.json
run: python .scripts/ci-firmware.py
- name: Create Release Archive
run: zip -r ../${{ env.ARCHFILE }} *
working-directory: dist
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: Release Archive
path: ${{ env.ARCHFILE }}
release:
needs: package
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Package
uses: actions/download-artifact@v4
with:
name: Release Archive
- name: Create Draft Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
prerelease: true
files: ESPixelStick_Firmware*.zip