Skip to content

Commit

Permalink
Build wheels in docker to fix 'cannot repair dist/vcztools-0.1.dev1+g…
Browse files Browse the repository at this point in the history
…89924d7-cp311-cp311-linux_x86_64.whl to manylinux_2_5_x86_64 ABI because of the presence of too-recent versioned symbols. You'll need to compile the wheel on an older toolchain.'
  • Loading branch information
benjeffery committed Feb 5, 2025
1 parent 89924d7 commit 51b6b73
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CD

on:
pull_request:
push:
branches:
- main
Expand All @@ -21,26 +22,29 @@ jobs:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine auditwheel validate-pyproject[all]
- name: Check and install package
python -m pip install --upgrade pip build validate-pyproject[all]
python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
- name: Build wheels
run: |
validate-pyproject pyproject.toml
python -m build
python -m auditwheel repair dist/*.whl
python -m twine check --strict dist/*
python -m pip install dist/*.whl
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh
- name: Check vcztools CLI
run: |
pip install vcztools --no-index --only-binary vcztools -f dist/wheelhouse
vcztools --help
# Make sure we don't have ``vcztools`` in the CWD
cd tests
python -m vcztools --help
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
name: linux-wheels
path: dist/wheelhouse

publish-to-pypi:
if: github.repository_owner == 'sgkit-dev' && github.event_name == 'release'
Expand All @@ -55,11 +59,14 @@ jobs:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
- name: Download all
uses: actions/[email protected]
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
ls dist
- uses: pypa/gh-action-pypi-publish@release/v1


publish-to-testpypi:
Expand All @@ -76,11 +83,14 @@ jobs:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/
- name: Download all
uses: actions/[email protected]
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
ls dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/

0 comments on commit 51b6b73

Please sign in to comment.