# 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:
        branches-ignore:
            - 'dependabot/**'
    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:<VERSION_HERE>
        #             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/
