Skip to content

Commit f602d6a

Browse files
committed
[WIP] Add Build-on-M1 workflow
1 parent 6274080 commit f602d6a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build-on-m1.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build on M1
2+
on:
3+
pull_request
4+
jobs:
5+
build_vision:
6+
runs-on: macos-m1
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v2
10+
- name: Build TorchVision M1 wheel
11+
shell: arch -arch arm64 bash {0}
12+
run: |
13+
echo $PATH
14+
. ~/miniconda3/etc/profile.d/conda.sh
15+
set -ex
16+
conda create -yp conda-env python=3.8 numpy libpng openjpeg wheel pkg-config
17+
conda run -p ./conda-env python3 -c "import os;print(os.__file__)"
18+
conda env list
19+
conda run -p conda-env python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly torch
20+
conda run -p conda-env python3 -mpip install delocate
21+
conda run -p conda-env python3 setup.py bdist_wheel
22+
- name: Upload TorchVision wheel
23+
uses: actions/upload-artifact@v3
24+
with:
25+
name: torchvision-py3.8-macos11-m1
26+
path: dist/
27+

0 commit comments

Comments
 (0)