17
17
jobs :
18
18
build_wheels :
19
19
name : " Build TorchAudio M1 wheels"
20
- runs-on : macos-m1-11
20
+ runs-on : macos-m1-12
21
21
strategy :
22
22
matrix :
23
23
py_vers : [ "3.8", "3.9", "3.10" ]
44
44
USE_FFMPEG : true
45
45
USE_OPENMP : false
46
46
USE_CUDA : false
47
+ # Needed so that delocate puts files in places it can actually modify
48
+ TMPDIR : ${{ runner.temp }}
47
49
run : |
48
50
echo $PATH
49
51
. ~/miniconda3/etc/profile.d/conda.sh
@@ -59,13 +61,12 @@ jobs:
59
61
export SOURCE_ROOT_DIR=$(pwd)
60
62
export FFMPEG_ROOT="${SOURCE_ROOT_DIR}/third_party/ffmpeg"
61
63
. packaging/ffmpeg/build.sh
62
- WHL_NAME=torchaudio-${BUILD_VERSION}-cp${PY_VERS/.}-cp${PY_VERS/.}-macosx_11_0_arm64.whl
63
64
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy cmake ninja wheel pkg-config
64
65
conda run -p ${ENV_NAME} python3 -mpip install torch --pre --extra-index-url=https://download.pytorch.org/whl/${CHANNEL}
65
66
conda run -p ${ENV_NAME} python3 -mpip install delocate
66
67
conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
67
68
export PYTORCH_VERSION="$(conda run -p ${ENV_NAME} python3 -mpip show torch | grep ^Version: | sed 's/Version: *//')"
68
- conda run -p ${ENV_NAME} DYLD_FALLBACK_LIBRARY_PATH="${ENV_NAME}/lib" delocate-wheel -v --ignore-missing-dependencies dist/${WHL_NAME}
69
+ conda run -p ${ENV_NAME} DYLD_FALLBACK_LIBRARY_PATH="${ENV_NAME}/lib" delocate-wheel -v --ignore-missing-dependencies dist/*.whl
69
70
conda env remove -p ${ENV_NAME}
70
71
- name : Test wheel
71
72
shell : arch -arch arm64 bash {0}
99
100
done
100
101
build_conda :
101
102
name : " Build TorchAudio M1 conda packages"
102
- runs-on : macos-m1-11
103
+ runs-on : macos-m1-12
103
104
strategy :
104
105
matrix :
105
106
py_vers : [ "3.8", "3.9", "3.10" ]
@@ -156,9 +157,13 @@ jobs:
156
157
setup_conda_pytorch_constraint
157
158
setup_conda_cudatoolkit_constraint
158
159
setup_visual_studio_constraint
159
- conda build -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchaudio
160
- mkdir -p dist
161
- cp ~/miniconda3/conda-bld/osx-arm64/*.tar.bz2 dist/
160
+ conda build \
161
+ -c defaults \
162
+ $CONDA_CHANNEL_FLAGS \
163
+ --no-anaconda-upload \
164
+ --python "$PYTHON_VERSION" \
165
+ --output-folder=dist/ \
166
+ packaging/torchaudio
162
167
- name : Upload package to GitHub
163
168
uses : actions/upload-artifact@v3
164
169
with :
@@ -174,3 +179,7 @@ jobs:
174
179
conda install -yq anaconda-client
175
180
set -x
176
181
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/miniconda3/conda-bld/osx-arm64/*.tar.bz2 -u "pytorch-${CHANNEL}" --label main --no-progress --force
182
+
183
+ concurrency :
184
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
185
+ cancel-in-progress : true
0 commit comments