# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

ci_config: &ci_config
 - '.github/**'
 - '.mise/**'
 # We count changes to Cargo.lock as a "CI config" level change, as we need to ensure that all CI jobs will work correctly with the updated lock file.
 # Otherwise, later job runs may run into issues that have nothing to do with their changes.
 - 'Cargo.lock'

files_in_root: &files_in_root
 - '*!(/)' # changes in the root, such as cspell.json or pnpm-lock.yaml
 - '.*'

js_config: &js_config
 - 'package.json'
 - 'package-lock.json'
 - 'pnpm-workspace.yaml'
 - '.npmrc'
 - 'pnpm-lock.yaml'

slint:
 - 'api/**'
 - 'cmake/**'
 - 'demos/**'
 - 'docker/**'
 - 'docs/**'
 - 'editors/**'
 - 'helper_crates/**'
 - 'internal/**'
 - 'logo/**'
 - 'scripts/**'
 - 'tests/**'
 - 'tools/compiler/**'
 - 'tools/docsnapper/**'
 - 'tools/figma_import/**'
 - 'tools/lsp/**'
 - 'tools/slintpad/**'
 - 'tools/tr-extractor/**'
 - 'tools/updater/**'
 - 'tools/viewer/**'
 - 'xtask/**'
 - *files_in_root
 - *ci_config

figma_inspector:
 - 'tools/figma-inspector/**'
 - *js_config
 - *ci_config

material_components:
 - 'ui-libraries/material/**'
 - 'docs/common/**'
 - *js_config
 - *ci_config

safety_docs:
 - 'docs/safety/**'
 - 'docs/common/**'
 - *js_config
 - *ci_config

internal: &internal
 # The API specific tests don't depends on renderer or backend, but they do depend on the Qt widgets and the testing backend
 - 'internal/!({renderers,backends}/**)'
 - 'internal/backends/qt/**'
 - 'internal/backends/testing/**'
 - 'helper_crates/**'
 - 'Cargo.toml' # the root Cargo.toml
 - '.cargo/**'
 - *ci_config

api_cpp:
 - 'api/cpp/**'
 - 'tools/compiler/**'
 - *ci_config
 # The renderers are not part of the `internal` group, but are exposed in the C++ API
 - 'internal/renderers/{skia,software}/**'

api_python:
 - 'api/python/**'
 - *ci_config

api_node:
 - 'api/node/**'
 - *js_config
 - *ci_config

api_rs:
 - 'api/rs/**'
 - 'Cargo.toml'
 - *ci_config

tests:
 - 'tests/**'

examples:
 # Some examples are tested separately and can be excluded from here
 - 'examples/!({servo,bevy,*mcu*,uefi-demo,}/**)'
 - 'demos/**'

examples_mcu:
 - 'examples/*mcu*/**'
 - 'internal/renderers/software/**'

vsce:
 - *internal
 - *js_config
 - 'api/rs/**'
 - 'editors/vscode/**'
 - 'tools/lsp/**'
 - 'docs/common/src/utils/slint.tmLanguage.json'

slintpad:
 - *internal
 - 'tools/slintpad/**'
 - 'api/wasm-interpreter/**'
 - 'tools/lsp/**'
 - 'api/rs/**'
 - 'docs/common/src/utils/slint.tmLanguage.json'

updater_test:
 - *internal
 - 'tests/cases/**'
 - 'tools/updater/**'

servo_example:
 - 'examples/servo/**'
 - *ci_config

bevy_examples:
 - 'examples/bevy/**'
 - *ci_config

rust_files:
 - '**/*.rs'
 - '**/Cargo.toml'
 - 'Cargo.lock'
 - *ci_config
