# 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/.

loader: taskgraph.loader.transform:loader

kind-dependencies:
    - toolchain

transforms:
    - taskgraph.transforms.build_attrs:transforms
    - taskgraph.transforms.use_toolchains:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.task:transforms

job-defaults:
    index:
        product: firefox
    treeherder:
        symbol: S
        kind: build
        tier: 1

jobs:
    linux64-st-an/debug:
        description: "Linux64 Debug Static Analysis"
        index:
            job-name: linux64-st-an-debug
        treeherder:
            platform: linux64/debug
        worker-type: aws-provisioner-v1/gecko-{level}-b-linux
        worker:
            max-run-time: 36000
        run:
            using: mozharness
            actions: [build]
            config:
                - builds/releng_base_firefox.py
                - builds/releng_sub_linux_configs/64_stat_and_debug.py
                - balrog/production.py
            script: "mozharness/scripts/fx_desktop_build.py"
            tooltool-downloads: public
            keep-artifacts: false
        toolchains:
            - linux64-clang
            - linux64-rust
            - linux64-sccache

    linux64-st-an/opt:
        description: "Linux64 Opt Static Analysis"
        index:
            job-name: linux64-st-an-opt
        treeherder:
            platform: linux64/opt
        worker-type: aws-provisioner-v1/gecko-{level}-b-linux
        worker:
            max-run-time: 36000
        run:
            using: mozharness
            actions: [build]
            config:
                - builds/releng_base_firefox.py
                - builds/releng_sub_linux_configs/64_stat_and_opt.py
                - balrog/production.py
            script: "mozharness/scripts/fx_desktop_build.py"
            tooltool-downloads: public
            keep-artifacts: false
        toolchains:
            - linux64-clang
            - linux64-rust
            - linux64-sccache

    win32-st-an/debug:
        description: "Win32 Static Analysis Debug (clang-cl)"
        index:
            product: firefox
            job-name: win32-st-an-debug
        treeherder:
            platform: windows2012-32/debug
            symbol: S
            tier: 1
        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
        worker:
            max-run-time: 7200
            env:
                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
        run:
            using: mozharness
            options: [append-env-variables-from-configs]
            script: mozharness/scripts/fx_desktop_build.py
            config:
                - builds/releng_base_firefox.py
                - builds/taskcluster_base_windows.py
                - builds/taskcluster_base_win32.py
                - builds/taskcluster_sub_win32/clang_debug.py
        toolchains:
            - win32-clang-cl
            - win32-rust
            - win64-sccache

    win32-st-an/opt:
        description: "Win32 Static Analysis Opt (clang-cl)"
        index:
            product: firefox
            job-name: win32-st-an-opt
        treeherder:
            platform: windows2012-32/opt
            symbol: S
            tier: 1
        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
        worker:
            max-run-time: 7200
            env:
                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
        run:
            using: mozharness
            options: [append-env-variables-from-configs]
            script: mozharness/scripts/fx_desktop_build.py
            config:
                - builds/releng_base_firefox.py
                - builds/taskcluster_base_windows.py
                - builds/taskcluster_base_win32.py
                - builds/taskcluster_sub_win32/clang.py
        toolchains:
            - win32-clang-cl
            - win32-rust
            - win64-sccache

    win64-st-an/debug:
        description: "Win64 Static Analysis Debug (clang-cl)"
        index:
            product: firefox
            job-name: win64-st-an-debug
        treeherder:
            platform: windows2012-64/debug
            symbol: S
            tier: 1
        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
        worker:
            max-run-time: 7200
            env:
                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
        run:
            using: mozharness
            options: [append-env-variables-from-configs]
            script: mozharness/scripts/fx_desktop_build.py
            config:
                - builds/releng_base_firefox.py
                - builds/taskcluster_base_windows.py
                - builds/taskcluster_base_win64.py
                - builds/taskcluster_sub_win64/clang_debug.py
        toolchains:
            - win64-clang-cl
            - win64-rust
            - win64-sccache

    win64-st-an/opt:
        description: "Win64 Static Analysis Opt (clang-cl)"
        index:
            product: firefox
            job-name: win64-st-an-opt
        treeherder:
            platform: windows2012-64/opt
            symbol: S
            tier: 1
        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
        worker:
            max-run-time: 7200
            env:
                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
        run:
            using: mozharness
            options: [append-env-variables-from-configs]
            script: mozharness/scripts/fx_desktop_build.py
            config:
                - builds/releng_base_firefox.py
                - builds/taskcluster_base_windows.py
                - builds/taskcluster_base_win64.py
                - builds/taskcluster_sub_win64/clang.py
        toolchains:
            - win64-clang-cl
            - win64-rust
            - win64-sccache
