name: PUSH Build Check

on:
  push:
    branches: [ develop ]
    paths:
      - "src/**"
      - "examples/**"
      - "variants/**"
      - "platformio.ini"
      - ".github/workflows/push-build-check.yml"

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      OFFICIAL_MESHCORE_VERSION: ${{ vars.OFFICIAL_MESHCORE_VERSION }}
      PLATFORMIO_BUILD_FLAGS: -UMQTT_DEBUG
    strategy:
      fail-fast: false
      matrix:
        environment:
          # ESP32-S3 / core EastMesh targets
          - heltec_v4_repeater_mqtt
          - LilyGo_TBeam_1W_repeater_mqtt
          - T_Beam_S3_Supreme_SX1262_repeater_mqtt
          # ESP32-C6
          - LilyGo_Tlora_C6_repeater_mqtt
          - Xiao_C6_repeater_mqtt

    steps:
      - name: Clone Repo
        uses: actions/checkout@v6

      - name: Setup Build Environment
        uses: ./.github/actions/setup-build-environment

      - name: Build ${{ matrix.environment }}
        run: pio run -e ${{ matrix.environment }}
