# 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:
            - 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:
    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
                  ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 > >(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
