Skip to content

Commit

Permalink
ENH: Separate wheel artifacts (#440)
Browse files Browse the repository at this point in the history
* ENH: Separate wheel artifacts

One zip file per wheel, rather than a single archive containing the whole matrix
  • Loading branch information
cookpa committed Mar 21, 2023
1 parent 4814a96 commit a6cef12
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.0

- name: Get package name and version (Linux / Mac)
if: ${{ ! startsWith(matrix.os, 'windows-') }}
run: |
echo PACKAGE_NAME=$( python setup.py --name ) >> $GITHUB_ENV
echo PACKAGE_VERSION=$( python setup.py --version ) >> $GITHUB_ENV
# Some shells require "-Encoding utf8" to append to GITHUB_ENV
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions?tool=powershell#environment-files
- name: Get package name and version (Windows)
if: startsWith(matrix.os, 'windows-')
run: |
echo "PACKAGE_NAME=$( python setup.py --name )" | Out-File -FilePath $env:GITHUB_ENV `
-Append
echo "PACKAGE_VERSION=$( python setup.py --version )" | Out-File -FilePath $env:GITHUB_ENV `
-Append
- name: Build wheels
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
Expand All @@ -114,8 +129,9 @@ jobs:
CIBW_ENVIRONMENT_MACOS: |
CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
run: python -m cibuildwheel --output-dir wheelhouse
run: python -m cibuildwheel --output-dir wheelhouse/cp${{ matrix.python }}-${{ matrix.platform_id }}

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
name: ${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION }}-cp${{ matrix.python }}-${{ matrix.platform_id }}
path: ./wheelhouse/cp${{ matrix.python }}-${{ matrix.platform_id }}/*.whl

0 comments on commit a6cef12

Please sign in to comment.