File tree Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 6
6
push :
7
7
branches :
8
8
- nightly
9
+ - main
9
10
workflow_dispatch :
10
11
jobs :
11
12
build_wheels :
30
31
. packaging/pkg_helpers.bash
31
32
setup_build_version
32
33
WHL_NAME=torchvision-${BUILD_VERSION}-cp${PY_VERS/.}-cp${PY_VERS/.}-macosx_11_0_arm64.whl
33
- conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng " jpeg<=9b" wheel pkg-config
34
+ conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg wheel pkg-config
34
35
conda run -p ${ENV_NAME} python3 -mpip install torch --pre --extra-index-url=https://download.pytorch.org/whl/nightly
35
36
conda run -p ${ENV_NAME} python3 -mpip install delocate
36
37
conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
@@ -54,11 +55,13 @@ jobs:
54
55
conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torchvision;print(torchvision.io.read_image('${PWD}/gallery/assets/dog1.jpg').shape)"
55
56
conda env remove -p ${ENV_NAME}
56
57
- name : Upload wheel to GitHub
58
+ if : ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
57
59
uses : actions/upload-artifact@v3
58
60
with :
59
61
name : torchvision-py${{ matrix.py_vers }}-macos11-m1
60
62
path : dist/
61
63
- name : Upload wheel to S3
64
+ if : ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
62
65
shell : arch -arch arm64 bash {0}
63
66
env :
64
67
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
Original file line number Diff line number Diff line change
1
+ name : Unit-tests on M1
2
+ on :
3
+ pull_request :
4
+ paths :
5
+ - .github/workflows/test-m1.yml
6
+ push :
7
+ branches :
8
+ - nightly
9
+ - main
10
+ workflow_dispatch :
11
+ jobs :
12
+ tests :
13
+ name : " Unit-tests on M1"
14
+ runs-on : macos-m1
15
+ strategy :
16
+ matrix :
17
+ py_vers : [ "3.8"]
18
+
19
+ steps :
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v2
22
+ - name : Install TorchVision
23
+ shell : arch -arch arm64 bash {0}
24
+ env :
25
+ ENV_NAME : conda-env-${{ github.run_id }}
26
+ PY_VERS : ${{ matrix.py_vers }}
27
+ run : |
28
+ . ~/miniconda3/etc/profile.d/conda.sh
29
+ # Needed for JPEG library detection as setup.py detects conda presence by running `shlex.which('conda')`
30
+ export PATH=~/miniconda3/bin:$PATH
31
+ set -ex
32
+ conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy
33
+ conda run -p ${ENV_NAME} python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly
34
+ conda run -p ${ENV_NAME} python3 setup.py develop
35
+ conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av
36
+ - name : Run tests
37
+ shell : arch -arch arm64 bash {0}
38
+ env :
39
+ ENV_NAME : conda-env-${{ github.run_id }}
40
+ PY_VERS : ${{ matrix.py_vers }}
41
+ run : |
42
+ . ~/miniconda3/etc/profile.d/conda.sh
43
+ set -ex
44
+ conda run -p ${ENV_NAME} --no-capture-output python3 -u -mpytest -v --tb=long --durations 20
45
+ conda env remove -p ${ENV_NAME}
You can’t perform that action at this time.
0 commit comments