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

Fix MacOS Python wheel generation #262

Merged
merged 7 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
65 changes: 37 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Compile library
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target=${{ matrix.target }}
Expand All @@ -37,7 +37,7 @@ jobs:
cd prefix
tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz .
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pineappl_capi-${{ matrix.target }}
path: pineappl_capi-${{ matrix.target }}.tar.gz
Expand All @@ -60,6 +60,7 @@ jobs:
# print the glibc version requirement
objdump -T lib/libpineappl_capi.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1
- name: Upload artifact
# upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC
uses: actions/upload-artifact@v3
with:
name: pineappl_capi-${{ matrix.target }}
Expand All @@ -71,8 +72,8 @@ jobs:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create new release
Expand Down Expand Up @@ -126,7 +127,7 @@ jobs:
matrix:
target: [x86_64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# for Linux the wheels are built in a container, so we don't need the `setup-python` action
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand All @@ -137,7 +138,7 @@ jobs:
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -148,7 +149,7 @@ jobs:
matrix:
target: [x86_64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Patch Cargo.toml
run: |
# - older maturin versions don't support metadata inheritance - overwrite it explicitly
Expand Down Expand Up @@ -177,7 +178,7 @@ jobs:
# this is the latest version to support Python 3.6
maturin-version: 0.12.20
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -188,19 +189,23 @@ jobs:
matrix:
target: [x64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# WARNING: be careful with the ordering - the last version is the default one. Apparently
# maturin doesn't find all Python versions when one chooses a PyPy version instead of
# CPython as default
python-version: |
3.7
3.8
3.9
3.10
3.11
pypy3.7
pypy3.8
pypy3.9
pypy3.10
3.7
3.8
3.9
3.11
3.12
3.10
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand All @@ -209,7 +214,7 @@ jobs:
args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -218,44 +223,48 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
target: [aarch64-apple-darwin, x86_64-apple-darwin]
target: [aarch64, x86_64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# WARNING: be careful with the ordering - the last version is the default one. Apparently
# maturin doesn't find all Python versions when one chooses a PyPy version instead of
# CPython as default
python-version: |
3.7
3.8
3.9
3.10
3.11
pypy3.7
pypy3.8
pypy3.9
pypy3.10
3.7
3.8
3.9
3.11
3.12
3.10
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist --manifest-path pineappl_py/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -266,7 +275,7 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux-wheels, windows-wheels, macos-wheels, sdist]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Publish to PyPI
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- changed the type `ParseBinRemapperError` to allow capturing errors from
`BinRemapper::new`

### Fixed

- fixed the missing generation of CPython 3.7 to 3.10 wheels for MacOS targets

### Removed

- removed the type `SubGrid` that was exported in the CAPI as the type
Expand Down
Loading