mirror of https://github.com/open-mmlab/mmcv.git
Add macos building in github action (#387)
* add macos in github action * fix a package name * minor fix * fix typo * ignore progressbar testing * ignore timer testing * fix pytest configs * try fixpull/388/head
parent
b18a33833e
commit
b2b42cbd95
|
@ -3,13 +3,12 @@ name: build
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install linting dependencies
|
- name: Install linting dependencies
|
||||||
|
@ -41,7 +40,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
|
@ -85,7 +84,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install CUDA
|
- name: Install CUDA
|
||||||
|
@ -142,7 +141,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
|
@ -161,3 +160,37 @@ jobs:
|
||||||
coverage run --branch --source=mmcv -m pytest tests/
|
coverage run --branch --source=mmcv -m pytest tests/
|
||||||
coverage xml
|
coverage xml
|
||||||
coverage report -m
|
coverage report -m
|
||||||
|
|
||||||
|
build_macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
torch: [1.5.0, 1.3.0]
|
||||||
|
include:
|
||||||
|
- torch: 1.3.0
|
||||||
|
torchvision: 0.4.2
|
||||||
|
- torch: 1.5.0
|
||||||
|
torchvision: 0.6.0
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python 3.7
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: brew install ffmpeg jpeg-turbo
|
||||||
|
- name: Install unittest dependencies
|
||||||
|
run: pip install pytest coverage lmdb PyTurboJPEG
|
||||||
|
- name: Build and install
|
||||||
|
run: |
|
||||||
|
rm -rf .eggs
|
||||||
|
CC=clang CXX=clang++ CFLAGS='-stdlib=libc++' pip install -e .
|
||||||
|
- name: Install Pillow
|
||||||
|
run: pip install Pillow==6.2.2
|
||||||
|
if: ${{matrix.torchvision == '0.4.2'}}
|
||||||
|
- name: Install PyTorch
|
||||||
|
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
||||||
|
- name: Run unittests
|
||||||
|
run: |
|
||||||
|
# The timing on macos VMs is not precise, so we skip the progressbar tests
|
||||||
|
pytest tests/ --ignore tests/test_progressbar.py --ignore tests/test_timer.py
|
||||||
|
|
Loading…
Reference in New Issue