14
14
workflow_dispatch :
15
15
env :
16
16
CHANNEL : " nightly"
17
+ BASE_REF : ${{ github.base_ref }}
18
+ EVENT_NAME : ${{ github.event_name }}
17
19
jobs :
18
20
build_wheels :
19
21
name : " Build TorchVision M1 wheels"
@@ -25,12 +27,16 @@ jobs:
25
27
- name : Checkout repository
26
28
uses : actions/checkout@v2
27
29
- name : Set CHANNEL (only for tagged pushes)
28
- if : ${{ github.event_name == 'push' && ( startsWith(github.event.ref, 'refs/tags/') || startsWith(github.event.ref, 'refs/heads/release') ) }}
30
+ if : ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') }}
29
31
run : |
30
32
# reference ends with an RC suffix
31
33
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
32
34
echo "CHANNEL=test" >> "$GITHUB_ENV"
33
35
fi
36
+ - name : Set Release CHANNEL (for release)
37
+ if : ${{ github.event_name == 'pull_request' && startsWith(github.base_ref, 'release') }}
38
+ run : |
39
+ echo "CHANNEL=test" >> "$GITHUB_ENV"
34
40
- name : Build TorchVision M1 wheel
35
41
shell : arch -arch arm64 bash {0}
36
42
env :
@@ -104,6 +110,10 @@ jobs:
104
110
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
105
111
echo "CHANNEL=test" >> "$GITHUB_ENV"
106
112
fi
113
+ - name : Set CHANNEL Release (for release)
114
+ if : ${{ github.event_name == 'pull_request' && startsWith(github.base_ref, 'release') }}
115
+ run : |
116
+ echo "CHANNEL=test" >> "$GITHUB_ENV"
107
117
- name : Install conda-build and purge previous artifacts
108
118
shell : arch -arch arm64 bash {0}
109
119
run : |
@@ -123,12 +133,19 @@ jobs:
123
133
. packaging/pkg_helpers.bash
124
134
125
135
if [[ $CHANNEL == "test" ]]; then
136
+ setup_cuda
126
137
setup_base_build_version
138
+ setup_macos
127
139
else
140
+ setup_cuda
128
141
setup_build_version
142
+ setup_macos
129
143
fi
130
144
131
145
setup_conda_pytorch_constraint
146
+ setup_conda_cudatoolkit_constraint
147
+ setup_visual_studio_constraint
148
+ setup_junit_results_folder
132
149
export SOURCE_ROOT_DIR=$(pwd)
133
150
conda build -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision
134
151
mkdir -p dist
0 commit comments