# 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.0.36
              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}"

            - name: Bootstrap cache
              uses: buildjet/cache@v3
              timeout-minutes: 10
              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_wheel build-env'

            - 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/examples/openiotsdk_example.sh -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_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh -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/examples/openiotsdk_example.sh -C test unit-tests
