Skip to content

ci: Update macos runners to AWS self hosted #2556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/build-m1-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
jobs:
build_wheels:
name: "Build TorchAudio M1 wheels"
runs-on: macos-m1-11
runs-on: macos-m1-12
strategy:
matrix:
py_vers: [ "3.8", "3.9", "3.10" ]
Expand All @@ -44,6 +44,8 @@ jobs:
USE_FFMPEG: true
USE_OPENMP: false
USE_CUDA: false
# Needed so that delocate puts files in places it can actually modify
TMPDIR: ${{ runner.temp }}
run: |
echo $PATH
. ~/miniconda3/etc/profile.d/conda.sh
Expand All @@ -59,13 +61,12 @@ jobs:
export SOURCE_ROOT_DIR=$(pwd)
export FFMPEG_ROOT="${SOURCE_ROOT_DIR}/third_party/ffmpeg"
. packaging/ffmpeg/build.sh
WHL_NAME=torchaudio-${BUILD_VERSION}-cp${PY_VERS/.}-cp${PY_VERS/.}-macosx_11_0_arm64.whl
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy cmake ninja wheel pkg-config
conda run -p ${ENV_NAME} python3 -mpip install torch --pre --extra-index-url=https://download.pytorch.org/whl/${CHANNEL}
conda run -p ${ENV_NAME} python3 -mpip install delocate
conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
export PYTORCH_VERSION="$(conda run -p ${ENV_NAME} python3 -mpip show torch | grep ^Version: | sed 's/Version: *//')"
conda run -p ${ENV_NAME} DYLD_FALLBACK_LIBRARY_PATH="${ENV_NAME}/lib" delocate-wheel -v --ignore-missing-dependencies dist/${WHL_NAME}
conda run -p ${ENV_NAME} DYLD_FALLBACK_LIBRARY_PATH="${ENV_NAME}/lib" delocate-wheel -v --ignore-missing-dependencies dist/*.whl
conda env remove -p ${ENV_NAME}
- name: Test wheel
shell: arch -arch arm64 bash {0}
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:
done
build_conda:
name: "Build TorchAudio M1 conda packages"
runs-on: macos-m1-11
runs-on: macos-m1-12
strategy:
matrix:
py_vers: [ "3.8", "3.9", "3.10" ]
Expand Down Expand Up @@ -156,9 +157,13 @@ jobs:
setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint
conda build -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchaudio
mkdir -p dist
cp ~/miniconda3/conda-bld/osx-arm64/*.tar.bz2 dist/
conda build \
-c defaults \
$CONDA_CHANNEL_FLAGS \
--no-anaconda-upload \
--python "$PYTHON_VERSION" \
--output-folder=dist/ \
packaging/torchaudio
- name: Upload package to GitHub
uses: actions/upload-artifact@v3
with:
Expand All @@ -174,3 +179,7 @@ jobs:
conda install -yq anaconda-client
set -x
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/miniconda3/conda-bld/osx-arm64/*.tar.bz2 -u "pytorch-${CHANNEL}" --label main --no-progress --force

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ setup_conda_pytorch_constraint() {
CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS}"
if [[ -z "$PYTORCH_VERSION" ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly"
export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | python -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | python3 -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
else
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-test -c pytorch-nightly"
fi
Expand Down