# Copyright (c) 2022 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: Darwin Tests

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:
    test_suites_chip_tool_darwin:
        name: Test Suites - Darwin
        timeout-minutes: 150

        strategy:
            matrix:
                build_variant: [no-ble-asan-clang]
        env:
            BUILD_VARIANT: ${{matrix.build_variant}}
            LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt

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

        steps:
            - uses: Wandalen/wretry.action@v1.0.36
              name: Checkout
              with:
                  action: actions/checkout@v3
                  with: |
                      token: ${{ github.token }}
                  attempt_limit: 3
                  attempt_delay: 2000
            - name: Checkout submodules
              run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin
            - name: Setup Environment
              # coreutils for stdbuf
              run: brew install coreutils
            - name:
                  Try to ensure the directories for core dumping and diagnostic
                  log collection exist and we can write them.
              run: |
                  sudo chown ${USER} /cores || true
                  mkdir -p ~/Library/Logs/DiagnosticReports || true
                  mkdir objdir-clone || true

            - name: Bootstrap cache
              uses: actions/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: 25
              run: bash scripts/bootstrap.sh
            - name: Uploading bootstrap logs
              uses: actions/upload-artifact@v3
              if: ${{ always() && !env.ACT }}
              with:
                  name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
                  path: |
                      .environment/gn_out/.ninja_log
                      .environment/pigweed-venv/*.log

            - name: Delete Defaults
              run: defaults delete com.apple.dt.xctest.tool
              continue-on-error: true
            - name: Build Apps
              timeout-minutes: 90
              run: |
                  ./scripts/run_in_build_env.sh \
                     "./scripts/build/build_examples.py \
                        --target darwin-x64-darwin-framework-tool-${BUILD_VARIANT} \
                        --target darwin-x64-all-clusters-${BUILD_VARIANT} \
                        --target darwin-x64-lock-${BUILD_VARIANT} \
                        --target darwin-x64-ota-provider-${BUILD_VARIANT} \
                        --target darwin-x64-ota-requestor-${BUILD_VARIANT} \
                        --target darwin-x64-tv-app-${BUILD_VARIANT} \
                        --target darwin-x64-bridge-${BUILD_VARIANT} \
                        build \
                        --copy-artifacts-to objdir-clone \
                     "
            - name: Run Tests
              timeout-minutes: 65
              run: |
                  ./scripts/run_in_build_env.sh \
                  "./scripts/tests/run_test_suite.py \
                     --chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
                     --target-skip-glob '{TestAccessControlConstraints}' \
                     run \
                     --iterations 1 \
                     --test-timeout-seconds 120 \
                     --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
                     --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \
                     --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
                     --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
                     --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
                     --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
                  "
            - name: Run OTA Test
              timeout-minutes: 5
              run: |
                  ./scripts/run_in_build_env.sh \
                  "./scripts/tests/run_darwin_framework_ota_test.py \
                     run \
                     --darwin-framework-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
                     --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
                     --ota-data-file /tmp/rawImage \
                     --ota-image-file /tmp/otaImage \
                     --ota-destination-file /tmp/downloadedImage \
                     --ota-candidate-file /tmp/otaCandidateJSON \
                  "
            - name: Uploading core files
              uses: actions/upload-artifact@v3
              if: ${{ failure() && !env.ACT }}
              with:
                  name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
                  path: /cores/
                  # Cores are big; don't hold on to them too long.
                  retention-days: 5
            - name: Uploading diagnostic logs
              uses: actions/upload-artifact@v3
              if: ${{ failure() && !env.ACT }}
              with:
                  name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
                  path: ~/Library/Logs/DiagnosticReports/
            - name: Uploading objdir for debugging
              uses: actions/upload-artifact@v3
              if: ${{ failure() && !env.ACT }}
              with:
                  name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
                  path: objdir-clone/
                  # objdirs are big; don't hold on to them too long.
                  retention-days: 5
