From 00140d5dad88ddf6b5ed2e3cf6a429668334ef6b Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 23 Feb 2024 08:52:25 +0100 Subject: [PATCH 1/7] Use Python configuration from `maturin generate-ci` --- .github/workflows/release.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd0e602a..0050f998 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -191,16 +191,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: | - 3.7 - 3.8 - 3.9 - 3.10 - 3.11 - pypy3.7 - pypy3.8 - pypy3.9 - pypy3.10 + python-version: '3.10' architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -218,21 +209,12 @@ 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 with: - python-version: | - 3.7 - 3.8 - 3.9 - 3.10 - 3.11 - pypy3.7 - pypy3.8 - pypy3.9 - pypy3.10 + python-version: '3.10' - name: Build wheels uses: PyO3/maturin-action@v1 with: From 3afe940702da9386b9026e8d25db9ba07178328a Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Fri, 23 Feb 2024 09:25:40 +0100 Subject: [PATCH 2/7] Install multiple CPython versions, avoiding PyPy --- .github/workflows/release.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0050f998..86341f46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -191,7 +191,13 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: | + 3.7 + 3.8 + 3.9 + 3.10 + 3.11 + 3.12 architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -214,7 +220,13 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: | + 3.7 + 3.8 + 3.9 + 3.10 + 3.11 + 3.12 - name: Build wheels uses: PyO3/maturin-action@v1 with: From ece76e65a88ce194f69f729faa7436aa8d4bd8a0 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 23 Feb 2024 09:36:17 +0100 Subject: [PATCH 3/7] Reenable PyPy versions and make CPython 3.10 default --- .github/workflows/release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86341f46..8cbf9b8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -192,12 +192,16 @@ jobs: - uses: actions/setup-python@v4 with: python-version: | + pypy3.7 + pypy3.8 + pypy3.9 + pypy3.10 3.7 3.8 3.9 - 3.10 3.11 3.12 + 3.10 architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -221,12 +225,16 @@ jobs: - uses: actions/setup-python@v4 with: python-version: | + pypy3.7 + pypy3.8 + pypy3.9 + pypy3.10 3.7 3.8 3.9 - 3.10 3.11 3.12 + 3.10 - name: Build wheels uses: PyO3/maturin-action@v1 with: From c5fb1f622920e9bb88ab5b4adf965c4b05d290b2 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 23 Feb 2024 09:48:23 +0100 Subject: [PATCH 4/7] Add warning documentation quirk of wheel generation --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8cbf9b8f..13d1924a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -191,6 +191,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 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: | pypy3.7 pypy3.8 @@ -224,6 +227,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 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: | pypy3.7 pypy3.8 From 0b50cc5700c5012b437589709e277d455de0dfb1 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 23 Feb 2024 09:50:32 +0100 Subject: [PATCH 5/7] Migrate as many actions to Node.js 20 as possible --- .github/workflows/release.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13d1924a..c89b6fe9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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 @@ -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 }} @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -188,8 +189,8 @@ 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 @@ -213,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 @@ -224,8 +225,8 @@ jobs: matrix: 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 @@ -248,7 +249,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 @@ -256,14 +257,14 @@ jobs: 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 @@ -274,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 From a092ca8cf1cade0eef024b5468b61424986b195f Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 23 Feb 2024 09:52:52 +0100 Subject: [PATCH 6/7] Add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c64fe4b..dd9022c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From 5e7eef4b1ea51b65c6f08665bb132df6220bb469 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 23 Feb 2024 10:03:17 +0100 Subject: [PATCH 7/7] Add changlog item documentation MacOS wheel changes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd9022c9..e21d3c78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- the Python interface for MacOS is now shipped separately for the two targets + (aarch64 and x86_64) instead of a single universal wheel previously - raised MSRV to 1.70.0 - when calling `BinRemapper::new`, the limits are now checked for overlaps, in which case a new error is returned