@@ -76,17 +76,17 @@ jobs:
7676 python -m pip install torch==1.4 -f https://download.pytorch.org/whl/cpu/torch_stable.html
7777 python -m pip install torchvision==0.5.0
7878 # min. requirements for windows instances
79- python -c "f=open('requirements-dev.txt', 'r'); txt=f.readlines(); f.close(); print(txt); f=open('requirements-dev.txt', 'w'); f.writelines(txt[1:12 ]); f.close()"
79+ python -c "f=open('requirements-dev.txt', 'r'); txt=f.readlines(); f.close(); print(txt); f=open('requirements-dev.txt', 'w'); f.writelines(txt[1:13 ]); f.close()"
8080 - name : Install the dependencies
8181 run : |
8282 python -m pip install torch==1.4
8383 python -m pip install torchvision==0.5.0
8484 cat "requirements-dev.txt"
8585 python -m pip install -r requirements-dev.txt
8686 python -m pip list
87- SKIP_MONAI_BUILD=1 python setup.py develop
87+ python setup.py develop
8888 python setup.py develop --uninstall
89- python setup.py develop # compile the cpp extensions
89+ BUILD_MONAI=1 python setup.py develop # compile the cpp extensions
9090 shell : bash
9191 - name : Run quick tests (CPU ${{ runner.os }})
9292 run : |
9595 env :
9696 QUICKTEST : True
9797
98+ min-dep-py3 : # min dependencies installed
99+ runs-on : ${{ matrix.os }}
100+ strategy :
101+ fail-fast : false
102+ matrix :
103+ os : [windows-latest, macOS-latest, ubuntu-latest]
104+ timeout-minutes : 20
105+ steps :
106+ - uses : actions/checkout@v2
107+ - name : Set up Python 3.x
108+ uses : actions/setup-python@v1
109+ with :
110+ python-version : ' 3.x'
111+ - name : Prepare pip wheel
112+ run : |
113+ which python
114+ python -m pip install --upgrade pip wheel
115+ - name : cache weekly timestamp
116+ id : pip-cache
117+ run : |
118+ echo "::set-output name=datew::$(date '+%Y-%V')"
119+ echo "::set-output name=dir::$(pip cache dir)"
120+ shell : bash
121+ - name : cache for pip
122+ uses : actions/cache@v2
123+ id : cache
124+ with :
125+ path : ${{ steps.pip-cache.outputs.dir }}
126+ key : ${{ matrix.os }}-latest-pip-${{ steps.pip-cache.outputs.datew }}
127+ - if : runner.os == 'windows'
128+ name : Install torch cpu from pytorch.org (Windows only)
129+ run : |
130+ python -m pip install torch==1.4 -f https://download.pytorch.org/whl/cpu/torch_stable.html
131+ - name : Install the dependencies
132+ run : |
133+ # min. requirements for windows instances
134+ python -m pip install torch==1.4
135+ python -c "f=open('requirements-dev.txt', 'r'); txt=f.readlines(); f.close(); print(txt); f=open('requirements-dev.txt', 'w'); f.writelines(txt[1:6]); f.close()"
136+ cat "requirements-dev.txt"
137+ python -m pip install -r requirements-dev.txt
138+ python -m pip list
139+ BUILD_MONAI=0 python setup.py develop # no compile of extensions
140+ shell : bash
141+ - name : Run quick tests (CPU ${{ runner.os }})
142+ run : |
143+ python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
144+ python -m tests.min_tests
145+ env :
146+ QUICKTEST : True
147+
98148 GPU-quick-py3 : # GPU with full dependencies
99149 strategy :
100150 matrix :
@@ -170,11 +220,11 @@ jobs:
170220 run : |
171221 python -m pip list
172222 nvidia-smi
173- export CUDA_VISIBLE_DEVICES=$(python -m tests.utils)
223+ export CUDA_VISIBLE_DEVICES=$(coverage run -m tests.utils)
174224 echo $CUDA_VISIBLE_DEVICES
175225 python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
176226 python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
177- ./runtests.sh --quick
227+ BUILD_MONAI=1 ./runtests.sh --quick
178228 if [ ${{ matrix.environment }} == "PT16+CUDA110" ]; then
179229 # test the clang-format tool downloading once
180230 coverage run -m tests.clang_format_utils
@@ -274,4 +324,7 @@ jobs:
274324 - name : Make html
275325 run : |
276326 cd docs/
277- make html
327+ make clean
328+ make html 2>&1 | tee tmp_log
329+ if [[ $(grep -c "^WARNING:" tmp_log) != 0 ]]; then echo "found warnings"; exit 1; fi
330+ shell : bash
0 commit comments