# 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
    - release-update-verify-config
    - post-balrog-dummy
    - post-beetmover-dummy
    - release-balrog-submit-toplevel

transforms:
    - gecko_taskgraph.transforms.release:run_on_releases
    - gecko_taskgraph.transforms.release_deps:transforms
    - gecko_taskgraph.transforms.update_test:transforms
    - gecko_taskgraph.transforms.job:transforms
    - gecko_taskgraph.transforms.task:transforms

task-defaults:
    shipping-phase: promote
    shipping-product: firefox
    run-on-releases: [release, release-rc, beta]
    treeherder:
        kind: other
        tier: 2
        symbol: update-test(firefox)
    worker:
        max-run-time: 10800
        artifacts:
            - type: directory
              path: update-test
              name: public/update-test
        env:
            UPLOAD_DIR: .
            VERSION_LOG_FILENAME: update-test-version-info.log
    run-on-projects: []
    index:
        product: firefox
    run:
        using: run-task
        command: >-
            ./mach update-test

tasks:
    update-test-locale-fx:
        os:
            - win11-64-24h2-source
            - win10-64-2009-source
            - t-osx-1500-m4
            - t-osx-1400-r8
            - t-osx-1015-r8

    update-test-linux-docker-locale-fx:
        worker-type: t-linux-docker-amd
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test
        os:
            - ubuntu2404-test

    update-test-source-version-fx:
        os:
            - win11-64-24h2-source
            - win10-64-2009
            - t-osx-1500-m4
            - t-osx-1400-r8
            - t-osx-1015-r8

    update-test-linux-docker-source-version-fx:
        worker-type: t-linux-docker
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test
        os:
            - ubuntu2404-test

    update-test-fx-bkg:
        run:
            command: >-
                ./mach update-test --test-type Background
        os:
            - win11-64-24h2-source
            - win10-64-2009
            - t-osx-1500-m4
            - t-osx-1400-r8
            - t-osx-1015-r8

    update-test-linux-docker-fx-bkg:
        worker-type: t-linux-docker
        worker:
            artifacts:
                - type: directory
                  path: /builds/worker/artifacts/update-test
                  name: public/update-test
            env:
                UPLOAD_DIR: /builds/worker/artifacts
                VERSION_LOG_FILENAME: update-test-version-info.log
        run:
            command: >-
                . $HOME/scripts/xvfb.sh && start_xvfb '1600x1200x24' 0 && ./mach update-test --test-type Background
        os:
            - ubuntu2404-test
