Compare commits

...

5 Commits

@ -15,10 +15,10 @@ jobs:
name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }} name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macOS-latest] os: [ubuntu-latest]
python: ['3.9'] python: ['3.10']
torch: ['1.10.0'] torch: ['1.13.0']
torchvision: ['0.11.1'] torchvision: ['0.14.0']
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@ -34,6 +34,9 @@ jobs:
- name: Install torch on mac - name: Install torch on mac
if: startsWith(matrix.os, 'macOS') if: startsWith(matrix.os, 'macOS')
run: pip install --no-cache-dir torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }} run: pip install --no-cache-dir torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }}
- name: Install torch on Windows
if: startsWith(matrix.os, 'windows')
run: pip install --no-cache-dir torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }}
- name: Install torch on ubuntu - name: Install torch on ubuntu
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: | run: |
@ -42,11 +45,18 @@ jobs:
sudo apt install -y google-perftools sudo apt install -y google-perftools
- name: Install requirements - name: Install requirements
run: | run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install -r requirements.txt
pip install --no-cache-dir git+https://github.com/mapillary/inplace_abn.git@v1.1.0 pip install --no-cache-dir git+https://github.com/mapillary/inplace_abn.git
- name: Run tests - name: Run tests on Windows
if: startsWith(matrix.os, 'windows')
env:
PYTHONDONTWRITEBYTECODE: 1
run: |
pytest -vv tests
- name: Run tests on Linux / Mac
if: ${{ !startsWith(matrix.os, 'windows') }}
env: env:
LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4
PYTHONDONTWRITEBYTECODE: 1
run: | run: |
export PYTHONDONTWRITEBYTECODE=1 pytest -vv --forked --durations=0 tests
pytest -vv --forked --durations=0 ./tests

Loading…
Cancel
Save