Skip to content

Commit

Permalink
Add CI for windows (open-mmlab#732)
Browse files Browse the repository at this point in the history
* Add CI for windows

* only-binary flag

* remove opencv dependency

* install opencv with facexlib

* quote less than

* Update build.yml

Co-authored-by: ys-li <56712176+Yshuo-Li@users.noreply.github.com>
  • Loading branch information
wangruohui and Yshuo-Li authored Feb 15, 2022
1 parent 28fba8b commit 60197c8
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ jobs:
run: pip install torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMCV
run: |
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/${{ matrix.mmcv_link }}/index.html --only-binary mmcv-full
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/${{ matrix.mmcv_link }}/index.html --only-binary mmcv-full "opencv-python<=4.5.4.60"
python -c 'import mmcv; print(mmcv.__version__)'
- name: Install FaceXLib
run: pip install facexlib
- name: Install FaceXLib (with opencv <= 4.5.4.60)
run: pip install facexlib "opencv-python<=4.5.4.60"
if: ${{ matrix.torch != '1.5.1+cpu' && matrix.torch != '1.5.1+cu92' && matrix.torch != '1.6.0+cpu' }}
- name: Install av
run: python -m pip install av
Expand All @@ -98,7 +98,49 @@ jobs:
run: rm -rf .eggs && pip install -e .
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmedit -m pytest tests/
coverage run --branch --source mmedit -m pytest tests/ -sv
coverage xml
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml
flags: unittests
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 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 FaceXLib (with opencv <= 4.5.4.60)
run: pip install facexlib "opencv-python<=4.5.4.60"
- name: Install unittest dependencies
run: pip install -r requirements.txt
- name: Show pip list
run: pip list
- name: Build and install
run: pip install -e .
- name: Run unittests
run: coverage run --branch --source mmedit -m pytest tests -sv
- name: Generate coverage report
run: |
coverage xml
coverage report -m
- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lmdb
mmcv-full>=1.3.1
opencv-python-headless<=4.5.4.60
opencv-python<=4.5.4.60
scikit-image
tensorboard
yapf

0 comments on commit 60197c8

Please sign in to comment.