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

Add docs build job #347

Merged
merged 38 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
cc3111c
initial draft
AyodeAwe Jan 23, 2023
1bccb03
update build_docs.sh
AyodeAwe Jan 24, 2023
daff4ca
chmod
AyodeAwe Jan 24, 2023
000a387
update build_docs.sh
AyodeAwe Jan 24, 2023
5592c0b
update deps
AyodeAwe Jan 24, 2023
d324f22
Update dependencies.yaml
AyodeAwe Jan 29, 2023
425ed04
Update ci/build_docs.sh
AyodeAwe Jan 29, 2023
9ed99dc
Update ci/build_docs.sh
AyodeAwe Jan 29, 2023
f66dbe6
Update ci/build_docs.sh
AyodeAwe Jan 29, 2023
d7e3f73
Update ci/build_docs.sh
AyodeAwe Jan 29, 2023
5ba5b82
Update ci/build_docs.sh
AyodeAwe Jan 29, 2023
e9a6bd9
Update ci/build_docs.sh
AyodeAwe Jan 29, 2023
add43fd
fix lang
AyodeAwe Jan 29, 2023
3bbeb38
Merge branch 'add_docs_build' of github.com:AyodeAwe/rapids-cmake int…
AyodeAwe Jan 29, 2023
129d60c
Merge branch 'branch-23.02' into add_docs_build
AyodeAwe Jan 29, 2023
12c7817
copyright fix
AyodeAwe Jan 29, 2023
092af00
Merge branch 'add_docs_build' of github.com:AyodeAwe/rapids-cmake int…
AyodeAwe Jan 29, 2023
e48a809
fixes
AyodeAwe Jan 31, 2023
493920b
update conf.py
AyodeAwe Feb 1, 2023
eac6a77
Merge branch 'branch-23.04' into add_docs_build
AyodeAwe Feb 1, 2023
108bde6
fix typo
AyodeAwe Feb 1, 2023
749d91c
Merge branch 'add_docs_build' of github.com:AyodeAwe/rapids-cmake int…
AyodeAwe Feb 1, 2023
9ff03be
rm -W flag
AyodeAwe Feb 1, 2023
c7ed678
fix warnings
AyodeAwe Feb 10, 2023
82ffacd
docs_build -> docs
AyodeAwe Feb 10, 2023
a7b6d05
Merge branch 'branch-23.04' into add_docs_build
AyodeAwe Feb 10, 2023
a53a7b3
Update .github/workflows/build.yaml
AyodeAwe Feb 14, 2023
773ac64
Update .github/workflows/pr.yaml
AyodeAwe Feb 14, 2023
3a8a0a6
Update dependencies.yaml
AyodeAwe Feb 14, 2023
2bf6416
Update docs/conf.py
AyodeAwe Feb 14, 2023
76d82d1
Update rapids-cmake/cython/create_modules.cmake
AyodeAwe Feb 14, 2023
e96a260
Update rapids-cmake/cython/add_rpath_entries.cmake
AyodeAwe Feb 14, 2023
5978af4
fix checks
AyodeAwe Feb 14, 2023
c392729
Update docs/conf.py
ajschmidt8 Feb 14, 2023
7c25f5b
Merge branch 'branch-23.04' into add_docs_build
ajschmidt8 Feb 15, 2023
7e59bcb
review fixes
AyodeAwe Feb 16, 2023
76ce4ed
rm os import
AyodeAwe Feb 16, 2023
8164582
Apply suggestions from code review
ajschmidt8 Feb 17, 2023
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
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,14 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
docs-build:
if: ${{ startsWith(github.ref, 'refs/heads/branch-') }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if: ${{ startsWith(github.ref, 'refs/heads/branch-') }}
if: github.ref_type == 'branch' && github.event_name == 'push'

I just discovered this problem that we'll need to update in all of the docs build PRs that have already been merged.

We need to change this conditional so that this job doesn't run as part of the nightly builds.

The docs builds aren't intended to run as part of the nightly jobs, so they're currently breaking the nightly builds (see cuml nightly job here for reference).

We can update this conditional as shown here to:

  • simplify the branch assertion
  • ensure that it only runs on push events (as opposed to workflow_dispatch events which trigger the nightlies).

After this PR is merged, we can test that this conditional works correctly and then roll out the fix to other repositories.

cc: @AjayThorve

needs: cpp-build
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.04
with:
build_type: branch
node_type: "gpu-latest-1"
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- checks
- conda-cpp-build
- conda-cpp-tests
- docs-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.04
checks:
Expand All @@ -32,3 +33,13 @@ jobs:
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.04
with:
build_type: pull-request
docs-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.04
with:
build_type: pull-request
node_type: "gpu-latest-1"
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
31 changes: 31 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.

set -euo pipefail

rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh

rapids-dependency-file-generator \
--output conda \
--file_key docs \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n docs
conda activate docs

rapids-print-env

VERSION_NUMBER=$(rapids-get-rapids-version-from-git)

rapids-logger "Build Sphinx docs"
pushd docs
sphinx-build -b dirhtml . _html -W
sphinx-build -b text . _text -W
popd


if [[ ${RAPIDS_BUILD_TYPE} == "branch" ]]; then
aws s3 sync --delete docs/_html "s3://rapidsai-docs/rapids-cmake/${VERSION_NUMBER}/html"
aws s3 sync --delete docs/_text "s3://rapidsai-docs/rapids-cmake/${VERSION_NUMBER}/txt"
fi
16 changes: 16 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ files:
includes:
- build
- cudatoolkit
- docs
- test
checks:
output: none
includes:
- build
- style_checks
docs:
output: none
includes:
- cudatoolkit
- docs
channels:
- rapidsai
- conda-forge
Expand Down Expand Up @@ -51,6 +57,16 @@ dependencies:
cuda: "11.8"
packages:
- cudatoolkit=11.8
docs:
common:
- output_types: [conda]
packages:
- pip
- pip:
- sphinxcontrib-moderncmakedomain
- sphinx
- sphinx-copybutton
- sphinx_rtd_theme
test:
common:
- output_types: [conda, requirements]
Expand Down
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2023, NVIDIA CORPORATION.
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
#
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand All @@ -15,7 +17,7 @@
# -- Project information -----------------------------------------------------

project = "rapids-cmake"
copyright = "2021, NVIDIA"
copyright = "2021-2023, NVIDIA"
author = "NVIDIA"

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -64,7 +66,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
15 changes: 7 additions & 8 deletions rapids-cmake/cython/add_rpath_entries.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -17,25 +17,24 @@ include_guard(GLOBAL)
#[=======================================================================[.rst:
rapids_cython_add_rpath_entries
-------------------------------

.. versionadded:: v22.12.00

Set the RPATH entries for all targets associated with a provided associated target.

.. code-block:: cmake

rapids_cython_add_rpath_entries(
TARGET <associated_target>
PATHS <path1> <path2> ...
[ROOT_DIRECTORY <root-dir>]
)
rapids_cython_add_rpath_entries(
TARGET <associated_target>
PATHS <path1> <path2> ...
[ROOT_DIRECTORY <root-dir>]
)

This function will affect all targets created up to the point of this call. It
will have no effect on targets created afterwards.

``TARGET``
The associated target for which we are setting RPATH entries. Any target
created using :code:command:`rapids_cython_create_modules` with the argument
created using :cmake:command:`rapids_cython_create_modules` with the argument
`ASSOCIATED_TARGET associated_target` will have its RPATH entries updated.

``PATHS``
Expand Down
5 changes: 3 additions & 2 deletions rapids-cmake/cython/create_modules.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -61,7 +61,8 @@ $ORIGIN.
A list of targets that are associated with the Cython targets created in this
function. The target<-->associated target mapping is stored and may be
leveraged by the following functions:
- :code:command:`rapids_cython_add_rpath_entries` accepts a path for an

- :cmake:command:`rapids_cython_add_rpath_entries` accepts a path for an
associated target and updates the RPATH of each target with which that
associated target is associated.

Expand Down