Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions .buildkite/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
# Buildkite pipelines

This directory contains buildkite pipelines used to start CI tests.
This directory contains the Buildkite pipeline definitions for Ray CI, plus the rules that decide which tests run on a given change.

Each step contains a buildkite step that is parsed and executed according to the
[Buildkite pipeline specification](https://buildkite.com/docs/pipelines).
## Pipelines

## Conditions
Pipelines are defined in the `*.rayci.yml` files in this directory and are generated and run by [rayci](https://github.com/ray-project/rayci), Ray's CI orchestration tool. Each file groups the steps for one area (for example, `core.rayci.yml`, `data.rayci.yml`, `doc.rayci.yml`).

An extra optional field `conditions` is defined, which includes conditions under which tests are run.
The script `ci/pipeline/determine_tests_to_run.py` determines changed files in a PR and only kicks off
tests that include at least one of the conditions. If no condition is specified, the test is always run.
## Conditional test selection

A special case is the `NO_WHEELS_REQUIRED` condition. If this is present, it indicates that the test can
be run with the latest available binaries - in this case the test can be started early, as it will re-use
the latest branch image and only check out the current code revision in the PR. This early kick off will
only trigger on PR builds, not on branch builds.
Which steps run on a given pull request is determined by mapping changed file paths to *tags*. Two rule files drive this:

## Pipelines
- `test.rules.txt` is the conditional rule set. Rules are evaluated in order and the first match wins. A rule with no `@` tags is a skip rule (it matches but emits nothing), and a trailing `*` catch-all fans unmatched changes out to the full suite.
- `always.rules.txt` is an always-on overlay applied to every change.
Comment on lines +13 to +14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve navigability and developer experience, we can make the rule filenames clickable links pointing directly to the files in the repository.

Suggested change
- `test.rules.txt` is the conditional rule set. Rules are evaluated in order and the first match wins. A rule with no `@` tags is a skip rule (it matches but emits nothing), and a trailing `*` catch-all fans unmatched changes out to the full suite.
- `always.rules.txt` is an always-on overlay applied to every change.
- [`test.rules.txt`](test.rules.txt) is the conditional rule set. Rules are evaluated in order and the first match wins. A rule with no `@` tags is a skip rule (it matches but emits nothing), and a trailing `*` catch-all fans unmatched changes out to the full suite.\n- [`always.rules.txt`](always.rules.txt) is an always-on overlay applied to every change.


This directory should be considered with respect to the docker images located in `ci/docker`.
rayci parses these files (its `test-rules` command) and runs the steps whose tags are emitted. See the header comment in each rules file for the full format.

- `pipeline.build.yml` contains jobs that require build dependencies. This includes all tests that re-build
Ray (e.g. when switching Python versions). The tests are run on the `build.Dockerfile` image.
- `pipeline.test.yml` contains jobs that only require an installed Ray and a small subset of dependencies,
notably exlcuding ML libraries such as Tensorflow or Torch. The tests are run on the `test.Dockerfile` image.
- `pipeline.ml.yml` contains jobs that require ML libraries Tensorflow and Torch to be available. The tests
are run on the `ml.Dockerfile` image.
- `pipeline.gpu.yml` contains jobs that require one GPU. The tests are run on the `gpu.Dockerfile` image.
- `pipeline.gpu.large.yml` contains jobs that require multi-GPUs (currently 4). The tests are run on the `gpu.Dockerfile` image.
`ci/pipeline/determine_tests_to_run.py` is an in-repo reference implementation of the same rule-file format. It is not the live evaluator; rayci is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

We can make the path to the reference script a relative link so that developers reading the README on GitHub can easily jump to the implementation.

Suggested change
`ci/pipeline/determine_tests_to_run.py` is an in-repo reference implementation of the same rule-file format. It is not the live evaluator; rayci is.
[`ci/pipeline/determine_tests_to_run.py`](../ci/pipeline/determine_tests_to_run.py) is an in-repo reference implementation of the same rule-file format. It is not the live evaluator; rayci is.

11 changes: 0 additions & 11 deletions ci/ci_tags_from_change.sh

This file was deleted.

Loading