6666 sudo rm -rf /opt/ghc /usr/local/.ghcup
6767 sudo docker system prune -f
6868
69- - uses : actions/checkout@v6
69+ - uses : actions/checkout@v7
7070 - name : Set up Python ${{ env.PYTHON_VER1 }}
7171 uses : actions/setup-python@v6
7272 with :
@@ -129,7 +129,7 @@ jobs:
129129 sudo rm -rf /usr/local/lib/android
130130 sudo rm -rf /opt/ghc /usr/local/.ghcup
131131 sudo docker system prune -f
132- - uses : actions/checkout@v6
132+ - uses : actions/checkout@v7
133133 - name : Set up Python ${{ matrix.python-version }}
134134 uses : actions/setup-python@v6
135135 with :
@@ -171,7 +171,7 @@ jobs:
171171 strategy :
172172 fail-fast : false
173173 matrix :
174- os : [windows-latest, ubuntu-latest] # macOS-latest omitted for now for being very slow, see #8864
174+ os : [windows-latest, ubuntu-latest, macOS-latest ] # macOS-latest is very slow ( #8864), testing install only
175175 timeout-minutes : 120
176176 env :
177177 QUICKTEST : True
@@ -191,7 +191,7 @@ jobs:
191191 minimum-size : 8GB
192192 maximum-size : 16GB
193193 disk-root : " D:"
194- - uses : actions/checkout@v6
194+ - uses : actions/checkout@v7
195195 - name : Set up Python ${{ env.PYTHON_VER1 }}
196196 uses : actions/setup-python@v6
197197 with :
@@ -223,19 +223,77 @@ jobs:
223223 cat "requirements-dev.txt"
224224 python -m pip install --no-build-isolation -r requirements-dev.txt
225225 python -m pip list
226- python -m pip install -e . # test no compile installation
226+ python -m pip install --no-build-isolation - e . # test no compile installation
227227 shell : bash
228228 - name : Run compiled (${{ runner.os }})
229229 run : |
230230 python -m pip uninstall -y monai
231- BUILD_MONAI=1 python -m pip install -e . # compile the cpp extensions
231+ BUILD_MONAI=1 python -m pip install --no-build-isolation - e . # compile the cpp extensions
232232 shell : bash
233- - name : Run quick tests
233+ - if : runner.os != 'macOS'
234+ name : Run full tests
234235 run : |
235236 python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
236237 python -c "import monai; monai.config.print_config()"
237238 python -m unittest -v
238239 shell : bash
240+ - if : runner.os == 'macOS'
241+ name : Run min tests
242+ run : |
243+ python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
244+ python -c "import monai; monai.config.print_config()"
245+ # TODO: enable large range of macOS tests which don't take a very long time
246+ ./runtests.sh --min
247+ shell : bash
248+
249+ hyena-dep : # Optional HyenaND dependency + the no-CUDA Hyena tests.
250+ # nvsubquadratic >= 0.1.1 supports Python >= 3.10 and keeps its CUDA-kernel sdist
251+ # (subquadratic-ops-torch-cu12) plus the megatron / dali / timm packages in opt-in
252+ # extras, so it installs on a CPU runner. We still pass ``--no-deps`` deliberately:
253+ # (1) the HyenaND operators import only torch + einops + omegaconf at runtime, so
254+ # skipping the (still batteries-included: datasets/lightning/wandb) core deps
255+ # keeps this job lean; and
256+ # (2) nvsubquadratic pins torch>=2.10,<2.11, which would otherwise upgrade/clash
257+ # with the torch this job (and MONAI's matrix) installs.
258+ # CUDA-required Hyena tests skip cleanly here; the GPU surface is covered by
259+ # ``.github/workflows/pythonapp-hyena-gpu.yml``.
260+ runs-on : ubuntu-latest
261+ timeout-minutes : 30
262+ steps :
263+ - name : Clean unused tools
264+ run : |
265+ find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
266+ sudo rm -rf /usr/share/dotnet
267+ sudo rm -rf /usr/local/lib/android
268+ sudo rm -rf /opt/ghc /usr/local/.ghcup
269+ sudo docker system prune -f
270+ - uses : actions/checkout@v6
271+ - name : Set up Python ${{ env.PYTHON_VER1 }}
272+ uses : actions/setup-python@v6
273+ with :
274+ python-version : ${{ env.PYTHON_VER1 }}
275+ cache : ' pip'
276+ - name : Install dependencies + nvsubquadratic (no-deps)
277+ run : |
278+ python -m pip install --upgrade pip wheel
279+ python -m pip install torch==${PYTORCH_VER1} torchvision==${TORCHVISION_VER1}
280+ python -m pip install --no-build-isolation -r requirements-dev.txt
281+ python -m pip install -e .
282+ # nvsubquadratic runtime imports need only torch + einops + omegaconf; install
283+ # the package itself without its core dependency tree (see job comment above).
284+ python -m pip install omegaconf
285+ python -m pip install --no-deps 'nvsubquadratic>=0.1.1'
286+ python -m pip list
287+ shell : bash
288+ - name : Run Hyena tests (CUDA-required cases skip cleanly)
289+ run : |
290+ python -c "from monai.networks.blocks.hyena import is_nvsubquadratic_available; \
291+ assert is_nvsubquadratic_available(), 'nvsubquadratic must be importable'"
292+ python -m pytest -v \
293+ tests/networks/blocks/test_hyena_block.py \
294+ tests/networks/nets/test_hyena_nd_unetr.py \
295+ tests/networks/nets/test_swin_unetr.py
296+ shell : bash
239297
240298 packaging : # Test package generation
241299 runs-on : ubuntu-latest
@@ -249,7 +307,7 @@ jobs:
249307 sudo rm -rf /usr/local/lib/android
250308 sudo rm -rf /opt/ghc /usr/local/.ghcup
251309 sudo docker system prune -f
252- - uses : actions/checkout@v6
310+ - uses : actions/checkout@v7
253311 with :
254312 fetch-depth : 0
255313 - name : Set up Python ${{ env.PYTHON_VER1 }}
0 commit comments