Skip to content

Commit 3ffb2a7

Browse files
authored
Build macOS wheel when updating version info (#2350)
* Build macos wheel on 2.x branch * remove env * fix python3.10 can not found error * fix python3.10 can not found error * comment config * trigger on push action
1 parent 791f70f commit 3ffb2a7

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

Diff for: .github/workflows/build_macos_wheel.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: build macos wheel
2+
3+
on: push
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build_macos10_wheel:
11+
runs-on: macos-10.15
12+
if: contains(github.event.head_commit.message, 'Bump version to')
13+
strategy:
14+
matrix:
15+
torch: [1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0]
16+
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
17+
include:
18+
- torch: 1.6.0
19+
torchvision: 0.7.0
20+
- torch: 1.7.0
21+
torchvision: 0.8.1
22+
- torch: 1.8.0
23+
torchvision: 0.9.0
24+
- torch: 1.9.0
25+
torchvision: 0.10.0
26+
- torch: 1.10.0
27+
torchvision: 0.11.0
28+
- torch: 1.11.0
29+
torchvision: 0.12.0
30+
- torch: 1.12.0
31+
torchvision: 0.13.0
32+
exclude:
33+
- torch: 1.6.0
34+
python-version: 3.9
35+
- torch: 1.6.0
36+
python-version: '3.10'
37+
- torch: 1.7.0
38+
python-version: 3.9
39+
- torch: 1.7.0
40+
python-version: '3.10'
41+
- torch: 1.8.0
42+
python-version: '3.10'
43+
- torch: 1.9.0
44+
python-version: '3.10'
45+
- torch: 1.10.0
46+
python-version: '3.10'
47+
- torch: 1.11.0
48+
python-version: 3.6
49+
- torch: 1.12.0
50+
python-version: 3.6
51+
steps:
52+
- uses: actions/checkout@v2
53+
- name: Set up Python
54+
uses: actions/setup-python@v2
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
- name: Install psutil
58+
run: pip install psutil
59+
- name: Install PyTorch
60+
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} --no-cache-dir
61+
- name: Build and install
62+
run: |
63+
pip install wheel
64+
python setup.py bdist_wheel
65+
- uses: actions/upload-artifact@v3
66+
with:
67+
name: ${{matrix.torch}}
68+
path: dist/

0 commit comments

Comments
 (0)