# 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:
    description: "python repack"
    attributes:
        local-toolchain: true
    worker-type: b-linux-gcp
    worker:
        max-run-time: 7200
    run:
        script: build-cpython.sh
        resources:
            - 'build/psutil_requirements.txt'
            - 'build/zstandard_requirements.txt'

linux64-python-3.8:
    treeherder:
        symbol: TL(python)
    run:
        toolchain-alias: linux64-python
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        fetch:
            - cpython-3.8.10
    worker:
        docker-image: {in-tree: ubuntu1804-build-python}

linux64-aarch64-python-3.8:
    description: "cpython 3.8.10 AArch64/ARM64"
    worker-type: b-linux-gcp-aarch64
    treeherder:
        symbol: TLA64(python)
    run:
        toolchain-alias: linux64-aarch64-python
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        fetch:
            - cpython-3.8.10
    worker:
        docker-image: {in-tree: ubuntu2204-arm64-build-python}

linux64-aarch64-python-3.11:
    worker-type: b-linux-gcp-aarch64
    treeherder:
        symbol: TLA64(python3.11)
    run:
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        fetch:
            - cpython-3.11.7
    worker:
        docker-image: {in-tree: ubuntu2204-arm64-build-python}

win64-python-3.8:
    description: "cpython 3.8.10"
    treeherder:
        symbol: TW64(python)
    run:
        script: pack-cpython.sh
        toolchain-alias: win64-python
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        toolchain:
            - linux64-wine
        fetch:
            - cpython-3.8.10.exe

macosx64-python-3.8:
    treeherder:
        symbol: TM(python)
    worker-type: b-osx-1015
    run:
        toolchain-alias: macosx64-python
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        fetch:
            - cpython-3.8.10
        toolchain:
            - macosx64-clang-toolchain
            - macosx64-sdk-toolchain
            - macosx64-xz

###

linux64-python-3.11:
    treeherder:
        symbol: TL(python3.11)
    run:
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        fetch:
            - cpython-3.11.7
    worker:
        docker-image: {in-tree: ubuntu1804-build-python}

win64-python-3.11:
    description: "cpython 3.11.7"
    treeherder:
        symbol: TW64(python3.11)
    run:
        script: pack-cpython.sh
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        toolchain:
            - linux64-wine
        fetch:
            - cpython-3.11.7.exe

macosx64-python-3.11:
    treeherder:
        symbol: TM(python3.11)
    worker-type: b-osx-1015
    run:
        toolchain-artifact: public/build/python.tar.zst
    fetches:
        fetch:
            - cpython-3.11.7
        toolchain:
            - macosx64-clang-toolchain
            - macosx64-sdk-toolchain
            - macosx64-xz
