# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
task-defaults:
    attributes:
        local-toolchain: true
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 1800
        env:
            PATH: "/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
    run:
        script: unpack-sdk.py
        resources:
            - python/mozbuild/mozpack/macpkg.py
            - taskcluster/scripts/misc/unpack-sdk.py
        tooltool-downloads: internal
    # Expiry similar to that of fetches
    expires-after: 1000 years

macosx64-sdk-13.3:
    description: "MacOSX13.3 SDK"
    treeherder:
        symbol: TM(sdk13.3)
    run:
        arguments:
            - https://swcdn.apple.com/content/downloads/15/62/032-84673-A_7A1TG1RF8Z/xpc8q44ggn2pkn82iwr0fi1zeb9cxi8ath/CLTools_macOSNMOS_SDK.pkg
            - 8de3306508dca31040b3b49ff370e96c94f4546bcf22cb4069abbb18e2d6bce8e20d40a6903f00ae75558175b624a979ea0444f54bc6d9d67e841f2000b0d863
            - Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk
        toolchain-artifact: project/gecko/mac-sdk/MacOSX13.3.sdk.tar.zst

macosx64-sdk-26.1:
    description: "macOS 26.1 SDK"
    treeherder:
        symbol: TM(sdk26.1)
    run:
        arguments:
            - https://swcdn.apple.com/content/downloads/22/09/093-00219-A_WIA1LP39TY/evbam2mb02xqr05ju9ddb95y8qil8kz9tm/CLTools_macOSNMOS_SDK.pkg
            - f6a5f44b3652f5abdf7ad2602f54ad38774404f45264a4e70cfccc58b8b39aed2a89f74ef22c44bf932d0a55b062ebc3651f73fa06ff755ee5da53b9dcc62fba
            - Library/Developer/CommandLineTools/SDKs/MacOSX26.1.sdk
        toolchain-artifact: project/gecko/mac-sdk/MacOSX26.1.sdk.tar.zst
        toolchain-alias:
            - macosx64-sdk
            - macosx64-sdk-toolchain
            - MacOSX26.1.sdk

ios-sdk-18.4:
    description: "iPhoneOS18.4 SDK"
    treeherder:
        symbol: TM(ios18.4)
    # Because it's using an internal tooltool artifact, it can't be used as a local-toolchain for
    # bootstrap. But we still want to use the same script as local-toolchains.
    attributes:
        local-toolchain: false
    run:
        script: private_local_toolchain.sh
        arguments:
            - unpack-sdk.py
            - http://taskcluster/tooltool.mozilla-releng.net/sha512/41c4058330f1a679796f00358d125af0703fa7026d68ffa7b101fc5a48d218221fda9b4f68e0057b68909bf2ece7c8b2adae41750971de6e5ce3d0235c618079
            - 41c4058330f1a679796f00358d125af0703fa7026d68ffa7b101fc5a48d218221fda9b4f68e0057b68909bf2ece7c8b2adae41750971de6e5ce3d0235c618079
            - Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
        toolchain-artifact: project/gecko/mac-sdk/iPhoneOS18.4.sdk.tar.zst
        toolchain-alias: ios-sdk

ios-sim-sdk-18.4:
    description: "iPhoneSimulator18.4 SDK"
    treeherder:
        symbol: TM(ios-sim-18.4)
    # Because it's using an internal tooltool artifact, it can't be used as a local-toolchain for
    # bootstrap. But we still want to use the same script as local-toolchains.
    attributes:
        local-toolchain: false
    run:
        script: private_local_toolchain.sh
        arguments:
            - unpack-sdk.py
            - http://taskcluster/tooltool.mozilla-releng.net/sha512/41c4058330f1a679796f00358d125af0703fa7026d68ffa7b101fc5a48d218221fda9b4f68e0057b68909bf2ece7c8b2adae41750971de6e5ce3d0235c618079
            - 41c4058330f1a679796f00358d125af0703fa7026d68ffa7b101fc5a48d218221fda9b4f68e0057b68909bf2ece7c8b2adae41750971de6e5ce3d0235c618079
            - Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
        toolchain-artifact: project/gecko/mac-sdk/iPhoneSimulator18.4.sdk.tar.zst
        toolchain-alias: ios-sim-sdk
