diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 744d34dbd..cac1e8a29 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 07b234dda..5b20e2dd0 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -17,6 +17,7 @@ jobs: - conda-cpp-tests - conda-python-build - conda-python-tests + - docs-build - wheel-build - wheel-tests secrets: inherit @@ -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 diff --git a/ci/build_docs.sh b/ci/build_docs.sh new file mode 100755 index 000000000..d5b6bfa86 --- /dev/null +++ b/ci/build_docs.sh @@ -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 + +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) +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 diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index 3953171d0..257e015fd 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -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"} diff --git a/ci/test_python.sh b/ci/test_python.sh index 511a69337..a8b446ca2 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -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"} diff --git a/dependencies.yaml b/dependencies.yaml index e83e6ddd4..4c7a1f524 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -27,6 +27,12 @@ files: includes: - checks - py_version + docs: + output: none + includes: + - cudatoolkit + - docs + - py_version channels: - rapidsai - conda-forge @@ -78,6 +84,19 @@ dependencies: - output_types: [conda, requirements] packages: - gcovr>=5.0 + docs: + common: + - output_types: [conda] + packages: + - doxygen=1.8.20 + - graphviz + - ipython + - nbsphinx + - numpydoc + - sphinx + - sphinx_rtd_theme + - sphinx-copybutton + - sphinx-markdown-tables py_version: specific: - output_types: conda diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index 39649f378..c58a45a8f 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -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