Skip to content

Commit d8be163

Browse files
committed
test: Add script to test uv virtual environments
1 parent c12d2da commit d8be163

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.cibw/run-tests-conda.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ conda=$(command -v micromamba || command -v mamba || command -v conda)
1616
: "${CONDA_EXE=${MAMBA_EXE=${conda:-conda-not-found}}}"
1717

1818
scriptdir=$(dirname "${BASH_SOURCE[0]}")
19+
"$CONDA_EXE" uninstall -qy "$mpipackage"
1920
for version in "${!mpiversion}"; do
2021
echo "::group::$mpipackage=$version"
2122
"$CONDA_EXE" install -qy "$mpipackage=$version"
2223
"$CONDA_EXE" list
2324
"$CONDA_EXE" run bash "$scriptdir"/run-tests-mpi.sh
2425
echo "::endgroup::"
2526
done
27+
"$CONDA_EXE" uninstall -qy "$mpipackage"

.cibw/run-tests-pypip.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ python=$(command -v python)
1616
: "${PYTHON=${python:-python-not-found}}"
1717

1818
scriptdir=$(dirname "${BASH_SOURCE[0]}")
19+
"$PYTHON" -m pip uninstall -qy "$mpipackage"
1920
for version in "${!mpiversion}"; do
2021
echo "::group::$mpipackage=$version"
2122
"$PYTHON" -m pip install "$mpipackage==$version.*"
2223
"$PYTHON" -m pip list
2324
"$scriptdir"/run-tests-mpi.sh
2425
echo "::endgroup::"
2526
done
27+
"$PYTHON" -m pip uninstall -qy "$mpipackage"

.cibw/run-tests-uvpip.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# shellcheck disable=SC2034
3+
set -euo pipefail
4+
5+
mpich=("4.3" "4.2" "4.1" "4.0" "3.4")
6+
openmpi=("5.0" "4.1")
7+
impi=("2021.15" "2021.10" "2021.7")
8+
msmpi=()
9+
10+
mpi="$1"
11+
mpipackage="$mpi"
12+
mpiversion="${mpi}[@]"
13+
test "$mpi" = impi && mpipackage=impi_rt
14+
15+
uv=$(command -v uv)
16+
: "${UV=${uv:-uv-not-found}}"
17+
18+
scriptdir=$(dirname "${BASH_SOURCE[0]}")
19+
"$UV" pip uninstall -q "$mpipackage"
20+
for version in "${!mpiversion}"; do
21+
echo "::group::$mpipackage=$version"
22+
"$UV" pip install "$mpipackage==$version.*"
23+
"$UV" pip list
24+
"$UV" run bash "$scriptdir"/run-tests-mpi.sh
25+
echo "::endgroup::"
26+
done
27+
"$UV" pip uninstall -q "$mpipackage"

0 commit comments

Comments
 (0)