From e3e31d122b0b8b9356b5b7deb8d49844aa61eff2 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Thu, 13 Feb 2025 11:23:19 -0500 Subject: [PATCH] Create Conda CI test env in one step (#663) Issue: https://github.com/rapidsai/build-planning/issues/22 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Gil Forsyth (https://github.com/gforsyth) URL: https://github.com/rapidsai/cuxfilter/pull/663 --- ci/test_notebooks.sh | 15 +++++---------- ci/test_python.sh | 14 +++++--------- dependencies.yaml | 7 +++++++ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/ci/test_notebooks.sh b/ci/test_notebooks.sh index 949525bd..590a145b 100755 --- a/ci/test_notebooks.sh +++ b/ci/test_notebooks.sh @@ -5,13 +5,16 @@ set -euo pipefail . /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 notebook testing dependencies" rapids-dependency-file-generator \ --output conda \ --file-key test_notebooks \ - --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 @@ -22,14 +25,6 @@ set -u rapids-print-env -rapids-logger "Downloading artifacts from previous jobs" -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - -rapids-mamba-retry install \ - --channel "${PYTHON_CHANNEL}" \ - "cuxfilter=${RAPIDS_VERSION}" - - NBTEST="$(realpath "$(dirname "$0")/utils/nbtest.sh")" pushd notebooks diff --git a/ci/test_python.sh b/ci/test_python.sh index 60cc36ab..19929e1f 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -5,13 +5,16 @@ set -euo pipefail . /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 @@ -20,19 +23,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}" \ - "cuxfilter=${RAPIDS_VERSION}" - rapids-logger "Check GPU usage" nvidia-smi diff --git a/dependencies.yaml b/dependencies.yaml index 900b601a..491bcab7 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -23,12 +23,14 @@ files: - cuda_version - py_version - test_python + - depends_on_cuxfilter test_notebooks: output: none includes: - cuda_version - notebook - py_version + - depends_on_cuxfilter checks: output: none includes: @@ -137,6 +139,11 @@ dependencies: - output_types: [conda, requirements] packages: - pre-commit + depends_on_cuxfilter: + common: + - output_types: conda + packages: + - cuxfilter==25.4.*,>=0.0.0a0 docs: common: - output_types: [conda, requirements]