From e8ddc6865c2c74871e6953e8d42873829768ba14 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sat, 26 Nov 2022 19:46:55 -0800 Subject: [PATCH] Update torch to 1.13 and python to 3.10 in test workflow (#1562) * Update torch and python version in test workflow * Python back to 3.9 for test workflow, see if that's the cause of macos failure.. * Try windows runner * Try Python 3.10 + macOS-12 in quest for working second target * Remove macOS from tests, not working anymore --- .github/workflows/tests.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f85aff42..5690c88c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,10 +15,10 @@ jobs: name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }} strategy: matrix: - os: [ubuntu-latest, macOS-latest] - python: ['3.9'] - torch: ['1.10.0'] - torchvision: ['0.11.1'] + os: [ubuntu-latest] + python: ['3.10'] + torch: ['1.13.0'] + torchvision: ['0.14.0'] runs-on: ${{ matrix.os }} steps: @@ -34,6 +34,9 @@ jobs: - name: Install torch on mac if: startsWith(matrix.os, 'macOS') 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 if: startsWith(matrix.os, 'ubuntu') run: | @@ -42,11 +45,18 @@ jobs: sudo apt install -y google-perftools - name: Install requirements run: | - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - pip install --no-cache-dir git+https://github.com/mapillary/inplace_abn.git@v1.1.0 - - name: Run tests + pip install -r requirements.txt + pip install --no-cache-dir git+https://github.com/mapillary/inplace_abn.git + - 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: LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 + PYTHONDONTWRITEBYTECODE: 1 run: | - export PYTHONDONTWRITEBYTECODE=1 - pytest -vv --forked --durations=0 ./tests + pytest -vv --forked --durations=0 tests