# Copyright (c) 2021 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 - Open IoT SDK

on:
    push:
    pull_request:
    merge_group:
    workflow_dispatch:

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:
    openiotsdk:
        name: Open IoT SDK examples building

        env:
            TEST_NETWORK_NAME: OIStest

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

        container:
            image: ghcr.io/project-chip/chip-build-openiotsdk:1
            volumes:
                - "/tmp/bloat_reports:/tmp/bloat_reports"
            options: --privileged

        steps:
            - name: Checkout
              uses: actions/checkout@v3
            - name: Checkout submodules & Bootstrap
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                platform: openiotsdk
                extra-submodule-parameters: " --recursive"

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

            - name: Build and install Python controller
              run: |
                  scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
                  scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.openiotsdk.txt'

            - name: Build shell example
              id: build_shell
              run: |
                  scripts/examples/openiotsdk_example.sh shell
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                    openiotsdk release shell \
                    examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \
                    /tmp/bloat_reports/

            - name: Build lock-app example (mbedtls)
              id: build_lock_app_mbedtls
              run: |
                  scripts/examples/openiotsdk_example.sh -b mbedtls lock-app
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                    openiotsdk release lock-app-mbedtls \
                    examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \
                    /tmp/bloat_reports/

            - name: Build tv-app example
              id: build_tv_app
              timeout-minutes: 10
              run: |
                  scripts/examples/openiotsdk_example.sh tv-app
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                    openiotsdk release tv-app \
                    examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \
                    /tmp/bloat_reports/

            - name: Build all-clusters-app example
              id: build_all_clusters_app
              timeout-minutes: 10
              run: |
                  scripts/examples/openiotsdk_example.sh all-clusters-app
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                    openiotsdk release all-clusters-app \
                    examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \
                    /tmp/bloat_reports/

            - name: Build unit tests (mbedtls)
              id: build_unit_tests_mbedtls
              run: |
                  scripts/examples/openiotsdk_example.sh -b mbedtls unit-tests

            - name: "Test: shell example"
              if: steps.build_shell.outcome == 'success'
              run: |
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/examples/openiotsdk_example.sh --no-activate -C test shell'

            - name: "Test: lock-app example (mbedtls)"
              if: steps.build_lock_app_mbedtls.outcome == 'success'
              run: |
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app'
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down

            - name: "Test: tv-app example"
              if: steps.build_tv_app.outcome == 'success'
              timeout-minutes: 10
              run: |
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app'
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down

            - name: "Test: all-clusters-app example"
              if: steps.build_all_clusters_app.outcome == 'success'
              timeout-minutes: 5
              run: |
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app'
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down

            - name: "Test: unit-tests (mbedtls)"
              if: steps.build_unit_tests_mbedtls.outcome == 'success'
              run: |
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests'

            - name: Build lock-app example (psa)
              id: build_lock_app_psa
              run: |
                  scripts/examples/openiotsdk_example.sh -c -b psa lock-app
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                    openiotsdk release lock-app-psa \
                    examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \
                    /tmp/bloat_reports/

            - name: Build unit tests (psa)
              id: build_unit_tests_psa
              run: |
                  scripts/examples/openiotsdk_example.sh -b psa unit-tests

            - name: "Test: lock-app example (psa)"
              if: steps.build_lock_app_psa.outcome == 'success'
              run: |
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app'
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down

            - name: "Test: unit-tests (psa)"
              if: steps.build_unit_tests_psa.outcome == 'success'
              run: |
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests'
