Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ combine builds for emulated wheels #22

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 2 additions & 37 deletions .github/workflows/reusable-python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,50 +117,16 @@ jobs:
name: cibw-wheels-${{ matrix.runs-on }}-${{ strategy.job-index }}
path: wheelhouse/*.whl

dist:
if: ${{ !inputs.pure-python }}
name: 📦 Check
runs-on: ubuntu-latest
steps:
# check out the repository (including submodules and all history)
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# optionally set up Z3
- if: ${{ inputs.setup-z3 }}
name: Setup Z3
uses: cda-tum/setup-z3@v1
with:
version: ${{ inputs.z3-version }}
env:
GITHUB_TOKEN: ${{ github.token }}
# set up mold as linker for faster C++ builds (Linux only)
- name: Set up mold as linker (Linux only)
uses: rui314/setup-mold@v1
# run the build-and-inspect-python-package action (outputs supported Python versions)
- uses: hynek/build-and-inspect-python-package@v2
id: baipp
with:
skip-wheel: "true"
# create identifiers for supported Python versions
- name: 🐍 create identifiers for supported Python versions
id: python-versions
run: echo "python-versions=$(echo '${{ steps.baipp.outputs.supported_python_classifiers_json_array }}' | jq -c --raw-output 'map("cp" + . | gsub("\\."; ""))')" >> $GITHUB_OUTPUT
outputs:
python-versions: ${{ steps.python-versions.outputs.python-versions }}

build_wheels_emulation:
if: ${{ !inputs.pure-python }}
needs: dist
name: 🎡 ${{ matrix.arch }} ${{ matrix.python }}
name: 🎡 ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# build wheels for all supported Python versions on all platforms that require emulation
arch: ["s390x", "ppc64le", "aarch64"]
python: ${{ fromJson(needs.dist.outputs.python-versions) }}
steps:
# check out the repository (including submodules and all history)
- uses: actions/checkout@v4
Expand All @@ -180,10 +146,9 @@ jobs:
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.python }}*
CIBW_TEST_SKIP: "cp*"
# upload the wheels as an artifact
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.arch }}-${{ matrix.python }}-${{ strategy.job-index }}
name: cibw-wheels-${{ matrix.arch }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl