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 66 push :
77 branches :
88 - nightly
9+ - main
910 workflow_dispatch :
1011jobs :
1112 build_wheels :
3031 . packaging/pkg_helpers.bash
3132 setup_build_version
3233 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
3435 conda run -p ${ENV_NAME} python3 -mpip install torch --pre --extra-index-url=https://download.pytorch.org/whl/nightly
3536 conda run -p ${ENV_NAME} python3 -mpip install delocate
3637 conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
@@ -54,11 +55,13 @@ jobs:
5455 conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torchvision;print(torchvision.io.read_image('${PWD}/gallery/assets/dog1.jpg').shape)"
5556 conda env remove -p ${ENV_NAME}
5657 - name : Upload wheel to GitHub
58+ if : ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
5759 uses : actions/upload-artifact@v3
5860 with :
5961 name : torchvision-py${{ matrix.py_vers }}-macos11-m1
6062 path : dist/
6163 - name : Upload wheel to S3
64+ if : ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
6265 shell : arch -arch arm64 bash {0}
6366 env :
6467 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