Skip to content

Commit 171b472

Browse files
authored
Update test workflow (#675)
* doc: update CITATION.cff * pinned down more versions. 👛 * Installing mpi locally ⛵ * Using system install of MPI 🎌 * Removed pinning of mpi packages. It's not needed. 🌋 --------- Co-authored-by: anawas <anawas@users.noreply.github.com>
1 parent ff1aa1c commit 171b472

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Run Karabo Tests
22

33
on:
44
schedule: # Every night at 5am
@@ -16,37 +16,66 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout Code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
20+
21+
- name: Install system MPICH (needed for external mpich) + compat symlink for wsclean
22+
shell: bash
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y mpich libmpich-dev libmpich12
26+
arch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
27+
# wsclean expects libmpicxx.so.12 but Ubuntu provides libmpichcxx.so.12
28+
if [ -e "/usr/lib/$arch/libmpichcxx.so.12" ] && [ ! -e "/usr/lib/$arch/libmpicxx.so.12" ]; then
29+
sudo ln -s "/usr/lib/$arch/libmpichcxx.so.12" "/usr/lib/$arch/libmpicxx.so.12"
30+
sudo ldconfig
31+
fi
32+
# Optional sanity:
33+
ldconfig -p | grep -E 'libmpi\.so\.12|libmpichcxx\.so\.12|libmpicxx\.so\.12' || true
34+
which mpirun
35+
mpirun --version
36+
2037
- name: Install Conda
2138
uses: conda-incubator/setup-miniconda@v3
2239
with:
2340
mamba-version: "*"
2441
channels: conda-forge
2542
channel-priority: "true"
2643
conda-remove-defaults: "true"
44+
activate-environment: test_karabo
45+
python-version: "3.10"
46+
2747
- name: Install Deps
2848
shell: bash -el {0}
2949
run: |
3050
conda create -y -n test_karabo python=3.10
51+
conda env update -n test_karabo -f environment.yaml --prune
3152
conda activate test_karabo
32-
conda env update -f environment.yaml
53+
pip install --no-binary mpi4py mpi4py==4.1.1
3354
pip install -e ".[dev]"
3455
python -m ipykernel install --user --name python3.10
56+
57+
# Debug since we had problems with mpi installation
58+
python -c "import h5py; print('h5py ok')"
59+
which wsclean || true
60+
ldd "$(which wsclean)" | grep -i mpi || tru
61+
3562
- name: Test Dev-Tools
36-
shell: bash -l {0}
63+
shell: bash -el {0}
3764
run: |
3865
conda activate test_karabo
3966
flake8 .
4067
black --check .
4168
isort --check .
4269
mypy .
70+
4371
- name: Test Code
44-
shell: bash -l {0}
72+
shell: bash -el {0}
4573
run: |
46-
conda activate test_karabo
4774
export IS_GITHUB_RUNNER=true RUN_GPU_TESTS=false RUN_NOTEBOOK_TESTS=true
75+
conda activate test_karabo
4876
mpirun -n 2 pytest --only-mpi
4977
pytest --cov=./ --cov-report=xml
78+
5079
- name: Upload coverage reports to Codecov
5180
uses: codecov/codecov-action@v3
5281
with:

environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels:
2+
- conda-forge
23
- i4ds
34
- nvidia/label/cuda-11.7.0
4-
- conda-forge
55
dependencies:
66
# Set dependencies and it's constraints in the package they belong. Otherwise you just cause chaos for future builds.
77
# Just Karabo's direct dependencies and Karabo constraints (from our code) should be handled here.

0 commit comments

Comments
 (0)