Skip to content

Commit

Permalink
Copy from regular tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn authored Nov 13, 2024
1 parent 8d6232d commit a9565f8
Showing 1 changed file with 84 additions and 39 deletions.
123 changes: 84 additions & 39 deletions .github/workflows/validate_esphome_beta.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
---
name: Validate ESPHome (beta)
name: Validate and Build ESPHome (beta)

# 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:
Expand Down Expand Up @@ -99,11 +121,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@main

- name: Firmware
if: steps.matrix.outputs.cache-hit != 'true'
- name: Build Firmware
if: matrix.cache-hit != 'true'
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml_file }}
version: beta

build_advanced:
Expand All @@ -115,13 +137,13 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_advanced.yaml"
yaml-file: ".test/esphome_idf_advanced.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_advanced.yaml"
yaml-file: ".test/esphome_idf5_advanced.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_advanced.yaml"
yaml-file: ".test/esphome_ard_advanced.yaml"

steps:
- name: Checkout repository
Expand All @@ -130,7 +152,7 @@ jobs:
- name: Build Advanced Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_ble_tracker:
Expand All @@ -142,10 +164,10 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_ble_tracker.yaml"
yaml-file: ".test/esphome_idf_ble_tracker.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_ble_tracker.yaml"
yaml-file: ".test/esphome_idf5_ble_tracker.yaml"

steps:
- name: Checkout repository
Expand All @@ -154,7 +176,7 @@ jobs:
- name: Build BLE Tracker Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_bluetooth_proxy:
Expand All @@ -166,10 +188,10 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml"
yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml"
yaml-file: ".test/esphome_idf5_bluetooth_proxy.yaml"

steps:
- name: Checkout repository
Expand All @@ -178,7 +200,7 @@ jobs:
- name: Build Bluetooth Proxy Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_climate_cool:
Expand All @@ -190,13 +212,13 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_cool.yaml"
yaml-file: ".test/esphome_idf_climate_cool.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_climate_cool.yaml"
yaml-file: ".test/esphome_idf5_climate_cool.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_climate_cool.yaml"
yaml-file: ".test/esphome_ard_climate_cool.yaml"

steps:
- name: Checkout repository
Expand All @@ -205,7 +227,7 @@ jobs:
- name: Build Climate Cool Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_climate_heat:
Expand All @@ -217,13 +239,13 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_heat.yaml"
yaml-file: ".test/esphome_idf_climate_heat.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_climate_heat.yaml"
yaml-file: ".test/esphome_idf5_climate_heat.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_climate_heat.yaml"
yaml-file: ".test/esphome_ard_climate_heat.yaml"

steps:
- name: Checkout repository
Expand All @@ -232,7 +254,7 @@ jobs:
- name: Build Climate Heat Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_climate_dual:
Expand All @@ -244,22 +266,22 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_dual.yaml"
yaml-file: ".test/esphome_idf_climate_dual.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_climate_dual.yaml"
yaml-file: ".test/esphome_idf5_climate_dual.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_climate_dual.yaml"
yaml-file: ".test/esphome_ard_climate_dual.yaml"

steps:
- name: Checkout repository
uses: actions/checkout@main

- name: Build Climate Dial Firmware
- name: Build Climate Dual Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_customizations:
Expand All @@ -273,10 +295,10 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_advanced_climate_heat_customizations.yaml"
yaml-file: ".test/esphome_idf_advanced_climate_heat_customizations.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_advanced_climate_heat_customizations.yaml"
yaml-file: ".test/esphome_ard_advanced_climate_heat_customizations.yaml"

steps:
- name: Checkout repository
Expand All @@ -285,7 +307,7 @@ jobs:
- name: Build Customizations Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_climate_ble_proxy:
Expand All @@ -299,7 +321,7 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml"
yaml-file: ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml"

steps:
- name: Checkout repository
Expand All @@ -308,7 +330,7 @@ jobs:
- name: Build Customizations Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_cover:
Expand All @@ -321,13 +343,13 @@ jobs:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_cover.yaml"
yaml-file: ".test/esphome_idf_cover.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_cover.yaml"
yaml-file: ".test/esphome_idf5_cover.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_cover.yaml"
yaml-file: ".test/esphome_ard_cover.yaml"

steps:
- name: Checkout repository
Expand All @@ -336,26 +358,49 @@ jobs:
- name: Build Cover Firmware
uses: esphome/build-action@main
with:
yaml_file: ${{ matrix.yaml_file }}
yaml-file: ${{ matrix.yaml-file }}
version: beta

build_prebuilt_firmware:
name: Prebuilt Firmware
runs-on: ubuntu-latest
needs: code_scan
if: github.ref == 'refs/heads/dev' || github.base_ref == 'dev'
if: contains(github.ref, 'dev') || contains(github.base_ref, 'dev')
steps:
- uses: actions/checkout@main

- name: Extract Version Number
id: extract_version
run: |
VERSION=$(yq eval '.substitutions.version' esphome/nspanel_esphome_core_versioning.yaml)
if [ -z "$VERSION" ]; then
echo "Error: No version found in esphome/nspanel_esphome_core_versioning.yaml"
exit 1
fi
echo "Extracted Version: ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Debug Version Output
run: |
echo "Version from setup_dependencies: ${{ steps.extract_version.outputs.version }}"
echo "Environment Variable VERSION: $VERSION"
if [ -z "${{ steps.extract_version.outputs.version }}" ]; then
echo "Error: Version output is empty. Exiting..."
exit 1
fi
- name: Build ESPHome Prebuilt Firmware
id: build_nspanel_fw
uses: esphome/build-action@main
with:
yaml_file: prebuilt/nspanel_esphome_prebuilt.yaml
yaml-file: prebuilt/nspanel_esphome_prebuilt.yaml
version: beta

- name: Build ESPHome Prebuilt Wall Display Firmware
id: build_wall_display_fw
uses: esphome/build-action@main
with:
yaml_file: prebuilt/wall_display.yaml
yaml-file: prebuilt/wall_display.yaml
version: beta
...

0 comments on commit a9565f8

Please sign in to comment.