Skip to content

Commit

Permalink
[Enhancement] Add win-ci (open-mmlab#1296)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
MengzhangLI authored Feb 22, 2022
1 parent ff25d2f commit bcd0c89
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
codecov
flake8
interrogate
isort==4.3.21
pytest
xdoctest>=0.10.0
yapf

0 comments on commit bcd0c89

Please sign in to comment.