Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc][build] build doc with python 3.12 #46772

Merged
merged 2 commits into from
Jul 24, 2024
Merged
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
13 changes: 9 additions & 4 deletions .buildkite/base.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:
label: "wanda: oss-ci-base_test-py{{matrix}}"
wanda: ci/docker/base.test.wanda.yaml
matrix:
- "3.10"
- "3.9"
- "3.11"
- "3.12"
env:
Expand All @@ -21,7 +21,7 @@ steps:
label: "wanda: oss-ci-base_build-py{{matrix}}"
wanda: ci/docker/base.build.wanda.yaml
matrix:
- "3.10"
- "3.9"
- "3.11"
- "3.12"
env:
Expand Down Expand Up @@ -57,14 +57,19 @@ steps:
label: "wanda: oss-ci-base_gpu-py{{matrix}}"
wanda: ci/docker/base.gpu.wanda.yaml
matrix:
- "3.10"
- "3.11"
env:
PYTHON: "{{matrix}}"

- name: docbuild
label: "wanda: docbuild-py{{matrix}}"
wanda: ci/docker/doc.build.wanda.yaml
depends_on: oss-ci-base_build
depends_on: oss-ci-base_build-multipy
matrix:
- "3.9"
- "3.12"
env:
PYTHON: "{{matrix}}"

- name: docgpubuild
wanda: ci/docker/docgpu.build.wanda.yaml
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/build.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ steps:
commands:
- bazel run //ci/ray_ci/doc:cmd_build
depends_on: docbuild
job_env: docbuild
job_env: docbuild-py3.12

- label: ":tapioca: build: ray py{{matrix}} docker (x86_64)"
tags:
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/lint.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
key: lint-medium
instance_type: medium
depends_on: docbuild
job_env: docbuild
job_env: docbuild-py3.9
commands:
- ./ci/lint/lint.sh {{matrix}}
matrix:
Expand All @@ -39,7 +39,7 @@ steps:
commands:
- make -C doc/ linkcheck_all
depends_on: docbuild
job_env: docbuild
job_env: docbuild-py3.9
tags:
- oss
- skip-on-premerge
Expand Down
6 changes: 3 additions & 3 deletions bazel/ray_deps_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ def ray_deps_setup():

http_archive(
name = "openssl",
strip_prefix = "openssl-1.1.1w",
sha256 = "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8",
strip_prefix = "openssl-1.1.1f",
sha256 = "186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35",
urls = [
"https://www.openssl.org/source/openssl-1.1.1w.tar.gz",
"https://openssl.org/source/old/1.1.1/openssl-1.1.1f.tar.gz",
],
build_file = "@rules_foreign_cc_thirdparty//openssl:BUILD.openssl.bazel",
)
Expand Down
8 changes: 5 additions & 3 deletions ci/docker/doc.build.wanda.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: "docbuild"
froms: ["cr.ray.io/rayproject/oss-ci-base_build"]
name: "docbuild-py$PYTHON"
froms: ["cr.ray.io/rayproject/oss-ci-base_build-py$PYTHON"]
dockerfile: ci/docker/doc.build.Dockerfile
srcs:
- doc/requirements-doc.txt
build_args:
- DOCKER_IMAGE_BASE_BUILD=cr.ray.io/rayproject/oss-ci-base_build-py$PYTHON
tags:
- cr.ray.io/rayproject/docbuild
- cr.ray.io/rayproject/docbuild-py$PYTHON
2 changes: 1 addition & 1 deletion ci/lint/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ api_annotations() {

api_policy_check() {
# install ray and compile doc to generate API files
RAY_DISABLE_EXTRA_CPP=1 pip install -e "python[all]"
make -C doc/ html
RAY_DISABLE_EXTRA_CPP=1 pip install -e "python[all]"
# validate the API files
bazel run //ci/ray_ci/doc:cmd_check_api_discrepancy -- /ray "$@"
}
Expand Down
26 changes: 18 additions & 8 deletions ci/ray_ci/doc/cmd_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from ci.ray_ci.utils import logger, ci_init
from ray_release.util import get_write_state_machine_aws_bucket
from ray_release.configs.global_config import get_global_config


AWS_CACHE_KEY = "doc_build"
Expand All @@ -25,9 +26,18 @@ def main(ray_checkout_dir: str) -> None:
logger.info("Building ray doc.")
_build(ray_checkout_dir)

if (
os.environ.get("BUILDKITE_PIPELINE_ID")
not in get_global_config()["ci_pipeline_postmerge"]
):
logger.info(
"Not uploading build artifacts because this is not a postmerge pipeline."
)
return

if os.environ.get("BUILDKITE_BRANCH") != "master":
logger.info(
"Not uploading build artifacts to S3 because this is not the master branch."
"Not uploading build artifacts because this is not the master branch."
)
return

Expand All @@ -38,14 +48,14 @@ def main(ray_checkout_dir: str) -> None:


def _build(ray_checkout_dir):
env = os.environ.copy()
# We need to unset PYTHONPATH to use the Python from the environment instead of
# from the Bazel runfiles.
env.update({"PYTHONPATH": ""})
subprocess.run(
[
"make",
"-C",
"doc/",
"html",
],
cwd=ray_checkout_dir,
["make", "html"],
cwd=os.path.join(ray_checkout_dir, "doc"),
env=env,
check=True,
)

Expand Down