# Copyright (c) 2020-2023 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: Cirque

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:
    cirque:
        name: Cirque

        env:
            GITHUB_CACHE_PATH: /tmp/cirque-cache

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

        # need to run with privilege, which isn't supported by job.XXX.contaner
        #  https://github.com/actions/container-action/issues/2
        #         container:
        #             image: ghcr.io/project-chip/chip-build-cirque:41
        #             volumes:
        #                 - "/tmp:/tmp"
        #                 - "/dev/pts:/dev/pts"
        #             env:
        #                 LOG_DIR: /tmp/cirque_test_output/
        #                 CLEANUP_DOCKER_FOR_CI: 1
        #             options: "--privileged"

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

            - name: Bootstrap Cache
              uses: ./.github/actions/bootstrap-cache
            - name: Bootstrap Cirque
              run: |
                  integrations/docker/images/stage-2/chip-build-cirque/run.sh \
                    -- sh -c " \
                       git config --global --add safe.directory '*' \
                       && bash scripts/bootstrap.sh \
                       && chown -R $(id -u):$(id -g) .environment \
                    "

            - name: Get Cirque Bootstrap cache key
              id: cirque-bootstrap-cache-key
              run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT
            - uses: Wandalen/wretry.action@v1.4.10
              name: Cirque Bootstrap cache
              if: ${{ !env.ACT }}
              continue-on-error: true
              timeout-minutes: 10
              with:
                action: buildjet/cache@v3
                attempt_limit: 3
                attempt_delay: 2000
                with: |
                  key: ${{ runner.os }}-cirque-${{ steps.cirque-bootstrap-cache-key.outputs.val }}
                  restore-keys: ${{ runner.os }}-cirque-
                  path: ${{ env.GITHUB_CACHE_PATH }}
            - name: Cirque Bootstrap
              run: |
                  integrations/docker/images/stage-2/chip-build-cirque/run.sh \
                    --env GITHUB_ACTION_RUN=1 \
                    --env GITHUB_CACHE_PATH=${{ env.GITHUB_CACHE_PATH }} \
                    --volume /tmp:/tmp \
                    -- sh -c " \
                       git config --global --add safe.directory '*' \
                       && scripts/tests/cirque_tests.sh bootstrap \
                      "

            - name: Artifact suffix
              id: outsuffix
              uses: haya14busa/action-cond@v1
              if: ${{ !env.ACT }}
              with:
                  cond: ${{ github.event.pull_request.number == '' }}
                  if_true: "${{ github.sha }}"
                  if_false: "pull-${{ github.event.pull_request.number }}"
            - name: Build Binaries
              run: |
                  integrations/docker/images/stage-2/chip-build-cirque/run.sh \
                    -- sh -c " \
                       git config --global --add safe.directory '*' \
                       && scripts/build/gn_gen_cirque.sh \
                      "
            - name: Run Tests
              run: |
                  integrations/docker/images/stage-2/chip-build-cirque/run.sh \
                     --env LOG_DIR=/tmp/cirque_test_output \
                     --env CLEANUP_DOCKER_FOR_CI=1 \
                     --env GITHUB_ACTION_RUN=1 \
                     --privileged \
                     --volume /tmp:/tmp \
                     --volume /dev/pts:/dev/pts \
                     -- sh -c " \
                       git config --global --add safe.directory '*' \
                       && scripts/tests/cirque_tests.sh run_all_tests \
                      "
                   

            - name: Uploading Binaries
              uses: actions/upload-artifact@v4
              if: ${{ always() && !env.ACT }}
              with:
                  name: cirque_log-${{steps.outsuffix.outputs.value}}-logs
                  path: /tmp/cirque_test_output/
