# 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:
        branches:
            - master
            - 'v*-branch'
    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:
    test_suites_chip_tool_darwin:
        name: Test Suites - Darwin

        strategy:
            matrix:
                build_variant: [no-ble-no-shell-asan-clang]
        env:
            BUILD_VARIANT: ${{matrix.build_variant}}

            # We can't use the pigweed clang to build the Darwin framework once we start using
            # Swift, because it does not handle CLANG_ENABLE_MODULES correctly.
            #
            # But the Xcode clang does not handle LSan correctly.  Since we can't easily apply
            # LSAN_OPTIONS to just everything except darwin-framework-tool, instead disable asan for
            # it.
            BUILD_VARIANT_FRAMEWORK_TOOL: no-ble
            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-13

        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - 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: Checkout submodules & Bootstrap
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                platform: darwin
                bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}

            - name: Build iOS Darwin Framework Tool Build Debug
              working-directory: src/darwin/Framework
              run: xcodebuild -target "darwin-framework-tool" -sdk iphoneos -configuration Debug AD_HOC_CODE_SIGNING_ALLOWED=YES

            - name: Run macOS Darwin Framework Tool Build Debug
              working-directory: src/darwin/Framework
              run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug
            - name: Delete Defaults
              run: defaults delete com.apple.dt.xctest.tool
              continue-on-error: true
            - name: Clean Build
              run: xcodebuild clean
              working-directory: src/darwin/Framework
            - name: Build Apps
              run: |
                  ./scripts/run_in_build_env.sh \
                     "./scripts/build/build_examples.py \
                        --target darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL} \
                        --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} \
                        --target darwin-x64-lit-icd-${BUILD_VARIANT} \
                        --target darwin-x64-microwave-oven-${BUILD_VARIANT} \
                        --target darwin-x64-rvc-${BUILD_VARIANT} \
                        --target darwin-x64-network-manager-${BUILD_VARIANT} \
                        build \
                        --copy-artifacts-to objdir-clone \
                     "
            - name: Run Tests
              run: |
                  ./scripts/run_in_build_env.sh \
                  "./scripts/tests/run_test_suite.py \
                     --runner darwin_framework_tool_python \
                     --chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/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 \
                     --microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
                     --rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
                     --network-manager-app ./out/darwin-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
                  "
            - name: Run OTA Test
              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_FRAMEWORK_TOOL}/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@v4
              if: ${{ failure() && !env.ACT }}
              with:
                  name: crash-core-darwin-${{ matrix.build_variant }}
                  path: /cores/
                  # Cores are big; don't hold on to them too long.
                  retention-days: 5
            - name: Uploading diagnostic logs
              uses: actions/upload-artifact@v4
              if: ${{ failure() && !env.ACT }}
              with:
                  name: crash-log-darwin-${{ matrix.build_variant }}
                  path: ~/Library/Logs/DiagnosticReports/
            - name: Uploading framework build log
              uses: actions/upload-artifact@v4
              if: ${{ failure() && !env.ACT }}
              with:
                  name: framework-build-log-darwin-${BUILD_VARIANT_FRAMEWORK_TOOL}
                  path: out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT_FRAMEWORK_TOOL}/darwin_framework_build.log
            - name: Uploading objdir for debugging
              uses: actions/upload-artifact@v4
              if: ${{ failure() && !env.ACT }}
              with:
                  name: crash-objdir-darwin-${{ matrix.build_variant }}
                  path: objdir-clone/
                  # objdirs are big; don't hold on to them too long.
                  retention-days: 5
