Skip to content

Commit dd39bb4

Browse files
lithomas1phofl
authored andcommitted
CI: Fix wheel builder uploading (pandas-dev#49544)
1 parent a70b5e2 commit dd39bb4

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

.github/workflows/wheels.yml

+15-17
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,22 @@ jobs:
7272
env:
7373
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
7474

75-
# Used to test the built wheels
76-
- uses: actions/setup-python@v4
75+
# Used to test(Windows-only) and push the built wheels
76+
# You might need to use setup-python separately
77+
# if the new Python-dev version
78+
# is unavailable on conda-forge.
79+
- uses: conda-incubator/setup-miniconda@v2
7780
with:
81+
auto-update-conda: true
7882
python-version: ${{ matrix.python[1] }}
83+
activate-environment: test
84+
channels: conda-forge, anaconda
85+
channel-priority: true
86+
mamba-version: "*"
7987

8088
- name: Test wheels (Windows 64-bit only)
8189
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
82-
shell: cmd
90+
shell: cmd /C CALL {0}
8391
run: |
8492
python ci/test_wheels.py wheelhouse
8593
@@ -88,26 +96,15 @@ jobs:
8896
name: ${{ matrix.python[0] }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
8997
path: ./wheelhouse/*.whl
9098

91-
# Used to push the built wheels
92-
# TODO: once Python 3.11 is available on conda, de-dup with
93-
# setup python above
94-
- uses: conda-incubator/setup-miniconda@v2
95-
with:
96-
auto-update-conda: true
97-
# Really doesn't matter what version we upload with
98-
# just the version we test with
99-
python-version: '3.8'
100-
channels: conda-forge
101-
channel-priority: true
102-
mamba-version: "*"
10399

104100
- name: Install anaconda client
105101
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
102+
shell: bash -el {0}
106103
run: conda install -q -y anaconda-client
107104

108105

109106
- name: Upload wheels
110-
if: success()
107+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
111108
shell: bash -el {0}
112109
env:
113110
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
@@ -180,11 +177,12 @@ jobs:
180177

181178
- name: Install anaconda client
182179
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
180+
shell: bash -el {0}
183181
run: |
184182
conda install -q -y anaconda-client
185183
186184
- name: Upload sdist
187-
if: success()
185+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
188186
shell: bash -el {0}
189187
env:
190188
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}

ci/test_wheels.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import glob
22
import os
3-
import platform
43
import shutil
54
import subprocess
65
import sys
76

87
if os.name == "nt":
9-
py_ver = platform.python_version()
8+
py_ver = f"{sys.version_info.major}.{sys.version_info.minor}"
109
is_32_bit = os.getenv("IS_32_BIT") == "true"
1110
try:
1211
wheel_dir = sys.argv[1]

0 commit comments

Comments
 (0)