# 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:35
        #             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.4
              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/
