# 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
    # XXX: Workaround for https://github.com/actions/cache/issues/1141
    SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3

jobs:
    openiotsdk:
        name: Open IoT SDK examples building
        timeout-minutes: 90

        env:
            TEST_NETWORK_NAME: OIStest

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

        container:
            image: connectedhomeip/chip-build-openiotsdk:0.7.3
            volumes:
                - "/tmp/bloat_reports:/tmp/bloat_reports"
            options: --privileged

        steps:
            - uses: Wandalen/wretry.action@v1.3.0
              name: Checkout
              with:
                  action: actions/checkout@v3.5.2
                  with: |
                      token: ${{ github.token }}
                  attempt_limit: 3
                  attempt_delay: 2000
            - name: Checkout submodules
              run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --recursive --platform openiotsdk

            - name: Set up environment for size reports
              if: ${{ !env.ACT }}
              env:
                  GH_CONTEXT: ${{ toJson(github) }}
              run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}"

            - uses: Wandalen/wretry.action@v1.3.0
              name: Bootstrap cache
              continue-on-error: true
              timeout-minutes: 10
              with:
                action: buildjet/cache@v3
                attempt_limit: 3
                attempt_delay: 2000
                with: |
                    key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
                    path: |
                        .environment
                        build_overrides/pigweed_environment.gni
            - name: Bootstrap
              timeout-minutes: 10
              run: bash scripts/bootstrap.sh

            - name: Build and install Python controller
              timeout-minutes: 10
              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
              timeout-minutes: 10
              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
              id: build_lock_app
              timeout-minutes: 10
              run: |
                  scripts/examples/openiotsdk_example.sh lock-app
                  .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
                    openiotsdk release lock-app \
                    examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \
                    /tmp/bloat_reports/

            - name: Build unit tests
              id: build_unit_tests
              timeout-minutes: 10
              run: |
                  scripts/examples/openiotsdk_example.sh unit-tests

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

            - name: "Test: lock-app example"
              if: steps.build_lock_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 lock-app'
                  scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down

            - name: "Test: unit-tests"
              if: steps.build_unit_tests.outcome == 'success'
              timeout-minutes: 40
              run: |
                  scripts/run_in_python_env.sh out/venv \
                    'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests'
