Skip to content

Commit

Permalink
add multiple version
Browse files Browse the repository at this point in the history
  • Loading branch information
liukai committed Sep 13, 2022
1 parent 4218418 commit 25bce2e
Showing 1 changed file with 53 additions and 4 deletions.
57 changes: 53 additions & 4 deletions .github/workflows/pr_stage_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,63 @@ concurrency:
cancel-in-progress: true

jobs:
build_cpu:
build_cpu_min:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.7]
python-version: [3.6.9]
include:
- torch: 1.6.0
torchvision: 0.7.1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install MMCV
run: |
pip install -U openmim
mim install 'mmcv >= 2.0.0rc1'
- name: Install MMCls
run: pip install git+https://github.com/open-mmlab/[email protected]
- name: Install MMDet
run: pip install git+https://github.com/open-mmlab/[email protected]
- name: Install MMSeg
run: pip install git+https://github.com/open-mmlab/[email protected]
- name: Install other dependencies
run: pip install -r requirements.txt
- name: Build and install
run: rm -rf .eggs && pip install -e .
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmrazor -m pytest tests/
coverage xml
coverage report -m
# Upload coverage report for python3.7 && pytorch1.8.1 cpu
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false

build_cpu_max:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.9.0]
include:
- torch: 1.8.1
torchvision: 0.9.1
- torch: 1.12.1
torchvision: 0.13.1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down

0 comments on commit 25bce2e

Please sign in to comment.