Skip to content

Commit

Permalink
[CI] Fix CI (#2029)
Browse files Browse the repository at this point in the history
* [CI] Fix CI

* fix wrong command

* remove mmcv

* fix lint error

* add pytorch install

* fix pytorch installation

* fix mmengine error

* fix mmcv installation in pr_stage

* fix docstring coverage in lint and delete cu102 in pr_stage windows

* fix lint.yml and reset test.yml

* ignore some ut in build_windows of pr_stage

* test merge stage test

* fix mmseg dependencies in pr_stage_test.yml

* delete redundant lines in pr_stage and fix mmseg dependencies in mr_stage

* fix error in merge_stage

* delete python -m in merge_stage

* fix error in merge_stage

* let mmcv installation before mmengine

* fix error of mmcv not found

* fix ut error in merge)stage_test.yml

* fix build_windows ut in metge_stage

* fix error

* fix windows error of merge_stag

* Update .github/workflows/merge_stage_test.yml

* Update .github/workflows/merge_stage_test.yml

* Update .github/workflows/merge_stage_test.yml

* fix error

* delete skip timm ut

* add requitements/optinal.txt in test.yml

* Update .github/workflows/merge_stage_test.yml

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
  • Loading branch information
MengzhangLI and MeowZheng committed Sep 13, 2022
1 parent 60f0415 commit 8aca73e
Show file tree
Hide file tree
Showing 6 changed files with 365 additions and 295 deletions.
55 changes: 24 additions & 31 deletions .circleci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:
type: string
torchvision:
type: string
mmcv:
type: string
docker:
- image: cimg/python:<< parameters.python >>
resource_class: large
Expand All @@ -51,31 +49,32 @@ jobs:
- run:
name: Configure Python & pip
command: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install --upgrade pip
pip install wheel
- run:
name: Install PyTorch
command: |
python -V
python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
- run:
name: Install mmseg dependencies
command: |
python -m pip install git+ssh://git@github.com/open-mmlab/mmengine.git@main
python -m pip install << parameters.mmcv >>
python -m pip install git+ssh://git@github.com/open-mmlab/mmclassification@dev-1.x
python -m pip install -r requirements.txt
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
mim install 'mmcv >= 2.0.0rc1'
pip install git+https://github.com/open-mmlab/mmclassification@dev-1.x
pip install -r requirements/tests.txt -r requirements/optional.txt
- run:
name: Build and install
command: |
python -m pip install -e .
pip install -e .
- run:
name: Run unittests
command: |
python -m pip install timm
python -m coverage run --branch --source mmseg -m pytest tests/
python -m coverage xml
python -m coverage report -m
pip install timm
coverage run --branch --source mmseg -m pytest tests/
coverage xml
coverage report -m
- run:
name: Skip timm unittests and generate coverage report
command: |
Expand All @@ -92,8 +91,6 @@ jobs:
cudnn:
type: integer
default: 7
mmcv:
type: string
machine:
image: ubuntu-2004-cuda-11.4:202110-01
# docker_layer_caching: true
Expand All @@ -104,8 +101,8 @@ jobs:
# Cloning repos in VM since Docker doesn't have access to the private key
name: Clone Repos
command: |
git clone -b main --depth 1 ssh://git@github.com/open-mmlab/mmengine.git /home/circleci/mmengine
git clone -b dev-1.x --depth 1 ssh://git@github.com/open-mmlab/mmclassification.git /home/circleci/mmclassification
git clone -b main --depth 1 https://github.com/open-mmlab/mmengine.git /home/circleci/mmengine
git clone -b dev-1.x --depth 1 https://github.com/open-mmlab/mmclassification.git /home/circleci/mmclassification
- run:
name: Build Docker image
command: |
Expand All @@ -115,18 +112,19 @@ jobs:
name: Install mmseg dependencies
command: |
docker exec mmseg pip install -e /mmengine
docker exec mmseg pip install << parameters.mmcv >>
docker exec mmseg pip install -U openmim
docker exec mmseg mim install 'mmcv >= 2.0.0rc1'
docker exec mmseg pip install -e /mmclassification
docker exec mmseg python -m pip install -r requirements.txt
docker exec mmseg pip install -r requirements/tests.txt -r requirements/optional.txt
- run:
name: Build and install
command: |
docker exec mmseg pip install -e .
- run:
name: Run unittests
command: |
docker exec mmseg python -m pip install timm
docker exec mmseg python -m pytest tests/
docker exec mmseg pip install timm
docker exec mmseg pytest tests/
workflows:
pr_stage_lint:
when: << pipeline.parameters.lint_only >>
Expand All @@ -137,7 +135,7 @@ workflows:
branches:
ignore:
- dev-1.x
- test-1.x
- 1.x
pr_stage_test:
when:
not:
Expand All @@ -149,21 +147,19 @@ workflows:
branches:
ignore:
- dev-1.x
- test-1.x
- 1.x
- build_cpu:
name: minimum_version_cpu
torch: 1.6.0
torchvision: 0.7.0
python: 3.6.9 # The lowest python 3.6.x version available on CircleCI images
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cpu/torch1.6.0/mmcv_full-2.0.0rc0-cp36-cp36m-manylinux1_x86_64.whl
requires:
- lint
- build_cpu:
name: maximum_version_cpu
torch: 1.9.0
torchvision: 0.10.0
torch: 1.12.1
torchvision: 0.13.1
python: 3.9.0
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cpu/torch1.9.0/mmcv_full-2.0.0rc0-cp39-cp39-manylinux1_x86_64.whl
requires:
- minimum_version_cpu
- hold:
Expand All @@ -176,7 +172,6 @@ workflows:
# Use double quotation mark to explicitly specify its type
# as string instead of number
cuda: "10.2"
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cu102/torch1.8.0/mmcv_full-2.0.0rc0-cp37-cp37m-manylinux1_x86_64.whl
requires:
- hold
merge_stage_test:
Expand All @@ -189,10 +184,8 @@ workflows:
torch: 1.6.0
# Use double quotation mark to explicitly specify its type
# as string instead of number
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cu101/torch1.6.0/mmcv_full-2.0.0rc0-cp37-cp37m-manylinux1_x86_64.whl
cuda: "10.1"
filters:
branches:
only:
- dev-1.x
- test-1.x
Loading

0 comments on commit 8aca73e

Please sign in to comment.