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 builds to Github Actions #481

Merged
merged 8 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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: branch
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
python-build:
needs: [cpp-build]
secrets: inherit
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- conda-cpp-build
- conda-python-build
- conda-python-tests
- docs-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-118
checks:
Expand All @@ -39,3 +40,13 @@ 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"
39 changes: 39 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

set -euo pipefail
AjayThorve marked this conversation as resolved.
Show resolved Hide resolved

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}" \
cucim libcucim

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

if [[ "${RAPIDS_BUILD_TYPE}" == "branch" ]]; then
rapids-logger "Upload Docs to S3"
aws s3 sync --no-progress --delete docs/_html "s3://rapidsai-docs/cucim/${VERSION_NUMBER}/html"
aws s3 sync --no-progress --delete docs/_text "s3://rapidsai-docs/cucim/${VERSION_NUMBER}/txt"
fi
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies:
- recommonmark
- scikit-image >=0.19.0,<0.20.0a0
- scipy
- sphinx
- sphinx<6
- sysroot_linux-64==2.17
- tifffile>=2022.7.28
- xz
Expand Down
12 changes: 9 additions & 3 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ files:
- build
- cudatoolkit
- checks
- doc
- docs
- py_version
- run
- test_python
Expand All @@ -24,6 +24,12 @@ files:
includes:
- checks
- py_version
docs:
output: none
includes:
- cudatoolkit
- docs
- py_version
channels:
- rapidsai
- rapidsai-nightly
Expand Down Expand Up @@ -91,7 +97,7 @@ dependencies:
cuda: "11.8"
packages:
- cudatoolkit=11.8
doc:
docs:
common:
- output_types: [conda, requirements]
packages:
Expand All @@ -100,7 +106,7 @@ dependencies:
- numpydoc
- pydata-sphinx-theme
- recommonmark
- sphinx
- sphinx<6
AjayThorve marked this conversation as resolved.
Show resolved Hide resolved
py_version:
specific:
- output_types: conda
Expand Down