11name : build
22
3- on : [ push, pull_request ]
3+ on : [push, pull_request]
44
55jobs :
66 lint :
77 runs-on : ubuntu-18.04
88 steps :
99 - uses : actions/checkout@v2
1010 - name : Set up Python 3.7
11- uses : actions/setup-python@v1
11+ uses : actions/setup-python@v2
1212 with :
1313 python-version : 3.7
1414 - name : Install pre-commit hook
@@ -17,25 +17,36 @@ jobs:
1717 pre-commit install
1818 - name : Linting
1919 run : pre-commit run --all-files
20- - name : Check docstring
20+ - name : Check docstring coverage
2121 run : |
2222 pip install interrogate
2323 interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --exclude mmseg/ops --ignore-regex "__repr__" --fail-under 80 mmseg
24+
2425 build_cpu :
2526 runs-on : ubuntu-18.04
2627 strategy :
2728 matrix :
2829 python-version : [3.7]
29- torch : [1.3.0 , 1.5.0, 1.7.0, 1.9.0]
30+ torch : [1.3.1 , 1.5.1, 1.6. 0, 1.7.0, 1.8 .0, 1.9.0]
3031 include :
31- - torch : 1.3.0
32- torchvision : 0.4.1
33- - torch : 1.5.0
34- torchvision : 0.6.0
32+ - torch : 1.3.1
33+ torchvision : 0.4.2
34+ mmcv : " latest+torch1.3.0+cpu"
35+ - torch : 1.5.1
36+ torchvision : 0.6.1
37+ mmcv : " latest+torch1.5.0+cpu"
38+ - torch : 1.6.0
39+ torchvision : 0.7.0
40+ mmcv : " latest+torch1.6.0+cpu"
3541 - torch : 1.7.0
3642 torchvision : 0.8.1
43+ mmcv : " latest+torch1.7.0+cpu"
44+ - torch : 1.8.0
45+ torchvision : 0.9.0
46+ mmcv : " latest+torch1.8.0+cpu"
3747 - torch : 1.9.0
3848 torchvision : 0.10.0
49+ mmcv : " latest+torch1.9.0+cpu"
3950 steps :
4051 - uses : actions/checkout@v2
4152 - name : Set up Python ${{ matrix.python-version }}
@@ -45,15 +56,17 @@ jobs:
4556 - name : Upgrade pip
4657 run : pip install pip --upgrade
4758 - name : Install Pillow
48- if : ${{matrix.torchvision == '0.4.1'}}
4959 run : pip install Pillow==6.2.2
60+ if : ${{matrix.torchvision == '0.4.2'}}
5061 - name : Install PyTorch
5162 run : pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
52- - name : Install mmseg dependencies
63+ - name : Install MMCV
5364 run : |
5465 pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
55- pip install -r requirements.txt
5666 python -c 'import mmcv; print(mmcv.__version__)'
67+ - name : Install unittest dependencies
68+ run : |
69+ pip install -r requirements.txt
5770 - name : Build and install
5871 run : rm -rf .eggs && pip install -e .
5972 - name : Run unittests and generate coverage report
@@ -62,98 +75,146 @@ jobs:
6275 coverage xml
6376 coverage report -m
6477
65- build_cuda :
78+ build_cuda101 :
6679 runs-on : ubuntu-18.04
67- env :
68- UBUNTU_VERSION : ubuntu1804
80+ container :
81+ image : pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel
82+
6983 strategy :
7084 matrix :
7185 python-version : [3.7]
72- torch : [1.5.0+cu101, 1.7.0+cu101, 1.8.0+cu101, 1.9.0+cu102]
86+ torch :
87+ [
88+ 1.3.1,
89+ 1.5.1+cu101,
90+ 1.6.0+cu101,
91+ 1.7.0+cu101,
92+ 1.8.0+cu101
93+ ]
7394 include :
74- - torch : 1.5.0+cu101
75- torch_version : torch1.5.0
76- torchvision : 0.6.0+cu101
77- CUDA : 10.1.105-1
78- CUDA_SHORT : 10-1
95+ - torch : 1.3.1
96+ torch_version : torch1.3.1
97+ torchvision : 0.4.2
98+ mmcv_link : " torch1.3.0"
99+ - torch : 1.5.1+cu101
100+ torch_version : torch1.5.1
101+ torchvision : 0.6.1+cu101
102+ mmcv_link : " torch1.5.0"
103+ - torch : 1.6.0+cu101
104+ torch_version : torch1.6.0
105+ torchvision : 0.7.0+cu101
106+ mmcv_link : " torch1.6.0"
79107 - torch : 1.7.0+cu101
80108 torch_version : torch1.7.0
81109 torchvision : 0.8.1+cu101
82- CUDA : 10.1.105-1
83- CUDA_SHORT : 10-1
110+ mmcv_link : " torch1.7.0"
84111 - torch : 1.8.0+cu101
85112 torch_version : torch1.8.0
86113 torchvision : 0.9.0+cu101
87- CUDA : 10.1.105-1
88- CUDA_SHORT : 10-1
114+ mmcv_link : " torch1.8.0"
115+
116+ steps :
117+ - uses : actions/checkout@v2
118+ - name : Set up Python ${{ matrix.python-version }}
119+ uses : actions/setup-python@v2
120+ with :
121+ python-version : ${{ matrix.python-version }}
122+ - name : Install system dependencies
123+ run : |
124+ apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 python${{matrix.python-version}}-dev
125+ apt-get clean
126+ rm -rf /var/lib/apt/lists/*
127+ - name : Install Pillow
128+ run : python -m pip install Pillow==6.2.2
129+ if : ${{matrix.torchvision < 0.5}}
130+ - name : Install PyTorch
131+ run : python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
132+ - name : Install dependencies for compiling onnx when python=3.9
133+ run : python -m pip install protobuf && apt-get install libprotobuf-dev protobuf-compiler
134+ if : ${{matrix.python-version == '3.9'}}
135+ - name : Install mmseg dependencies
136+ run : |
137+ python -V
138+ python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.mmcv_link}}/index.html
139+ python -m pip install -r requirements.txt
140+ python -c 'import mmcv; print(mmcv.__version__)'
141+ - name : Build and install
142+ run : |
143+ rm -rf .eggs
144+ python setup.py check -m -s
145+ TORCH_CUDA_ARCH_LIST=7.0 pip install .
146+ - name : Run unittests and generate coverage report
147+ run : |
148+ coverage run --branch --source mmseg -m pytest tests/
149+ coverage xml
150+ coverage report -m
151+ - name : Upload coverage to Codecov
152+ 153+ with :
154+ file : ./coverage.xml
155+ flags : unittests
156+ env_vars : OS,PYTHON
157+ name : codecov-umbrella
158+ fail_ci_if_error : false
159+
160+ build_cuda102 :
161+ runs-on : ubuntu-18.04
162+ container :
163+ image : pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel
164+
165+ strategy :
166+ matrix :
167+ python-version : [3.6, 3.7, 3.8, 3.9-dev]
168+ torch : [1.9.0+cu102]
169+ include :
89170 - torch : 1.9.0+cu102
90171 torch_version : torch1.9.0
91172 torchvision : 0.10.0+cu102
92- CUDA : 10.2.89-1
93- CUDA_SHORT : 10-2
94- - python-version : 3.6
95- torch : 1.8.0+cu101
96- torch_version : torch1.8.0
97- torchvision : 0.9.0+cu101
98- CUDA : 10.1.105-1
99- CUDA_SHORT : 10-1
100- - python-version : 3.8
101- torch : 1.8.0+cu101
102- torch_version : torch1.8.0
103- torchvision : 0.9.0+cu101
104- CUDA : 10.1.105-1
105- CUDA_SHORT : 10-1
106- - python-version : 3.9
107- torch : 1.8.0+cu101
108- torch_version : torch1.8.0
109- torchvision : 0.9.0+cu101
110- CUDA : 10.1.105-1
111- CUDA_SHORT : 10-1
173+ mmcv_link : " torch1.9.0"
174+
112175 steps :
113176 - uses : actions/checkout@v2
114177 - name : Set up Python ${{ matrix.python-version }}
115178 uses : actions/setup-python@v2
116179 with :
117180 python-version : ${{ matrix.python-version }}
118- - name : Upgrade pip
119- run : pip install pip --upgrade
120- - name : Install CUDA
181+ - name : Install python-dev
182+ run : apt-get update && apt-get install -y python${{matrix.python-version}}-dev
183+ if : ${{matrix.python-version != '3.9-dev'}}
184+ - name : Install system dependencies
121185 run : |
122- export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${{matrix.CUDA}}_amd64.deb
123- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
124- sudo dpkg -i ${INSTALLER}
125- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
126- sudo apt-key add 7fa2af80.pub
127- sudo apt update -qq
128- sudo apt install -y cuda-${{matrix.CUDA_SHORT}} cuda-cufft-dev-${{matrix.CUDA_SHORT}}
129- sudo apt clean
130- export CUDA_HOME=/usr/local/cuda-${{matrix.CUDA_SHORT}}
131- export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
132- export PATH=${CUDA_HOME}/bin:${PATH}
133- sudo apt-get install -y ninja-build
186+ apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
187+ apt-get clean
188+ rm -rf /var/lib/apt/lists/*
189+ - name : Install Pillow
190+ run : python -m pip install Pillow==6.2.2
191+ if : ${{matrix.torchvision < 0.5}}
134192 - name : Install PyTorch
135- run : pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
193+ run : python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
194+ - name : Install dependencies for compiling onnx when python=3.9
195+ run : python -m pip install protobuf && apt-get update && apt-get -y install libprotobuf-dev protobuf-compiler cmake
196+ if : ${{matrix.python-version == '3.9-dev'}}
136197 - name : Install mmseg dependencies
137198 run : |
138- pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/${CUDA_SHORT/-/}/${{matrix.torch_version}}/index.html
139- pip install -r requirements.txt
199+ python -V
200+ python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/${{matrix.mmcv_link}}/index.html
201+ python -m pip install pycocotools
202+ python -m pip install -r requirements.txt
140203 python -c 'import mmcv; print(mmcv.__version__)'
141- - name : Install dependencies for compiling onnx when python=3.9
142- run : pip install protobuf && sudo apt-get install libprotobuf-dev protobuf-compiler
143- if : ${{matrix.python-version == '3.9'}}
144204 - name : Build and install
145- run : rm -rf .eggs && pip install -e .
205+ run : |
206+ rm -rf .eggs
207+ python setup.py check -m -s
208+ TORCH_CUDA_ARCH_LIST=7.0 pip install .
146209 - name : Run unittests and generate coverage report
147210 run : |
148211 coverage run --branch --source mmseg -m pytest tests/
149212 coverage xml
150213 coverage report -m
151- # Only upload coverage report for python3.7 && pytorch1.5
152214 - name : Upload coverage to Codecov
153- if : ${{matrix.torch == '1.5.0+cu101' && matrix.python-version == '3.7'}}
154- 215+ uses : codecov/codecov-action@v2
155216 with :
156- file : ./coverage.xml
217+ files : ./coverage.xml
157218 flags : unittests
158219 env_vars : OS,PYTHON
159220 name : codecov-umbrella
0 commit comments