Unverified Commit e0eebebf authored by Jiazhen Wang's avatar Jiazhen Wang Committed by GitHub
Browse files

[Fix] Fix Python3.10 CI (#1828)

* Fix python3.10 ci

* fix build ci

* fix build ci

* fix onnx build in ci

* remove onnx optimizer

* remove python3.10 ci

* special treatment for py3.10

* fix build ci

* special treatment for python3.10 in requirements/test

* fix requirements/test
parent a02a4815
...@@ -217,7 +217,7 @@ jobs: ...@@ -217,7 +217,7 @@ jobs:
strategy: strategy:
matrix: matrix:
python-version: [3.7] python-version: [3.7]
torch: [1.9.0+cu102, 1.10.0+cu102, 1.11.0+cu102] torch: [1.9.0+cu102, 1.10.0+cu102]
include: include:
- torch: 1.9.0+cu102 - torch: 1.9.0+cu102
torchvision: 0.10.0+cu102 torchvision: 0.10.0+cu102
...@@ -238,8 +238,12 @@ jobs: ...@@ -238,8 +238,12 @@ jobs:
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Add PPA
run: |
apt-get update && apt-get install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
- name: Install python-dev - name: Install python-dev
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python${{matrix.python-version}}-dev
- name: python -m Install PyTorch - name: python -m Install PyTorch
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install system dependencies - name: Install system dependencies
...@@ -256,6 +260,15 @@ jobs: ...@@ -256,6 +260,15 @@ jobs:
python -m pip install -r requirements/test.txt python -m pip install -r requirements/test.txt
coverage run --branch --source=mmcv -m pytest tests/ coverage run --branch --source=mmcv -m pytest tests/
coverage xml coverage xml
if: ${{matrix.python-version != '3.10'}}
# special treatment for python3.10 because onnx and onnxruntime don't provide python3.10 pre-built packages
- name: Run unittests and generate coverage report for python3.10
run: |
python -m pip install -r requirements/test.txt
coverage run --branch --source=mmcv -m pytest tests/ --ignore=tests/test_ops/test_onnx.py --ignore=tests/test_ops/test_tensorrt.py --ignore=tests/test_ops/test_tensorrt_preprocess.py
coverage xml
if: ${{matrix.python-version == '3.10'}}
build_windows_without_ops: build_windows_without_ops:
runs-on: windows-latest runs-on: windows-latest
......
coverage coverage
lmdb lmdb
onnx==1.7.0 onnx==1.7.0; python_version < '3.10'
onnxoptimizer onnxoptimizer; python_version < '3.10'
onnxruntime>=1.8.0 onnxruntime>=1.8.0; python_version < '3.10'
pytest pytest
PyTurboJPEG PyTurboJPEG
scipy scipy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment