@@ -26,13 +26,15 @@ jobs:
2626 echo $PATH
2727 . ~/miniconda3/etc/profile.d/conda.sh
2828 set -ex
29- export BUILD_VERSION=0.14.0.dev$(date "+%Y%m%d")
29+ . packaging/pkg_helpers.bash
30+ setup_build_version
3031 WHL_NAME=torchaudio-${BUILD_VERSION}-cp${PY_VERS/.}-cp${PY_VERS/.}-macosx_11_0_arm64.whl
31- conda create -yp ${ENV_NAME} python=${PY_VERS} numpy cmake ninja libpng openjpeg wheel pkg-config
32- conda run -p ${ENV_NAME} python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly
32+ conda create -yp ${ENV_NAME} python=${PY_VERS} numpy cmake ninja wheel pkg-config
33+ conda run -p ${ENV_NAME} python3 -mpip install torch --pre -- extra-index-url=https://download.pytorch.org/whl/nightly
3334 conda run -p ${ENV_NAME} python3 -mpip install delocate
3435 conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
35- conda run -p ${ENV_NAME} delocate-wheel -v --ignore-missing-dependencies dist/${WHL_NAME}
36+ export PYTORCH_VERSION="$(conda run -p ${ENV_NAME} python3 -mpip show torch | grep ^Version: | sed 's/Version: *//')"
37+ conda run -p ${ENV_NAME} DYLD_FALLBACK_LIBRARY_PATH="${ENV_NAME}/lib" delocate-wheel -v --ignore-missing-dependencies dist/${WHL_NAME}
3638 conda env remove -p ${ENV_NAME}
3739 - name : Test wheel
3840 shell : arch -arch arm64 bash {0}
@@ -43,18 +45,20 @@ jobs:
4345 . ~/miniconda3/etc/profile.d/conda.sh
4446 set -ex
4547 conda create -yp ${ENV_NAME} python=${PY_VERS} numpy
46- conda run -p ${ENV_NAME} python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly
48+ conda run -p ${ENV_NAME} python3 -mpip install torch --pre -- extra-index-url=https://download.pytorch.org/whl/nightly
4749 conda run -p ${ENV_NAME} python3 -mpip install dist/*.whl
4850 # Test torch is importable, by changing cwd and running import commands
4951 conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torchaudio;print('torchaudio version is ', torchaudio.__version__)"
5052 conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torch;import torchaudio;torchaudio.set_audio_backend('sox_io')"
5153 conda env remove -p ${ENV_NAME}
5254 - name : Upload wheel to GitHub
55+ if : ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
5356 uses : actions/upload-artifact@v3
5457 with :
5558 name : torchaudio-py${{ matrix.py_vers }}-macos11-m1
5659 path : dist/
5760 - name : Upload wheel to S3
61+ if : ${{ github.event_name == 'push' && steps.extract_branch.outputs.branch == 'nightly' }}
5862 shell : arch -arch arm64 bash {0}
5963 env :
6064 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
0 commit comments