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 step #1189

Merged
merged 14 commits into from
Jan 18, 2023
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
docs-build:
if: ${{ startsWith(github.ref, 'refs/heads/branch-') }}
needs: python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
with:
build_type: pull-request
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
wheel-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@main
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- conda-cpp-tests
- conda-python-build
- conda-python-tests
- docs-build
- wheel-build
- wheel-tests
secrets: inherit
Expand Down Expand Up @@ -48,6 +49,16 @@ jobs:
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-118
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
with:
build_type: pull-request
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
wheel-build:
needs: checks
secrets: inherit
Expand Down
45 changes: 45 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
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
bdice marked this conversation as resolved.
Show resolved Hide resolved

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

rapids-print-env

rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
AyodeAwe marked this conversation as resolved.
Show resolved Hide resolved
VERSION_NUMBER=$(rapids-get-rapids-version-from-git)

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
rmm librmm

# Build CPP docs
rapids-logger "Build Doxygen docs"
pushd doxygen
doxygen Doxyfile
popd

# Build Python docs
rapids-logger "Build Python docs"
pushd python/docs
sphinx-build -b dirhtml . _html
sphinx-build -b text . _text
popd

if [[ "${RAPIDS_BUILD_TYPE}" == "branch" ]]; then
rapids-logger "Upload Docs to S3"
aws s3 sync --delete doxygen/html "s3://rapidsai-docs/librmm/${VERSION_NUMBER}/html"
aws s3 sync --delete python/docs/_html "s3://rapidsai-docs/rmm/${VERSION_NUMBER}/html"
aws s3 sync --delete python/docs/_text "s3://rapidsai-docs/rmm/${VERSION_NUMBER}/txt"
fi
2 changes: 1 addition & 1 deletion ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rapids-print-env
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

rapids-mamba-retry install \
-c "${CPP_CHANNEL}" \
--channel "${CPP_CHANNEL}" \
librmm librmm-tests

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
Expand Down
4 changes: 2 additions & 2 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

rapids-mamba-retry install \
-c "${CPP_CHANNEL}" \
-c "${PYTHON_CHANNEL}" \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
rmm librmm

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
Expand Down
19 changes: 19 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ files:
includes:
- checks
- py_version
docs:
output: none
includes:
- cudatoolkit
- docs
- py_version
channels:
- rapidsai
- conda-forge
Expand Down Expand Up @@ -78,6 +84,19 @@ dependencies:
- output_types: [conda, requirements]
packages:
- gcovr>=5.0
docs:
common:
- output_types: [conda]
packages:
- doxygen=1.8.20
AyodeAwe marked this conversation as resolved.
Show resolved Hide resolved
- graphviz
- ipython
- nbsphinx
- numpydoc
- sphinx
- sphinx_rtd_theme
- sphinx-copybutton
- sphinx-markdown-tables
py_version:
specific:
- output_types: conda
Expand Down
3 changes: 1 addition & 2 deletions doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../src \
../include
INPUT = ../include

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down