# Copyright (c) 2020-2021 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

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:
    framework:
        name: Build framework
        if: github.actor != 'restyled-io[bot]'
        runs-on: macos-13
        strategy:
            matrix:
                options: # We don't need a full matrix
                    - flavor: macos-release
                      arguments: -sdk macosx -configuration Release
                    - flavor: ios-release
                      arguments: -sdk iphoneos -configuration Release
                    - flavor: tvos-debug
                      arguments: -sdk appletvos -configuration Debug
                    - flavor: watchos-debug
                      arguments: -sdk watchos -configuration Debug
        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Checkout submodules & Bootstrap
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                  platform: darwin
                  bootstrap-log-name:
                      bootstrap-logs-framework-${{ matrix.options.flavor }}
            - name: Block zap-cli from being used
              env:
                  PW_ENVSETUP_NO_BANNER: 1
              run: |
                  # Framework builds are NOT expected to require zap-cli
                  scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"'
                  # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
                  scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
            - name: Build
              working-directory: src/darwin/Framework
              run: xcodebuild -target "Matter" ${{ matrix.options.arguments }}

    tests:
        name: Run framework tests
        if: github.actor != 'restyled-io[bot]'
        needs: [framework] # serialize to avoid running to many parallel macos runners
        runs-on: macos-13
        strategy:
            matrix:
                options: # We don't need a full matrix
                    - flavor: asan
                      arguments:
                          -enableAddressSanitizer YES
                          -enableUndefinedBehaviorSanitizer YES
                    - flavor: tsan
                      arguments: -enableThreadSanitizer YES
                    # "leaks" does not seem to be very compatible with asan or tsan
                    - flavor: leaks
                      defines: ENABLE_LEAK_DETECTION=1
        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Checkout submodules & Bootstrap
              uses: ./.github/actions/checkout-submodules-and-bootstrap
              with:
                  platform: darwin
                  bootstrap-log-name:
                      bootstrap-logs-framework-${{ matrix.options.flavor }}
            - name: Build example All Clusters Server
              run: |
                  scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/all-clusters-app chip_config_network_layer_ble=false
            - name: Build example OTA Provider
              run: |
                  scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug/ota-provider-app chip_config_network_layer_ble=false
            - name: Build example OTA Requestor
              run: |
                  scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0
            - name: Run Framework Tests
              # We want to ensure that our log upload runs on timeout, so use a timeout here shorter
              # than the 6-hour overall job timeout.  4.5 hours should be plenty.
              timeout-minutes: 270
              working-directory: src/darwin/Framework
              run: |
                  mkdir -p /tmp/darwin/framework-tests
                  echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
                  ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &

                  export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1

                  # Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
                  xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx ${{ matrix.options.arguments }} \
                    CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
                    > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
            - name: Collect crash logs
              if: failure() && !env.ACT
              run: |
                  mkdir -p /tmp/darwin/framework-tests
                  find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests
            - name: Uploading log files
              uses: actions/upload-artifact@v4
              if: failure() && !env.ACT
              with:
                  name: darwin-framework-test-logs-${{ matrix.options.flavor }}
                  path: /tmp/darwin/framework-tests
                  retention-days: 5
