# Copyright (c) 2024 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: Test TV Casting Example

on:
    push:
        branches:
            - master
            - 'v*-branch'
    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

jobs:
    Linux-test:
        name: Linux Test

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

        container:
            image: ghcr.io/project-chip/chip-build:81

        steps:
            - name: Checkout
              uses: actions/checkout@v4

            - name: Checkout submodules & Bootstrap
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                  platform: linux

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

            - name: Build Linux tv-app
              run: |
                  ./scripts/run_in_build_env.sh \
                    "scripts/examples/gn_build_example.sh examples/tv-app/linux/ out/tv-app"

            - name: Build Linux tv-casting-app
              run: |
                  ./scripts/run_in_build_env.sh \
                    "scripts/examples/gn_build_example.sh examples/tv-casting-app/linux/ out/tv-casting-app chip_casting_simplified=true"

            - name:
                  Test casting from Linux tv-casting-app to Linux tv-app -
                  Commissionee Generated Passcode
              run: |
                  ./scripts/run_in_build_env.sh \
                    "python3 ./scripts/tests/run_tv_casting_test.py"
              timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.

            # TODO: this test is flaky and was disabled
            #       https://github.com/project-chip/connectedhomeip/issues/34598
            #
            #  - name:
            #        Test casting from Linux tv-casting-app to Linux tv-app -
            #        Commissioner Generated Passcode
            #    run: |
            #        ./scripts/run_in_build_env.sh \
            #          "python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True"
            #    timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.

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