# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build example - ESP32

on:
    push:
        branches-ignore:
            - 'dependabot/**'
    pull_request:
    merge_group:

concurrency:
    group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
    cancel-in-progress: true

env:
    CHIP_NO_LOG_TIMESTAMPS: true

jobs:
    esp32:
        name: ESP32

        runs-on: ubuntu-latest
        if: github.actor != 'restyled-io[bot]'

        container:
            image: ghcr.io/project-chip/chip-build-esp32:80
            volumes:
                - "/tmp/bloat_reports:/tmp/bloat_reports"

        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Checkout submodules
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                platform: esp32

            - name: Set up environment for size reports
              uses: ./.github/actions/setup-size-reports
              if: ${{ !env.ACT }}
              with:
                gh-context: ${{ toJson(github) }}

            - name: Build some M5Stack variations
              run: |
                  ./scripts/run_in_build_env.sh \
                     "./scripts/build/build_examples.py \
                        --enable-flashbundle \
                        --target esp32-m5stack-all-clusters \
                        build \
                        --copy-artifacts-to out/artifacts \
                     "
            - name: Prepare bloat report
              run: |
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                     esp32 m5stack all-clusters-app \
                     out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
                     /tmp/bloat_reports/
            - name: Prepare code pregen and ensure compile time pregen not possible
              run: |
                  ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
                  mv scripts/codegen.py scripts/codegen.py.renamed
                  mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed
            - name: Clean output
              run: rm -rf ./out
            - name: Build some M5Stack variations with pregen
              run: |
                  ./scripts/run_in_build_env.sh \
                     "./scripts/build/build_examples.py \
                        --enable-flashbundle \
                        --target esp32-m5stack-all-clusters-minimal \
                        --target esp32-m5stack-all-clusters-rpc-ipv6only \
                        --pregen-dir ./zzz_pregenerated \
                        build \
                        --copy-artifacts-to out/artifacts \
                     "
            - name: Undo code pregeneration changes
              run: |
                  rm -rf ./zzz_pregenerated
                  mv scripts/codegen.py.renamed scripts/codegen.py
                  mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py
            - name: Build example All Clusters App(Target:ESP32C3)
              run: scripts/examples/esp_example.sh all-clusters-app sdkconfig.defaults.esp32c3 esp32c3
            - name: Copy aside build products
              run: |
                  mkdir -p example_binaries/esp32-build
                  cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
                     example_binaries/esp32-build/chip-all-clusters-app.elf
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                     esp32 c3devkit all-clusters-app \
                     example_binaries/esp32-build/chip-all-clusters-app.elf \
                     /tmp/bloat_reports/

            - name: Build example Pigweed App
              run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults

            - name: Build example Lighting App (Target:ESP32H2)
              run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32h2 esp32h2

            - name: Build example Lock App (Target:ESP32C6)
              run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6 esp32c6

            - name: Uploading Size Reports
              uses: ./.github/actions/upload-size-reports
              if: ${{ !env.ACT }}
              with:
                platform-name: ESP32

    esp32_1:
        name: ESP32_1

        runs-on: ubuntu-latest
        if: github.actor != 'restyled-io[bot]'

        container:
            image: ghcr.io/project-chip/chip-build-esp32:80
            volumes:
                - "/tmp/bloat_reports:/tmp/bloat_reports"

        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Checkout submodules & Bootstrap
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                platform: esp32

            - name: Build example Bridge App
              run: scripts/examples/esp_example.sh bridge-app

            - name: Build example Persistent Storage App
              run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults

            - name: Build example Shell App
              run: scripts/examples/esp_example.sh shell sdkconfig.defaults

            - name: Build example Temperature Measurement App
              run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults

            - name: Build example OTA Requestor App
              run: scripts/examples/esp_example.sh ota-requestor-app sdkconfig.defaults

            - name: Build example OTA Provider App
              run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults

            - name: Build example Light Switch App (Target:ESP32C3)
              run: scripts/examples/esp_example.sh light-switch-app sdkconfig.defaults.esp32c3 esp32c3

            - name: Build example Lighting App (external platform)
              run: scripts/examples/esp_example.sh lighting-app sdkconfig.ext_plat.defaults

            - name: Build example Energy Management App
              run: scripts/examples/esp_example.sh energy-management-app sdkconfig.defaults

            - name: Build example LIT ICD App (Target:ESP32H2)
              run: scripts/examples/esp_example.sh lit-icd-app sdkconfig.defaults esp32h2
