# Ray CI conditional testing rules definition files
#
# Comment content, after '#', will be ignored.
# Empty lines will be ignored too.
#
#   ! tag1 tag2 tag3  # Declares a tag. A tag must be declared first to be used.
#   # Tags must be declared at the beginning.
#
#   dir/  # Directory to match
#   file  # File to match
#   dir/*.py  # Pattern to match, using fnmatch, matches dir/a.py dir/dir/b.py or dir/.py
#   @ tag1 tag2 tag3  # Tags to emit for a rule. A rule without tags is a skipping rule.
#
#   ;  # Semicolon to separate rules

! always lint
! python cpp core_cpp java workflow cgraphs_direct_transport dashboard
! ray_client runtime_env_container
! data dask serve ml tune train train_gpu llm rllib rllib_gpu rllib_directly
! linux_wheels macos_wheels docker doc python_dependencies min_build tools
! release_tests spark_on_ray

# NOTE: dstrodtman is leading effort to rework content in RST files, and wanted to shift
# from blocking premerge for these changes. We can remove this pass block once effort concludes,
# or earlier should regressions become an issue.
doc/*.rst
# pass
;

python/ray/air/
@ ml train train_gpu tune data linux_wheels
;

python/deplocks/llm/*.lock
@ llm python_dependencies
;

python/ray/llm/
doc/source/llm/
doc/source/data/doc_code/working-with-llms/
.buildkite/llm.rayci.yml
ci/docker/llm.build.Dockerfile
@ llm
;

python/ray/data/
.buildkite/data.rayci.yml
ci/docker/data.build.Dockerfile
ci/docker/data.build.wanda.yaml
ci/docker/datan.build.wanda.yaml
ci/docker/data9.build.wanda.yaml
ci/docker/datal.build.wanda.yaml
@ data
;

python/ray/workflow/
@ workflow
;

python/ray/tune/
@ ml train tune linux_wheels
;

python/ray/train/
@ ml train train_gpu linux_wheels
;

.buildkite/ml.rayci.yml
ci/docker/ml.build.wanda.yaml
ci/docker/mllightning2gpu.build.wanda.yaml
ci/docker/ml.build.Dockerfile
ci/ray_ci/ml.tests.yml
@ ml train train_gpu tune
;

ci/docker/min.build.Dockerfile
ci/docker/min.build.wanda.yaml
@ min_build
;

rllib/
python/ray/rllib/
ci/ray_ci/rllib.tests.yml
.buildkite/rllib.rayci.yml
@ rllib rllib_gpu rllib_directly
;

python/ray/serve/
.buildkite/serve.rayci.yml
ci/docker/serve.build.Dockerfile
@ serve linux_wheels java
;

python/ray/dashboard/
@ dashboard linux_wheels python
;

# The macOS smoke test installs this specific lock file
# (ci/ray_ci/macos/macos_ci.sh), so changes here must still trigger
# macos_wheels. Must precede the general python/deplocks/ rule below.
# Also emits python_dependencies so lock file changes still run the
# raydepsets --check verification in dependencies.rayci.yml.
python/deplocks/ci/macos_depset_py*
@ macos_wheels python_dependencies
;

# Short-circuit deps handling for docs-specific.
python/deplocks/docs/*.lock
ci/raydepsets/configs/docs.depsets.yaml
@ doc python_dependencies
;

# Raydepsets-generated lock files and raydepsets configs that drive
# their generation. These do NOT affect the macOS smoke test (which
# only consumes macos_depset_py*, handled above), so we deliberately
# omit macos_wheels here to avoid running mac tests on unrelated lock
# updates. Otherwise mirrors the python/setup.py rule's tag set so
# general dependency changes still fan out across CI.
python/deplocks/
ci/raydepsets/configs/
@ ml tune train serve workflow data min_build
@ python dashboard linux_wheels java
@ python_dependencies
;

python/setup.py
python/requirements.txt
python/requirements_compiled.txt
python/requirements_compiled_py*
python/requirements/
@ ml tune train serve workflow data min_build
@ python dashboard linux_wheels macos_wheels java
@ python_dependencies
;

python/ray/dag/
python/ray/experimental/channel/
python/ray/experimental/rdt/
python/ray/experimental/collective/
python/ray/tests/rdt/
@ python cgraphs_direct_transport
;

python/ray/util/client/
@ python ray_client
;

python/ray/util/dask/
@ python dask
;

python/ray/util/spark/
@ python spark_on_ray
;

python/ray/runtime_env/
@ python runtime_env_container
;

python/
@ ml tune train data
# Python changes might impact cross language stack in Java.
# Java also depends on Python CLI to manage processes.
@ python dashboard linux_wheels macos_wheels java
;

.buildkite/core.rayci.yml
@ python core_cpp
;

java/
.buildkite/others.rayci.yml
@ java
;

cpp/
.buildkite/pipeline.build_cpp.yml
@ cpp
;

docker/
.buildkite/pipeline.build_cpp.yml
.buildkite/_images.rayci.yml
.buildkite/release/_images.rayci.yml
@ docker linux_wheels
;

.readthedocs.yaml
@ doc
;

doc/*.py
doc/*.ipynb
doc/BUILD
doc/*/BUILD
doc/*.rst
doc/requirements-doc.txt
.vale.ini
.vale/
.buildkite/doc.rayci.yml
@ doc
;

ci/docker/doctest.build.Dockerfile
ci/docker/doctest.build.wanda.yaml
# pass
;

release/ray_release/
release/requirements_*
release/*.md
release/*.yaml
@ tools
;

release/
@ release_tests
;

doc/
examples/
dev/
kubernetes/
site/
# pass
;

ci/lint/
.buildkite/cicd.rayci.yml
.buildkite/lint.rayci.yml
.buildkite/bisect/
ci/fossa/
ci/docker/fossa.Dockerfile
ci/docker/fossa.wanda.yaml
bazel/tests/
@ tools
;

# Raydepsets tool code. Changes here can alter what gets compiled into
# lock files, so emit python_dependencies to re-run the compile/check.
# The configs/ subdir is handled earlier with the deplock rule block.
ci/raydepsets/
@ tools python_dependencies
;

.buildkite/macos.rayci.yml
.buildkite/pipeline.macos.yml
ci/ray_ci/macos/macos_ci.sh
ci/ray_ci/macos/macos_ci_build.sh
@ macos_wheels
;

ci/pipeline/
ci/build/
ci/ray_ci/
.buildkite/_forge.rayci.yml
.buildkite/_forge.aarch64.rayci.yml
ci/docker/forge.wanda.yaml
ci/docker/forge.aarch64.wanda.yaml
.buildkite/pipeline.build.yml
.buildkite/hooks/post-command
.buildkite/release/
.buildkite/release-automation/
build-wheel.sh
build-image.sh
@ tools
;

.buildkite/base.rayci.yml
.buildkite/build.rayci.yml
.buildkite/pipeline.arm64.yml
ci/docker/manylinux.Dockerfile
ci/docker/manylinux.wanda.yaml
ci/docker/manylinux.aarch64.wanda.yaml
ci/docker/windows.build.Dockerfile
ci/docker/windows.build.wanda.yaml
build-docker.sh
@ docker linux_wheels tools
;

ci/run/
ci/ci.sh
.buildkite/*.rules.test.txt
.buildkite/*.rules.txt
@ tools
;

src/ray/core_worker/experimental*.h
src/ray/core_worker/experimental*.cc
@ cgraphs_direct_transport
;

src/
@ core_cpp cpp
@ java python linux_wheels macos_wheels
@ dashboard release_tests
;

.github/
README.rst
SECURITY.md
CONTRIBUTING.rst
LICENSE
pylintrc
semgrep.yml
setup_hooks.sh
.pre-commit-config.yaml
.isort.cfg
.prettierrc.toml
.fossa.yml
# pass
;

*
@ ml tune train data serve
@ core_cpp cpp java python doc
@ linux_wheels macos_wheels dashboard tools release_tests
;
