Skip to content

Commit

Permalink
[doc][build] build doc with python 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: can <can@anyscale.com>
  • Loading branch information
can-anyscale committed Jul 24, 2024
1 parent dc19878 commit ff9e2fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .buildkite/base.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ steps:

- name: docbuild
wanda: ci/docker/doc.build.wanda.yaml
depends_on: oss-ci-base_build
depends_on: oss-ci-base_build-multipy

- name: docgpubuild
wanda: ci/docker/docgpu.build.wanda.yaml
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/doc.build.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DOCKER_IMAGE_BASE_BUILD=cr.ray.io/rayproject/oss-ci-base_build
ARG DOCKER_IMAGE_BASE_BUILD=cr.ray.io/rayproject/oss-ci-base_build-py3.12
FROM $DOCKER_IMAGE_BASE_BUILD

# Unset dind settings; we are using the host's docker daemon.
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/doc.build.wanda.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "docbuild"
froms: ["cr.ray.io/rayproject/oss-ci-base_build"]
froms: ["cr.ray.io/rayproject/oss-ci-base_build-py3.12"]
dockerfile: ci/docker/doc.build.Dockerfile
srcs:
- doc/requirements-doc.txt
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

0 comments on commit ff9e2fe

Please sign in to comment.