Skip to content

Commit

Permalink
Consolidate test installs
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Dec 6, 2024
1 parent 780dcf9 commit 2170a75
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
2 changes: 2 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ function sed_runner() {
echo "${NEXT_FULL_TAG}" > VERSION

DEPENDENCIES=(
kvikio
libkvikio
libkvikio-tests
)
for DEP in "${DEPENDENCIES[@]}"; do
for FILE in dependencies.yaml conda/environments/*.yaml; do
Expand Down
13 changes: 4 additions & 9 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ set -euo pipefail

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

RAPIDS_VERSION="$(rapids-version)"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file-key test_cpp \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \
--prepend-channel "${CPP_CHANNEL}" \
| tee env.yaml

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

Expand All @@ -20,18 +22,11 @@ set +u
conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"
SUITEERROR=0

rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
"libkvikio=${RAPIDS_VERSION}" \
"libkvikio-tests=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
18 changes: 6 additions & 12 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

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

RAPIDS_VERSION="$(rapids-version)"
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
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 "${CPP_CHANNEL}" --prepend-channel "${PYTHON_CHANNEL}" \
| tee env.yaml

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

Expand All @@ -23,22 +27,12 @@ set +u
conda activate test
set -u

rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
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 "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
"libkvikio=${RAPIDS_VERSION}" \
"kvikio=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
14 changes: 14 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ files:
output: none
includes:
- cuda_version
- test_libkvikio
- test_cpp
test_python:
output: none
includes:
- cuda_version
- py_version
- test_kvikio
- test_python
checks:
output: none
Expand Down Expand Up @@ -358,6 +360,18 @@ dependencies:
# See https://github.com/zarr-developers/numcodecs/pull/475
- numcodecs !=0.12.0
- packaging
test_libkvikio:
common:
- output_types: conda
packages:
- libkvikio==24.12.*
- libkvikio-tests==24.12.*
test_kvikio:
common:
- output_types: conda
packages:
- libkvikio==24.12.*
- kvikio==24.12.*
test_cpp:
common:
- output_types: conda
Expand Down

0 comments on commit 2170a75

Please sign in to comment.