diff --git a/ci/check_style.sh b/ci/check_style.sh index 84822c4..3a0a89f 100755 --- a/ci/check_style.sh +++ b/ci/check_style.sh @@ -1,9 +1,20 @@ #!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION +# Copyright (c) 2023-2024, NVIDIA CORPORATION set -euo pipefail -pip install pre-commit +rapids-logger "Create checks conda environment" +. /opt/conda/etc/profile.d/conda.sh + +ENV_YAML_DIR="$(mktemp -d)" + +rapids-dependency-file-generator \ + --output conda \ + --file_key checks \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n checks +conda activate checks # Run pre-commit checks pre-commit run --all-files --show-diff-on-failure diff --git a/ci/test_conda.sh b/ci/test_conda.sh index 2b272f4..501dc2c 100755 --- a/ci/test_conda.sh +++ b/ci/test_conda.sh @@ -6,19 +6,15 @@ set -euo pipefail . /opt/conda/etc/profile.d/conda.sh rapids-logger "Install testing dependencies" -# TODO: Replace with rapids-dependency-file-generator -rapids-mamba-retry create -n test \ - c-compiler \ - cxx-compiler \ - cuda-nvcc \ - cuda-nvrtc \ - cuda-python \ - cuda-version=${RAPIDS_CUDA_VERSION%.*} \ - "numba>=0.58" \ - make \ - psutil \ - pytest \ - python=${RAPIDS_PY_VERSION} + +ENV_YAML_DIR="$(mktemp -d)" + +rapids-dependency-file-generator \ + --output conda \ + --file_key test \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n test # Temporarily allow unbound variables for conda activation. set +u diff --git a/ci/test_patch.sh b/ci/test_patch.sh index 334c257..f397f1c 100755 --- a/ci/test_patch.sh +++ b/ci/test_patch.sh @@ -6,15 +6,15 @@ set -euo pipefail . /opt/conda/etc/profile.d/conda.sh rapids-logger "Install testing dependencies" -# TODO: Replace with rapids-dependency-file-generator -rapids-mamba-retry create -n test \ - cuda-nvcc \ - cuda-nvrtc \ - cuda-python \ - cuda-version=${RAPIDS_CUDA_VERSION%.*} \ - "numba>=0.58" \ - psutil \ - python=${RAPIDS_PY_VERSION} + +ENV_YAML_DIR="$(mktemp -d)" + +rapids-dependency-file-generator \ + --output conda \ + --file_key test \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n test # Temporarily allow unbound variables for conda activation. set +u diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index 6cd10a0..cf3a7a8 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -3,14 +3,6 @@ set -euo pipefail -rapids-logger "Install testing dependencies" -# TODO: Replace with rapids-dependency-file-generator -python -m pip install \ - "numba>=0.58" \ - psutil \ - cuda-python \ - pytest - rapids-logger "Download Wheel" RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" RAPIDS_PY_WHEEL_NAME="pynvjitlink_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist/ @@ -19,7 +11,7 @@ RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/ mkdir -p "${RAPIDS_TESTS_DIR}" rapids-logger "Install wheel" -python -m pip install $(echo ./dist/pynvjitlink_${RAPIDS_PY_CUDA_SUFFIX}*.whl) +python -m pip install $(echo ./dist/pynvjitlink_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test] rapids-logger "Build Tests" pushd test_binary_generation