Skip to content

Commit cd32d58

Browse files
committed
\Make sure we are building against test channel for release (#6168)
* Make sure we are building against test chanell for release * Cleanup * Cleanup * Refactoring logic * Remove tagged tests
1 parent 26b3d94 commit cd32d58

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/build-m1-binaries.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- nightly
99
- main
10+
- release/*
1011
tags:
1112
# NOTE: Binary build pipelines should only get triggered on release candidate builds
1213
# Release candidate tags look like: v1.11.0-rc1
@@ -31,6 +32,10 @@ jobs:
3132
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
3233
echo "CHANNEL=test" >> "$GITHUB_ENV"
3334
fi
35+
- name: Set Release CHANNEL (for release)
36+
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }}
37+
run: |
38+
echo "CHANNEL=test" >> "$GITHUB_ENV"
3439
- name: Build TorchVision M1 wheel
3540
shell: arch -arch arm64 bash {0}
3641
env:
@@ -104,6 +109,10 @@ jobs:
104109
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
105110
echo "CHANNEL=test" >> "$GITHUB_ENV"
106111
fi
112+
- name: Set CHANNEL Release (for release)
113+
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }}
114+
run: |
115+
echo "CHANNEL=test" >> "$GITHUB_ENV"
107116
- name: Install conda-build and purge previous artifacts
108117
shell: arch -arch arm64 bash {0}
109118
run: |

.github/workflows/test-m1.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ on:
77
branches:
88
- nightly
99
- main
10+
- release/*
1011
workflow_dispatch:
12+
env:
13+
CHANNEL: "nightly"
1114
jobs:
1215
tests:
1316
name: "Unit-tests on M1"
@@ -19,6 +22,10 @@ jobs:
1922
steps:
2023
- name: Checkout repository
2124
uses: actions/checkout@v2
25+
- name: Set Release CHANNEL (for release)
26+
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }}
27+
run: |
28+
echo "CHANNEL=test" >> "$GITHUB_ENV"
2229
- name: Install TorchVision
2330
shell: arch -arch arm64 bash {0}
2431
env:
@@ -30,7 +37,11 @@ jobs:
3037
export PATH=~/miniconda3/bin:$PATH
3138
set -ex
3239
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy
40+
<<<<<<< HEAD
3341
conda run -p ${ENV_NAME} python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly
42+
=======
43+
conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL}
44+
>>>>>>> 369317f45 (Make sure we are building against test channel for release (#6168))
3445
conda run -p ${ENV_NAME} python3 setup.py develop
3546
conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av
3647
- name: Run tests

0 commit comments

Comments
 (0)