[Enhancement] Add win-ci (#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
pull/1801/head
MengzhangLI 2022-02-22 21:06:57 +08:00 committed by GitHub
parent ff25d2ff0e
commit bcd0c89ebb
2 changed files with 36 additions and 1 deletions

View File

@ -214,3 +214,39 @@ jobs:
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
test_windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
python: [3.8]
platform: [cpu, cu111]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Upgrade pip
run: pip install pip --upgrade --user
- name: Install OpenCV
run: pip install opencv-python>=3
- name: Install PyTorch
# As a complement to Linux CI, we test on PyTorch LTS version
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
- name: Install MMCV
run: |
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.8/index.html --only-binary mmcv-full
- name: Install unittest dependencies
run: pip install -r requirements/tests.txt -r requirements/optional.txt
- name: Build and install
run: pip install -e .
- name: Run unittests
run: |
python -m pip install timm
coverage run --branch --source mmseg -m pytest tests/
- name: Generate coverage report
run: |
coverage xml
coverage report -m

View File

@ -1,7 +1,6 @@
codecov
flake8
interrogate
isort==4.3.21
pytest
xdoctest>=0.10.0
yapf