# 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 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 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
              # For now disable unguarded-availability-new warnings because we
              # internally use APIs that we are annotating as only available on
              # new enough versions.  Maybe we should change out deployment
              # target versions instead?
              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/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) &
                  ../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
                  ../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 101 --passcode 1001 --KVS /tmp/chip-all-clusters-app-kvs101 --secured-device-port 5531 &
                  ../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 102 --passcode 1002 --KVS /tmp/chip-all-clusters-app-kvs102 --secured-device-port 5532 &
                  ../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 103 --passcode 1003 --KVS /tmp/chip-all-clusters-app-kvs103 --secured-device-port 5533 &
                  ../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 104 --passcode 1004 --KVS /tmp/chip-all-clusters-app-kvs104 --secured-device-port 5534 &
                  ../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 105 --passcode 1005 --KVS /tmp/chip-all-clusters-app-kvs105 --secured-device-port 5535 &

                  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
