Skip to content

Commit eed7224

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] consolidate test workflows (#7574)
Reviewed By: vmoens Differential Revision: D45903807 fbshipit-source-id: 7a451e746728a17e973a9de3e9d0672cf9514eb9
1 parent 9b744f7 commit eed7224

File tree

3 files changed

+63
-85
lines changed

3 files changed

+63
-85
lines changed

.github/workflows/test-macos.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/test-windows.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/test-linux.yml renamed to .github/workflows/tests.yml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests on Linux
1+
name: Tests
22

33
on:
44
pull_request:
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
unittests:
13+
unittests-linux:
1414
strategy:
1515
matrix:
1616
python-version:
@@ -41,6 +41,67 @@ jobs:
4141
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
4242
4343
./.github/scripts/unittest.sh
44+
45+
unittests-macos:
46+
strategy:
47+
matrix:
48+
python-version:
49+
- "3.8"
50+
- "3.9"
51+
- "3.10"
52+
- "3.11"
53+
runner: ["macos-12"]
54+
include:
55+
- python-version: "3.8"
56+
runner: macos-m1-12
57+
fail-fast: false
58+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
59+
with:
60+
repository: pytorch/vision
61+
# We need an increased timeout here, since the macos-12 runner is the free one from GH
62+
# and needs roughly 2 hours to just run the test suite
63+
timeout: 240
64+
runner: ${{ matrix.runner }}
65+
script: |
66+
set -euo pipefail
67+
68+
export PYTHON_VERSION=${{ matrix.python-version }}
69+
export GPU_ARCH_TYPE=cpu
70+
export GPU_ARCH_VERSION=''
71+
72+
./.github/scripts/unittest.sh
73+
74+
unittests-windows:
75+
strategy:
76+
matrix:
77+
python-version:
78+
- "3.8"
79+
- "3.9"
80+
- "3.10"
81+
- "3.11"
82+
runner: ["windows.4xlarge"]
83+
gpu-arch-type: ["cpu"]
84+
include:
85+
- python-version: "3.8"
86+
runner: windows.g5.4xlarge.nvidia.gpu
87+
gpu-arch-type: cuda
88+
gpu-arch-version: "11.7"
89+
fail-fast: false
90+
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
91+
with:
92+
repository: pytorch/vision
93+
runner: ${{ matrix.runner }}
94+
gpu-arch-type: ${{ matrix.gpu-arch-type }}
95+
gpu-arch-version: ${{ matrix.gpu-arch-version }}
96+
timeout: 120
97+
script: |
98+
set -euxo pipefail
99+
100+
export PYTHON_VERSION=${{ matrix.python-version }}
101+
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
102+
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
103+
104+
./.github/scripts/unittest.sh
44105
45106
onnx:
46107
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main

0 commit comments

Comments
 (0)