Skip to content

Commit c5f2204

Browse files
authored
Merge pull request #1205 from atalman/fix_conda_build_env
Build using dedicated wheel environment
2 parents b724a2a + 155677a commit c5f2204

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/_build_test_upload.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
shell: bash -l {0}
113113
run: |
114114
conda init bash
115-
conda create -y --name wheel_build_env python=${{ matrix.python-version }}
115+
conda create -y --name wheel_build_env_${{ matrix.python-version }} python=${{ matrix.python-version }}
116116
- name: Setup msbuild on Windows
117117
if: startsWith( matrix.os, 'windows' )
118118
uses: microsoft/[email protected]
@@ -137,7 +137,7 @@ jobs:
137137
fi
138138
else
139139
if ${{ startsWith( matrix.os, 'macos' ) }}; then
140-
conda activate wheel_build_env
140+
conda activate wheel_build_env_${{ matrix.python-version }}
141141
fi
142142
pip install cmake ninja
143143
echo "/home/runner/.local/bin" >> $GITHUB_PATH
@@ -169,8 +169,8 @@ jobs:
169169
fi
170170
fi
171171
if ${{ startsWith( matrix.os, 'macos' ) }}; then
172-
conda activate wheel_build_env
173-
conda run -n wheel_build_env packaging/build_wheel.sh
172+
conda activate wheel_build_env_${{ matrix.python-version }}
173+
conda run -n wheel_build_env_${{ matrix.python-version }} packaging/build_wheel.sh
174174
else
175175
packaging/build_wheel.sh
176176
fi
@@ -187,7 +187,7 @@ jobs:
187187
pip3 install auditwheel
188188
fi
189189
if ${{ startsWith( matrix.os, 'macos' ) }}; then
190-
conda activate wheel_build_env
190+
conda activate wheel_build_env_${{ matrix.python-version }}
191191
fi
192192
pip3 install pkginfo
193193
for pkg in dist/torchdata*.whl; do
@@ -214,8 +214,8 @@ jobs:
214214
source packaging/manylinux/python_helper.sh
215215
fi
216216
if ${{ startsWith( matrix.os, 'macos' ) }}; then
217-
conda activate wheel_build_env
218-
conda run -n wheel_build_env pip3 install dist/torchdata*.whl
217+
conda activate wheel_build_env_${{ matrix.python-version }}
218+
conda run -n wheel_build_env_${{ matrix.python-version }} pip3 install dist/torchdata*.whl
219219
else
220220
pip3 install dist/torchdata*.whl
221221
fi
@@ -231,8 +231,8 @@ jobs:
231231
source packaging/manylinux/python_helper.sh
232232
fi
233233
if ${{ startsWith( matrix.os, 'macos' ) }}; then
234-
conda activate wheel_build_env
235-
conda run -n wheel_build_env python test/smoke_test/smoke_test.py
234+
conda activate wheel_build_env_${{ matrix.python-version }}
235+
conda run -n wheel_build_env_${{ matrix.python-version }} python test/smoke_test/smoke_test.py
236236
else
237237
if ${{ matrix.python-version == 'pure' }}; then
238238
python test/smoke_test/smoke_test.py --no-s3

0 commit comments

Comments
 (0)