From 168f2a299172c5736c3918288895a07cd24f22dc Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 5 Nov 2022 09:43:20 -0400 Subject: [PATCH 1/3] CI: Fix wheel builder uploading (#27) * CI: Fix wheel builder uploading * Maybe fix? * Update wheels.yml * Update wheels.yml * restrict upload conditions * Update wheels.yml * Update wheels.yml --- .github/workflows/wheels.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f41d6eebef302..0ece7a11fa2bb 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -71,11 +71,21 @@ jobs: uses: pypa/cibuildwheel@v2.9.0 env: CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} - - # Used to test the built wheels - - uses: actions/setup-python@v4 + + # Used to test(Windows-only) and push the built wheels + # You might need to use setup-python separately + # if the new Python-dev version + # is unavailable on conda-forge. + - uses: conda-incubator/setup-miniconda@v2 with: + auto-update-conda: true + # Really doesn't matter what version we upload with + # just the version we test with python-version: ${{ matrix.python[1] }} + activate-environment: test + channels: conda-forge, anaconda + channel-priority: true + mamba-version: "*" - name: Test wheels (Windows 64-bit only) if: ${{ matrix.buildplat[1] == 'win_amd64' }} @@ -88,26 +98,15 @@ jobs: name: ${{ matrix.python[0] }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} path: ./wheelhouse/*.whl - # Used to push the built wheels - # TODO: once Python 3.11 is available on conda, de-dup with - # setup python above - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - # Really doesn't matter what version we upload with - # just the version we test with - python-version: '3.8' - channels: conda-forge - channel-priority: true - mamba-version: "*" - name: Install anaconda client if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} + shell: bash -el {0} run: conda install -q -y anaconda-client - name: Upload wheels - if: success() + if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} shell: bash -el {0} env: PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }} @@ -180,11 +179,12 @@ jobs: - name: Install anaconda client if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} + shell: bash -el {0} run: | conda install -q -y anaconda-client - name: Upload sdist - if: success() + if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} shell: bash -el {0} env: PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }} From 8131ec4368f9cb0e3c942e2706bc25076bdbf80f Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 5 Nov 2022 12:04:10 -0400 Subject: [PATCH 2/3] maybe fix --- .github/workflows/wheels.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0ece7a11fa2bb..b0ff6a3110f6a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -71,7 +71,7 @@ jobs: uses: pypa/cibuildwheel@v2.9.0 env: CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} - + # Used to test(Windows-only) and push the built wheels # You might need to use setup-python separately # if the new Python-dev version @@ -79,8 +79,6 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true - # Really doesn't matter what version we upload with - # just the version we test with python-version: ${{ matrix.python[1] }} activate-environment: test channels: conda-forge, anaconda @@ -89,7 +87,7 @@ jobs: - name: Test wheels (Windows 64-bit only) if: ${{ matrix.buildplat[1] == 'win_amd64' }} - shell: cmd + shell: cmd /C CALL {0} run: | python ci/test_wheels.py wheelhouse From 3dc648dd8a9f7a6ef82a96df9dafc3b27f541bf9 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 5 Nov 2022 12:34:39 -0400 Subject: [PATCH 3/3] adjust --- ci/test_wheels.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/test_wheels.py b/ci/test_wheels.py index 9a9a6890d8ecb..c9258422baefd 100644 --- a/ci/test_wheels.py +++ b/ci/test_wheels.py @@ -1,12 +1,11 @@ import glob import os -import platform import shutil import subprocess import sys if os.name == "nt": - py_ver = platform.python_version() + py_ver = f"{sys.version_info.major}.{sys.version_info.minor}" is_32_bit = os.getenv("IS_32_BIT") == "true" try: wheel_dir = sys.argv[1]