schema: 1

bugzilla:
  product: Core
  component: "Graphics: WebGPU"

origin:
  name: WebGPU CTS
  description: WebGPU Compliance Test Suite
  url: https://gpuweb.github.io/cts/
  release: e5e17d8bb639438e1c99cbf367928a242c3bdef6 (2025-05-05T19:06:47Z).
  revision: e5e17d8bb639438e1c99cbf367928a242c3bdef6
  license: ['BSD-3-Clause']

updatebot:
    maintainer-phab: '#webgpu-reviewers!'
    maintainer-bz: egubler@mozilla.com
    try-preset: webgpu
    tasks:
      - type: vendoring
        enabled: true
        frequency: 1 week
        blocking: 1863146  # webgpu-update-cts

vendoring:
  url: https://github.com/gpuweb/cts
  source-hosting: github
  vendor-directory: dom/webgpu/tests/cts/checkout/
  skip-vendoring-steps:
    - update-moz-build
  include:
    - .gitattributes
    - .gitignore  # Avoids re-formatting of generated files.
  update-actions:
    # Use the version from `mach vendor`, instead of a script that consults Git. This is wrong,
    # because (1) it would use a Git checkout of _Gecko_ rather than CTS, and (2) we might not even
    # have a Git checkout if we're using Mercurial.
    - action: replace-in-file
      file: '{yaml_dir}/checkout/tools/gen_version'
      pattern: "const { version } = require('../src/common/tools/version.ts');"
      with: "const version = '{revision}';"

    - action: run-command
      cwd: '{yaml_dir}/vendor/'
      command: cargo
      args:
        - run
        - --no-default-features
        - --
        - '../checkout/'

    - action: delete-path
      path: '../../../../../testing/web-platform/mozilla/tests/webgpu/'
    - action: move-dir
      from: '{yaml_dir}/checkout/out-wpt/'
      to: '../../../../../testing/web-platform/mozilla/tests/webgpu/'

    - action: delete-path
      path: '{yaml_dir}/checkout/node_modules/'
    - action: delete-path
      path: '{yaml_dir}/checkout/gen/'
    - action: delete-path
      path: '{yaml_dir}/checkout/out/'
    - action: delete-path
      path: '{yaml_dir}/checkout/deploy_key.enc'
