forked from rapidsai/cuvs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_docs.sh
executable file
·57 lines (44 loc) · 1.51 KB
/
build_docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Copyright (c) 2023-2024, 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 --yes -f env.yaml -n docs
# seeing failures on activating the environment here on unbound locals
# apply workaround from https://github.com/conda/conda/issues/8186#issuecomment-532874667
set +eu
conda activate docs
set -eu
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)
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
libcuvs cuvs
export RAPIDS_VERSION="$(rapids-version)"
export RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
export RAPIDS_VERSION_NUMBER="$RAPIDS_VERSION_MAJOR_MINOR"
export RAPIDS_DOCS_DIR="$(mktemp -d)"
rapids-logger "Build CPP docs"
pushd cpp/doxygen
doxygen Doxyfile
popd
rapids-logger "Build Rust docs"
pushd rust
export LIBCLANG_PATH=$(dirname $(find /opt/conda -name libclang.so | head -n 1))
cargo doc -p cuvs --no-deps
popd
rapids-logger "Build Python docs"
pushd docs
sphinx-build -b dirhtml source _html
mv ../rust/target/doc ./_html/_static/rust
mkdir -p "${RAPIDS_DOCS_DIR}/cuvs/"html
mv _html/* "${RAPIDS_DOCS_DIR}/cuvs/html"
popd
rapids-upload-docs