Validate and Build ESPHome (Dev) #119
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Validate and Build ESPHome (Dev) | |
| # yamllint disable-line rule:truthy | |
| on: | |
| schedule: | |
| # Run daily at 10:00 AM UTC | |
| - cron: '0 10 * * *' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Common setup and validation | |
| setup_dependencies: | |
| name: Setup & Cache Dependencies | |
| runs-on: ubuntu-latest | |
| outputs: | |
| cache-hit-idf: ${{ steps.cache-idf.outputs.cache-hit }} | |
| cache-hit-arduino: ${{ steps.cache-arduino.outputs.cache-hit }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Cache ESP-IDF Dependencies | |
| id: cache-idf | |
| uses: actions/cache@main | |
| with: | |
| path: | | |
| ~/.esphome/cache | |
| ~/.platformio/packages | |
| ~/.platformio/platforms | |
| key: ${{ runner.os }}-esp-idf-${{ hashFiles('**/esphome_idf_basic.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-esp-idf- | |
| - name: Cache Arduino Dependencies | |
| id: cache-arduino | |
| uses: actions/cache@main | |
| with: | |
| path: | | |
| ~/.esphome/cache | |
| ~/.platformio/packages | |
| ~/.platformio/platforms | |
| key: ${{ runner.os }}-arduino-${{ hashFiles('**/esphome_ard_basic.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-arduino- | |
| code_scan: | |
| name: Code scan (YAML) | |
| runs-on: "ubuntu-latest" | |
| needs: setup_dependencies | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@main | |
| - name: Setup Python | |
| uses: actions/setup-python@main | |
| with: | |
| python-version: '3.8' | |
| - name: Install Yamllint | |
| run: pip install yamllint | |
| - name: Validate YAML files | |
| run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} + | |
| # ESP-IDF Framework Chain | |
| build_idf_core: | |
| name: ESP-IDF Core | |
| needs: [code_scan, setup_dependencies] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Core Firmware | |
| if: needs.setup_dependencies.outputs.cache-hit-idf != 'true' | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_basic.yaml" | |
| version: dev | |
| build_idf_ble_tracker: | |
| name: ESP-IDF BLE Tracker | |
| needs: build_idf_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF BLE Tracker Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_ble_tracker.yaml" | |
| version: dev | |
| build_idf_bluetooth_proxy: | |
| name: ESP-IDF Bluetooth Proxy | |
| needs: build_idf_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Bluetooth Proxy Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml" | |
| version: dev | |
| build_idf_climate_cool: | |
| name: ESP-IDF Climate Cool | |
| needs: build_idf_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Climate Cool Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_climate_cool.yaml" | |
| version: dev | |
| build_idf_climate_heat: | |
| name: ESP-IDF Climate Heat | |
| needs: build_idf_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Climate Heat Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_climate_heat.yaml" | |
| version: dev | |
| build_idf_climate_dual: | |
| name: ESP-IDF Climate Dual | |
| needs: build_idf_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Climate Dual Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_climate_dual.yaml" | |
| version: dev | |
| build_idf_cover: | |
| name: ESP-IDF Cover | |
| needs: build_idf_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Cover Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_cover.yaml" | |
| version: dev | |
| build_idf_customizations: | |
| name: ESP-IDF Customizations | |
| needs: | |
| - build_idf_climate_heat | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Customizations Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_climate_heat_customizations.yaml" | |
| version: dev | |
| build_idf_climate_ble_proxy: | |
| name: ESP-IDF Climate Cool + Bluetooth Proxy | |
| needs: | |
| - build_idf_climate_cool | |
| - build_idf_bluetooth_proxy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build ESP-IDF Climate Cool + BLE Proxy Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml" | |
| version: dev | |
| # Arduino Framework Chain | |
| build_arduino_core: | |
| name: Arduino Core | |
| needs: [code_scan, setup_dependencies] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build Arduino Core Firmware | |
| if: needs.setup_dependencies.outputs.cache-hit-arduino != 'true' | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_ard_basic.yaml" | |
| version: dev | |
| build_arduino_climate_cool: | |
| name: Arduino Climate Cool | |
| needs: build_arduino_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build Arduino Climate Cool Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_ard_climate_cool.yaml" | |
| version: dev | |
| build_arduino_climate_heat: | |
| name: Arduino Climate Heat | |
| needs: build_arduino_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build Arduino Climate Heat Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_ard_climate_heat.yaml" | |
| version: dev | |
| build_arduino_climate_dual: | |
| name: Arduino Climate Dual | |
| needs: build_arduino_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build Arduino Climate Dual Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_ard_climate_dual.yaml" | |
| version: dev | |
| build_arduino_cover: | |
| name: Arduino Cover | |
| needs: build_arduino_core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build Arduino Cover Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_ard_cover.yaml" | |
| version: dev | |
| build_arduino_customizations: | |
| name: Arduino Customizations | |
| needs: | |
| - build_arduino_climate_heat | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Build Arduino Customizations Firmware | |
| uses: esphome/build-action@main | |
| with: | |
| yaml-file: ".test/esphome_ard_climate_heat_customizations.yaml" | |
| version: dev | |
| ... |