453 lines
14 KiB
YAML
453 lines
14 KiB
YAML
---
|
|
name: Validate ESPHome
|
|
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
push:
|
|
paths:
|
|
- "nspanel_esphome*.yaml"
|
|
- "esphome/nspanel_esphome*.yaml"
|
|
- "prebuilt/nspanel_esphome*.yaml"
|
|
- "prebuilt/wall_display*.yaml"
|
|
- ".test/*.yaml"
|
|
- "*.h"
|
|
- "*.c"
|
|
- "*.cpp"
|
|
- "*.py"
|
|
pull_request:
|
|
paths:
|
|
- "nspanel_esphome*.yaml"
|
|
- "esphome/nspanel_esphome*.yaml"
|
|
- "prebuilt/nspanel_esphome*.yaml"
|
|
- "prebuilt/wall_display*.yaml"
|
|
- ".test/*.yaml"
|
|
- "*.h"
|
|
- "*.c"
|
|
- "*.cpp"
|
|
- "*.py"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
# yamllint disable-line rule:line-length
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
code_scan:
|
|
name: Code scan (YAML)
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Validate nspanel_esphome.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome.yaml
|
|
- name: Validate nspanel_esphome_core.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_core.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_cool.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_cool.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_heat.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_heat.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_dual.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_dual.yaml
|
|
- name: Validate nspanel_esphome_addon_upload_tft.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_upload_tft.yaml
|
|
- name: Validate nspanel_esphome_advanced.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_advanced.yaml
|
|
- name: Validate nspanel_esphome_addon_bluetooth_proxy.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_base.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_base.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_cool.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_cool.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_heat.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_heat.yaml
|
|
- name: Validate nspanel_esphome_addon_climate_dual.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_dual.yaml
|
|
- name: Validate nspanel_esphome_prebuilt.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" prebuilt/nspanel_esphome_prebuilt.yaml
|
|
- name: Validate wall_display.yaml
|
|
run: yamllint -c "./.rules/yamllint.yml" prebuilt/wall_display.yaml
|
|
|
|
build_idf_core:
|
|
name: ESP-IDF v4 Base (default)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- code_scan
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_basic.yaml"
|
|
|
|
build_idf5_core:
|
|
name: ESP-IDF v5 Base
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- code_scan
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf5_basic.yaml"
|
|
|
|
build_ard_core:
|
|
name: Arduino Base
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- code_scan
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_ard_basic.yaml"
|
|
|
|
build_idf_advanced:
|
|
name: Advanced
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+advanced
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_advanced.yaml"
|
|
|
|
build_idf5_advanced:
|
|
name: Advanced
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf5_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+advanced
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf5_advanced.yaml"
|
|
|
|
build_ard_advanced:
|
|
name: Advanced
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_ard_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+advanced
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_ard_advanced.yaml"
|
|
|
|
build_idf_bluetooth_proxy:
|
|
name: Bluetooth Proxy
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_heat
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_bluetooth_proxy.yaml"
|
|
|
|
build_idf5_bluetooth_proxy:
|
|
name: Bluetooth Proxy
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf5_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_heat
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf5_bluetooth_proxy.yaml"
|
|
|
|
build_idf_climate_heat:
|
|
name: Climate (heat)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_heat
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_climate_heat.yaml"
|
|
|
|
build_idf5_climate_heat:
|
|
name: Climate (heat)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf5_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_heat
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf5_climate_heat.yaml"
|
|
|
|
build_ard_climate_heat:
|
|
name: Climate (heat)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_ard_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_heat
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_ard_climate_heat.yaml"
|
|
|
|
build_idf_climate_cool:
|
|
name: Climate (cool)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_cool
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_climate_cool.yaml"
|
|
|
|
build_idf5_climate_cool:
|
|
name: Climate (cool)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf5_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_cool
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf5_climate_cool.yaml"
|
|
|
|
build_ard_climate_cool:
|
|
name: Climate (cool)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_ard_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_cool
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_ard_climate_cool.yaml"
|
|
|
|
build_idf_climate_dual:
|
|
name: Climate (dual)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_dual
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_climate_dual.yaml"
|
|
|
|
build_idf5_climate_dual:
|
|
name: Climate (dual)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf5_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_dual
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf5_climate_dual.yaml"
|
|
|
|
build_ard_climate_dual:
|
|
name: Climate (dual)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_ard_core
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_dual
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_ard_climate_dual.yaml"
|
|
|
|
build_idf_climate_heat_advanced:
|
|
name: Advanced+climate (heat)
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_climate_heat
|
|
- build_idf_advanced
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+advanced+climate_heat
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_advanced_climate_heat.yaml"
|
|
|
|
build_idf_climate_heat_advanced_customization:
|
|
name: Customizations
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_advanced
|
|
- build_idf_climate_heat
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+advanced+climate_heat+customizations
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_advanced_climate_heat_customizations.yaml"
|
|
|
|
build_ard_climate_heat_advanced_customization:
|
|
name: Customizations
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_ard_advanced
|
|
- build_ard_climate_heat
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+advanced+climate_heat+customizations
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_ard_advanced_climate_heat_customizations.yaml"
|
|
|
|
build_prebuilt_firmware:
|
|
name: Prebuilt Firmware
|
|
runs-on: ubuntu-latest
|
|
needs: code_scan
|
|
if: github.ref == 'refs/heads/dev' || github.base_ref == 'dev'
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
|
|
- name: Build ESPHome Prebuilt Firmware
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: prebuilt/nspanel_esphome_prebuilt.yaml
|
|
|
|
- name: Move and Rename Firmware File - nspanel_esphome_prebuilt
|
|
run: |
|
|
mkdir -p prebuilt
|
|
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware.bin prebuilt/nspanel_esphome_prebuilt.bin || true
|
|
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware-factory.bin prebuilt/nspanel_esphome_prebuilt-factory.bin || true
|
|
|
|
- name: Build ESPHome Prebuilt Wall Display Firmware
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: prebuilt/wall_display.yaml
|
|
|
|
- name: Move and Rename Firmware File - wall_display
|
|
run: |
|
|
mkdir -p prebuilt
|
|
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware.bin prebuilt/wall_display.bin || true
|
|
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware-factory.bin prebuilt/wall_display-factory.bin || true
|
|
|
|
- name: Generate checksum nspanel_esphome_prebuilt
|
|
uses: jmgilman/actions-generate-checksum@v1
|
|
with:
|
|
method: md5
|
|
patterns: prebuilt/nspanel_esphome_prebuilt.bin
|
|
output: prebuilt/nspanel_esphome_prebuilt.bin.md5
|
|
|
|
- name: Generate checksum nspanel_esphome_prebuilt-factory
|
|
uses: jmgilman/actions-generate-checksum@v1
|
|
with:
|
|
method: md5
|
|
patterns: prebuilt/nspanel_esphome_prebuilt-factory.bin
|
|
output: prebuilt/nspanel_esphome_prebuilt-factory.bin.md5
|
|
|
|
- name: Generate checksum wall_display
|
|
uses: jmgilman/actions-generate-checksum@v1
|
|
with:
|
|
method: md5
|
|
patterns: prebuilt/wall_display.bin
|
|
output: prebuilt/wall_display.bin.md5
|
|
|
|
- name: Generate checksum wall_display-factory
|
|
uses: jmgilman/actions-generate-checksum@v1
|
|
with:
|
|
method: md5
|
|
patterns: prebuilt/wall_display-factory.bin
|
|
output: prebuilt/wall_display-factory.bin.md5
|
|
|
|
- name: Set Commit Message
|
|
id: set_commit_message
|
|
run: |
|
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
|
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel - ${{ github.event.pull_request.title }}" >> $GITHUB_ENV
|
|
elif [[ "${{ github.event_name }}" == "push" ]]; then
|
|
commit_message=$(git log -1 --pretty=format:'%s')
|
|
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel - $commit_message" >> $GITHUB_ENV
|
|
else
|
|
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Commit and Push Firmware Files
|
|
run: |
|
|
git config --global user.name 'GitHub Actions'
|
|
git config --global user.email 'actions@github.com'
|
|
git add prebuilt/*.bin
|
|
git add prebuilt/*.md5
|
|
git commit -m "${{ env.COMMIT_MESSAGE }}"
|
|
git push
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_climate_cool_bluetooth_proxy:
|
|
name: Climate cool & BLE proxy
|
|
runs-on: "ubuntu-latest"
|
|
needs:
|
|
- build_idf_climate_cool
|
|
- build_idf_bluetooth_proxy
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Build core+climate_cool+bluetooth_proxy
|
|
uses: barndawgie/build-action@v1.9.0
|
|
with:
|
|
yaml_file: "./.test/esphome_idf_climate_cool_bluetooth_proxy.yaml"
|
|
...
|