Skip to content

Commit

Permalink
Create Conda CI test env in one step (#90)
Browse files Browse the repository at this point in the history
Issue: rapidsai/build-planning#22

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

Approvers:
  - Gil Forsyth (https://github.com/gforsyth)

URL: #90
  • Loading branch information
KyleFromNVIDIA authored Feb 13, 2025
1 parent f9e0974 commit 7c9c868
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(
DEPENDENCIES=(
cudf
cugraph
nx-cugraph
pylibcugraph
)
for FILE in dependencies.yaml conda/environments/*.yaml conda/recipes/**/meta.yaml; do
Expand Down
14 changes: 5 additions & 9 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"
rapids-logger "Downloading artifacts from previous jobs"
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

rapids-logger "Generate Python testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file-key test_python \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \
--prepend-channel "${PYTHON_CHANNEL}" \
| tee env.yaml

rapids-mamba-retry env create --yes -f env.yaml -n test

Expand All @@ -23,19 +26,12 @@ set +u
conda activate test
set -u

rapids-logger "Downloading artifacts from previous jobs"
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"

rapids-print-env

rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
"nx-cugraph=${RAPIDS_VERSION}.*"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
6 changes: 6 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ files:
- py_version
- test_python_common
- test_python_nx_cugraph
- depends_on_nx_cugraph
py_build_nx_cugraph:
output: pyproject
pyproject_dir: .
Expand Down Expand Up @@ -117,6 +118,11 @@ dependencies:
cuda: "12.8"
packages:
- cuda-version=12.8
depends_on_nx_cugraph:
common:
- output_types: conda
packages:
- nx-cugraph==25.4.*,>=0.0.0a0
docs:
common:
- output_types: [conda]
Expand Down

0 comments on commit 7c9c868

Please sign in to comment.