Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][CI] Update github ci #77

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 86 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,114 @@

name: build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'README.md'
- 'README_zh-CN.md'
- 'model-index.yml'
- 'configs/**'
- 'docs/**'
- '.dev_scripts/**'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
pull_request:
paths-ignore:
- 'README.md'
- 'README_zh-CN.md'
- 'model-index.yml'
- 'configs/**'
- 'docs/**'
- '.dev_scripts/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

build:
runs-on: ubuntu-latest
env:
UBUNTU_VERSION: ubuntu1804
jobs:
build_cpu:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
python-version: [3.7]
torch: [1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0]
torch: [1.5.1, 1.6.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.10.0, 1.10.1, 1.10.2]
experimental: [true]
include:
- torch: 1.5.0
torchvision: 0.6.0
- torch: 1.5.1
torchvision: 0.6.1
torch_version: 1.5
- torch: 1.6.0
torchvision: 0.7.0
- torch: 1.7.0
torchvision: 0.8.1
torch_version: 1.6
- torch: 1.7.1
torchvision: 0.8.2
torch_version: 1.7
- torch: 1.8.0
torchvision: 0.9.0
torch_version: 1.8
- torch: 1.8.0
torchvision: 0.9.0
torch_version: 1.8
python-version: 3.8
- torch: 1.8.0
torchvision: 0.9.0
torch_version: 1.8
python-version: 3.9
- torch: 1.8.1
torchvision: 0.9.1
torch_version: 1.8
- torch: 1.8.1
torchvision: 0.9.1
torch_version: 1.8
python-version: 3.8
- torch: 1.8.1
torchvision: 0.9.1
torch_version: 1.8
python-version: 3.9
- torch: 1.9.0
torchvision: 0.10.0
torch_version: 1.9
- torch: 1.9.0
torchvision: 0.10.0
torch_version: 1.9
python-version: 3.8
- torch: 1.9.0
torchvision: 0.10.0
torch_version: 1.9
python-version: 3.9
- torch: 1.10.0
torchvision: 0.11.1
torch_version: 1.10
- torch: 1.10.0
torchvision: 0.11.1
torch_version: 1.10
python-version: 3.8
- torch: 1.10.0
torchvision: 0.11.1
torch_version: 1.10
python-version: 3.9
- torch: 1.10.1
torchvision: 0.11.2
torch_version: 1.10
- torch: 1.10.1
torchvision: 0.11.2
torch_version: 1.10
python-version: 3.8
- torch: 1.10.1
torchvision: 0.11.2
torch_version: 1.10
python-version: 3.9
- torch: 1.10.2
torchvision: 0.11.3
torch_version: 1.10
- torch: 1.10.2
torchvision: 0.11.3
torch_version: 1.10
python-version: 3.8
- torch: 1.10.2
torchvision: 0.11.3
torch_version: 1.10
python-version: 3.9

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -63,10 +121,10 @@ jobs:
run: pip install Pillow==6.2.2
if: ${{matrix.torchvision < 0.5}}
- name: Install PyTorch
run: pip install --use-deprecated=legacy-resolver torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Install MMCV
run: |
pip install --use-deprecated=legacy-resolver mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch_version}}/index.html
python -c 'import mmcv; print(mmcv.__version__)'
- name: Install mmcls dependencies
run: |
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: lint

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmrazor