# 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: "Node repack toolchain build"
    attributes:
        local-toolchain: true
    worker-type: b-linux-docker-amd
    worker:
        max-run-time: 1800
    run:
        script: repack-node.sh
        toolchain-artifact: public/build/node.tar.zst

linux64-node-12:
    treeherder:
        symbol: TL(node-12)
    fetches:
        fetch:
            - nodejs-12-linux64

linux64-node-22:
    # The upstream prebuilt binary requires glibc 2.28, which is too recent for Ubuntu 18.04,
    # so we build our own that won't have that requirement.
    description: "Node toolchain build"
    treeherder:
        symbol: TL(node-22)
    worker-type: b-linux-docker-large-amd
    run:
        script: build-nodejs.sh
        toolchain-alias:
            - linux64-node
    fetches:
        fetch:
            - nodejs-22-source
        toolchain:
            - linux64-gcc-11
            - linux64-toolchain-sysroot-gcc10

linux64-aarch64-node-22:
    treeherder:
        symbol: TLA64(node-22)
    run:
        toolchain-alias:
            - linux64-aarch64-node
    fetches:
        fetch:
            - nodejs-22-linux64-arm64

macosx64-node-22:
    treeherder:
        symbol: TM(node-22)
    run:
        toolchain-alias:
            - macosx64-node

    fetches:
        fetch:
            - nodejs-22-macosx64

macosx64-aarch64-node-22:
    treeherder:
        symbol: TMA64(node-22)
    run:
        toolchain-alias:
            - macosx64-aarch64-node
    fetches:
        fetch:
            - nodejs-22-macosx64-arm64

win64-node-22:
    treeherder:
        symbol: TW64(node-22)
    run:
        toolchain-alias:
            - win64-node
    fetches:
        fetch:
            - nodejs-22-win64

win32-node-22:
    treeherder:
        symbol: TW32(node-22)
    run:
        toolchain-alias:
            - win32-node
    fetches:
        fetch:
            - nodejs-22-win32
