-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liukai
committed
Sep 13, 2022
1 parent
4218418
commit 25bce2e
Showing
1 changed file
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|