# 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

            # TODO: Is what's being cached here actually compatible with a regular bootstrap?
            - 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/
