mirror of https://github.com/open-mmlab/mim.git
add circleci (#131)
* add circleci * trigger ci * configure python * change py3.7 to py3.8 * install py3.8 first * fix typopull/137/head
parent
03f9261df6
commit
3276085565
|
@ -0,0 +1,44 @@
|
|||
version: 2.1
|
||||
jobs:
|
||||
build_cu102:
|
||||
machine:
|
||||
image: ubuntu-2004-cuda-11.4:202110-01
|
||||
docker_layer_caching: true
|
||||
resource_class: gpu.nvidia.small
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Configure Python
|
||||
command: |
|
||||
pyenv install 3.8.0
|
||||
pyenv global 3.8.0
|
||||
- run:
|
||||
name: Upgrade setuptools and pip
|
||||
command: python -m pip install --upgrade setuptools pip
|
||||
- run:
|
||||
name: Install PyTorch
|
||||
command: python -m pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
|
||||
- run:
|
||||
name: Build and install
|
||||
command: |
|
||||
rm -rf .eggs
|
||||
python setup.py check -m -s
|
||||
python -m pip install -e .
|
||||
- run:
|
||||
name: Install dependencies for unit tests
|
||||
command: |
|
||||
python -m pip install -r requirements/tests.txt
|
||||
- run:
|
||||
name: Run unittests and generate coverage report
|
||||
command: |
|
||||
python -m coverage run --branch --source mim -m pytest tests/
|
||||
python -m coverage xml
|
||||
python -m coverage report -m
|
||||
workflows:
|
||||
unit_tests:
|
||||
jobs:
|
||||
- hold:
|
||||
type: approval
|
||||
- build_cu102:
|
||||
requires:
|
||||
- hold
|
Loading…
Reference in New Issue