Skip to content

Commit 1ab8c26

Browse files
committed
ci: replace conda ci with pixi
1 parent 8408c30 commit 1ab8c26

File tree

3 files changed

+4893
-99
lines changed

3 files changed

+4893
-99
lines changed

ci/test_conda.sh

Lines changed: 12 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44

55
set -euo pipefail
66

7-
. /opt/conda/etc/profile.d/conda.sh
8-
9-
CTK_PACKAGE_DEPENDENCIES=(
10-
"cuda-cccl"
11-
"cuda-nvcc-impl"
12-
"cuda-nvrtc"
13-
"libcurand-dev"
14-
"cuda-cuobjdump"
15-
)
16-
177
DISTRO=`cat /etc/os-release | grep "^ID=" | awk 'BEGIN {FS="="} { print $2 }'`
188

199
if [ "$DISTRO" = "ubuntu" ]; then
@@ -22,65 +12,32 @@ if [ "$DISTRO" = "ubuntu" ]; then
2212
apt remove --purge `dpkg --get-selections | grep cuda-nvrtc | awk '{print $1}'` -y
2313
fi
2414

25-
rapids-logger "Install testing dependencies"
26-
# TODO: Replace with rapids-dependency-file-generator
27-
DEPENDENCIES=(
28-
"c-compiler"
29-
"cxx-compiler"
30-
"${CTK_PACKAGE_DEPENDENCIES[@]}"
31-
"cuda-python"
32-
"cuda-version=${CUDA_VER%.*}"
33-
"make"
34-
"numba-cuda"
35-
"psutil"
36-
"pytest"
37-
"pytest-xdist"
38-
"pytest-benchmark"
39-
"cffi"
40-
"ml_dtypes"
41-
"python=${RAPIDS_PY_VERSION}"
42-
)
4315
# Constrain oldest supported dependencies for testing
4416
if [ "${RAPIDS_DEPENDENCIES:-}" = "oldest" ]; then
45-
DEPENDENCIES+=("numba==0.60.0")
17+
# add to the default environment's dependencies
18+
pixi add "numba=0.60.0"
4619
fi
4720

48-
rapids-mamba-retry create \
49-
-n test \
50-
--strict-channel-priority \
51-
--channel "`pwd`/conda-repo" \
52-
--channel conda-forge \
53-
"${DEPENDENCIES[@]}"
54-
55-
# Temporarily allow unbound variables for conda activation.
56-
set +u
57-
conda activate test
58-
set -u
59-
60-
pip install filecheck
61-
62-
rapids-print-env
63-
6421
rapids-logger "Check GPU usage"
6522
nvidia-smi
6623

67-
rapids-logger "Build test binaries"
68-
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
69-
pushd $NUMBA_CUDA_TEST_BIN_DIR
70-
make -j $(nproc)
71-
72-
rapids-logger "Show Numba system info"
73-
python -m numba --sysinfo
74-
7524
EXITCODE=0
7625
trap "EXITCODE=1" ERR
7726
set +e
7827

28+
PIXI_ENV="cu-$(cut -d. -f1-2 <<< "${CUDA_VER}" | tr . -)"
29+
30+
rapids-logger "Show dependencies"
31+
pixi list -e "${PIXI_ENV}"
32+
33+
rapids-logger "Show Numba system info"
34+
pixi run -e "${PIXI_ENV}" python -m numba --sysinfo
35+
7936
rapids-logger "Test importing numba.cuda"
80-
python -c "from numba import cuda"
37+
pixi run -e "${PIXI_ENV}" python -c "from numba import cuda"
8138

8239
rapids-logger "Run Tests"
83-
pytest -v
40+
pixi run -e "${PIXI_ENV}" test -n auto --dist loadscope --benchmark-disable -v
8441

8542
popd
8643

0 commit comments

Comments
 (0)