Skip to content

Commit 6ff724e

Browse files
authored
[Enhancement] Add win-ci (open-mmlab#1296)
* [Enhancement] Add win-ci * add timm in win unittest * remove mmflow with mmseg in win unittest * remove opencv-python in requirements * add opencv2 back * move opencv installation into build.yml
1 parent 72ff12f commit 6ff724e

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,39 @@ jobs:
214214
env_vars: OS,PYTHON
215215
name: codecov-umbrella
216216
fail_ci_if_error: false
217+
218+
test_windows:
219+
runs-on: ${{ matrix.os }}
220+
strategy:
221+
matrix:
222+
os: [windows-2022]
223+
python: [3.8]
224+
platform: [cpu, cu111]
225+
steps:
226+
- uses: actions/checkout@v2
227+
- name: Set up Python ${{ matrix.python }}
228+
uses: actions/setup-python@v2
229+
with:
230+
python-version: ${{ matrix.python }}
231+
- name: Upgrade pip
232+
run: pip install pip --upgrade --user
233+
- name: Install OpenCV
234+
run: pip install opencv-python>=3
235+
- name: Install PyTorch
236+
# As a complement to Linux CI, we test on PyTorch LTS version
237+
run: pip install torch==1.8.2+${{ matrix.platform }} torchvision==0.9.2+${{ matrix.platform }} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
238+
- name: Install MMCV
239+
run: |
240+
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.8/index.html --only-binary mmcv-full
241+
- name: Install unittest dependencies
242+
run: pip install -r requirements/tests.txt -r requirements/optional.txt
243+
- name: Build and install
244+
run: pip install -e .
245+
- name: Run unittests
246+
run: |
247+
python -m pip install timm
248+
coverage run --branch --source mmseg -m pytest tests/
249+
- name: Generate coverage report
250+
run: |
251+
coverage xml
252+
coverage report -m

requirements/tests.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
codecov
22
flake8
33
interrogate
4-
isort==4.3.21
54
pytest
65
xdoctest>=0.10.0
76
yapf

0 commit comments

Comments
 (0)