diff --git a/.github/workflows/build-m1-binaries.yml b/.github/workflows/build-m1-binaries.yml index 6b93c17968d..094bf3e6be9 100644 --- a/.github/workflows/build-m1-binaries.yml +++ b/.github/workflows/build-m1-binaries.yml @@ -7,6 +7,7 @@ on: branches: - nightly - main + - release/* tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds # Release candidate tags look like: v1.11.0-rc1 @@ -31,6 +32,10 @@ jobs: if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then echo "CHANNEL=test" >> "$GITHUB_ENV" fi + - name: Set Release CHANNEL (for release) + if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }} + run: | + echo "CHANNEL=test" >> "$GITHUB_ENV" - name: Build TorchVision M1 wheel shell: arch -arch arm64 bash {0} env: @@ -104,6 +109,10 @@ jobs: if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then echo "CHANNEL=test" >> "$GITHUB_ENV" fi + - name: Set CHANNEL Release (for release) + if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }} + run: | + echo "CHANNEL=test" >> "$GITHUB_ENV" - name: Install conda-build and purge previous artifacts shell: arch -arch arm64 bash {0} run: | diff --git a/.github/workflows/test-m1.yml b/.github/workflows/test-m1.yml index ed35d9325a3..308d06f3035 100644 --- a/.github/workflows/test-m1.yml +++ b/.github/workflows/test-m1.yml @@ -7,7 +7,10 @@ on: branches: - nightly - main + - release/* workflow_dispatch: +env: + CHANNEL: "nightly" jobs: tests: name: "Unit-tests on M1" @@ -19,6 +22,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Set Release CHANNEL (for release) + if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }} + run: | + echo "CHANNEL=test" >> "$GITHUB_ENV" - name: Install TorchVision shell: arch -arch arm64 bash {0} env: @@ -30,7 +37,7 @@ jobs: export PATH=~/miniconda3/bin:$PATH set -ex conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy - conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/nightly + conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL} conda run -p ${ENV_NAME} python3 setup.py develop conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av - name: Run tests