config.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. version: 2.1
  2. jobs:
  3. build_cu102:
  4. machine:
  5. image: ubuntu-2004-cuda-11.4:202110-01
  6. docker_layer_caching: true
  7. resource_class: gpu.nvidia.small
  8. steps:
  9. - checkout
  10. - run:
  11. name: Configure Python
  12. command: |
  13. pyenv install 3.8.0
  14. pyenv global 3.8.0
  15. - run:
  16. name: Upgrade setuptools and pip
  17. command: python -m pip install --upgrade setuptools pip
  18. - run:
  19. name: Install PyTorch
  20. command: python -m pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
  21. - run:
  22. name: Build and install
  23. command: |
  24. rm -rf .eggs
  25. python setup.py check -m -s
  26. python -m pip install -e .
  27. - run:
  28. name: Install dependencies for unit tests
  29. command: |
  30. python -m pip install -r requirements/tests.txt
  31. - run:
  32. name: Run unittests and generate coverage report
  33. command: |
  34. python -m coverage run --branch --source mim -m pytest tests/
  35. python -m coverage xml
  36. python -m coverage report -m
  37. workflows:
  38. unit_tests:
  39. jobs:
  40. - hold:
  41. type: approval
  42. - build_cu102:
  43. requires:
  44. - hold