diff --git a/.github/workflows/capi.yaml b/.github/workflows/capi.yaml index 0587f3ba..f9c21878 100644 --- a/.github/workflows/capi.yaml +++ b/.github/workflows/capi.yaml @@ -5,6 +5,7 @@ on: branches-ignore: - pycli - bump-pyo3-version + - update-wheels-actions defaults: run: diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index cc8d6815..eebbc8d0 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -5,6 +5,7 @@ on: branches-ignore: - pycli - bump-pyo3-version + - update-wheels-actions env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6df4bfc8..224f9fd5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -4,6 +4,7 @@ on: push: branches-ignore: - pycli + - update-wheels-actions jobs: test: diff --git a/.github/workflows/release-wheels.yaml b/.github/workflows/release-wheels.yaml new file mode 100644 index 00000000..0f46f252 --- /dev/null +++ b/.github/workflows/release-wheels.yaml @@ -0,0 +1,153 @@ +name: Release Python wheels + +# for available runner images see: https://github.com/actions/runner-images + +on: + push: + tags: + - 'v[0-9]+*' + workflow_dispatch: + +jobs: + wheels-linux: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + - runner: ubuntu-22.04 + target: x86_64 + manylinux: 2_17 + #- runner: ubuntu-22.04 + # target: x86 + #- runner: ubuntu-22.04 + # target: aarch64 + #- runner: ubuntu-22.04 + # target: armv7 + #- runner: ubuntu-22.04 + # target: s390x + #- runner: ubuntu-22.04 + # target: ppc64le + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.x + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --interpreter python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14 pypy3.9 pypy3.10 pypy3.11 --manifest-path pineappl_py/Cargo.toml + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + manylinux: ${{ matrix.platform.manylinux }} + - name: Upload wheels + uses: actions/upload-artifact@v5 + with: + name: ${{ github.job }}-${{ matrix.platform.target }} + path: dist + + wheels-macos: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + - runner: macos-15-intel + target: x86_64 + - runner: macos-latest + target: aarch64 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.x + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --interpreter python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14 pypy3.9 pypy3.10 --manifest-path pineappl_py/Cargo.toml + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + - name: Upload wheels + uses: actions/upload-artifact@v5 + with: + name: ${{ github.job }}-${{ matrix.platform.target }} + path: dist + + wheels-sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - 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@v5 + with: + name: ${{ github.job }} + path: dist + + wheels-windows: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + - runner: windows-2025 + target: x64 + python_arch: x64 + # - runner: windows-latest + # target: x86 + # python_arch: x86 + # - runner: windows-11-arm + # target: aarch64 + # python_arch: arm64 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.13 + architecture: ${{ matrix.platform.python_arch }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + # Python 3.7, 3.8, 3.9, PyPy 3.9 and 3.10 don't seem to work on Windows and fail with + # Interpreters ["CPython 3.7", "PyPy 3.9", "PyPy 3.10"] were found in maturin's bundled sysconfig, but compiling for Windows without an interpreter requires PyO3's `generate-import-lib` feature + # even though the interpreters were installed + args: --release --out dist --interpreter python3.10 python3.11 python3.12 python3.13 python3.14 --manifest-path pineappl_py/Cargo.toml + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + - name: Upload wheels + uses: actions/upload-artifact@v5 + with: + name: ${{ github.job }}-${{ matrix.platform.target }} + path: dist + + release-wheels: + name: Publish wheels + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + needs: + - wheels-linux + - wheels-macos + - wheels-sdist + - wheels-windows + permissions: + # Use to sign the release artifacts + id-token: write + # Used to upload release artifacts + contents: write + # Used to generate artifact attestation + attestations: write + steps: + - uses: actions/download-artifact@v6 + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v3 + with: + subject-path: 'wheels-*/*' + - name: Install uv + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: astral-sh/setup-uv@v7 + - name: Publish to PyPI + if: ${{ startsWith(github.ref, 'refs/tags/') }} + run: uv publish 'wheels-*/*' + env: + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d41dc934..1db451ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,12 +4,14 @@ name: Release on: push: + branches-ignore: + - update-wheels-actions tags: - 'v[0-9]+*' workflow_dispatch: env: - # this is make the `gh` binary work + # make the `gh` binary work GH_TOKEN: ${{ github.token }} jobs: @@ -338,117 +340,6 @@ jobs: cd ../pineappl_cli cargo publish - wheels-linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64] - steps: - - 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 - with: - target: ${{ matrix.target }} - # `--find-interpreter` is needed to generate wheels for *all* Python versions - args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - sccache: 'true' - manylinux: auto - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist - - wheels-macos: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: macos-15-intel - target: x86_64 - - os: macos-15 - target: aarch64 - steps: - - 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: | - pypy3.8 - pypy3.9 - pypy3.10 - 3.8 - 3.9 - 3.11 - 3.12 - 3.13 - 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@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist - - wheels-sdist: - runs-on: ubuntu-latest - steps: - - 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@v4 - with: - name: ${{ github.job }} - path: dist - - wheels-windows: - runs-on: windows-latest - strategy: - matrix: - target: [x64] - steps: - - 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: | - pypy3.8 - pypy3.9 - pypy3.10 - 3.7 - 3.8 - 3.9 - 3.11 - 3.12 - 3.13 - 3.10 - architecture: ${{ matrix.target }} - - 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@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist - release-cli-wheels: runs-on: ubuntu-latest if: "startsWith(github.ref, 'refs/tags/')" @@ -467,24 +358,3 @@ jobs: with: command: upload args: --skip-existing * - - release-wheels: - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: - - wheels-linux - - wheels-macos - - wheels-sdist - - wheels-windows - steps: - - uses: actions/download-artifact@v4 - with: - pattern: "wheels-*" - merge-multiple: true - - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - with: - command: upload - args: --skip-existing * diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0f9e7528..758c2aed 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,6 +5,7 @@ on: branches-ignore: - pycli - bump-pyo3-version + - update-wheels-actions defaults: run: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cf98bed..cc9ebc97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## Added + +- added support for the Python 3.14 on macOS (ARM64/x86) + ## Removed -- removed support for Python 3.7 for macOS (ARM64) due to removed runner on - Github +- removed support for the following Python versions due to unresolved issue in + maturin action on Windows (x86): Python 3.7, 3.8, 3.9 ## [1.3.2] - 21/02/2026 diff --git a/Cargo.lock b/Cargo.lock index 14306fd8..23d71202 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -943,7 +943,7 @@ dependencies = [ [[package]] name = "pineappl" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "anyhow", "arrayvec", @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "pineappl_applgrid" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "cc", "cxx", @@ -979,16 +979,16 @@ dependencies = [ [[package]] name = "pineappl_capi" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "itertools", "ndarray", - "pineappl 1.3.2", + "pineappl 1.3.3-alpha-1", ] [[package]] name = "pineappl_cli" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "anyhow", "assert_cmd", @@ -1006,7 +1006,7 @@ dependencies = [ "managed-lhapdf", "ndarray", "ndarray-npy", - "pineappl 1.3.2", + "pineappl 1.3.3-alpha-1", "pineappl_applgrid", "pineappl_fastnlo", "predicates", @@ -1019,7 +1019,7 @@ dependencies = [ [[package]] name = "pineappl_fastnlo" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "cxx", "cxx-build", @@ -1029,12 +1029,12 @@ dependencies = [ [[package]] name = "pineappl_py" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "itertools", "ndarray", "numpy", - "pineappl 1.3.2", + "pineappl 1.3.3-alpha-1", "pyo3", ] @@ -1893,7 +1893,7 @@ dependencies = [ [[package]] name = "xtask" -version = "1.3.2" +version = "1.3.3-alpha-1" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 6e169466..4b0d7b82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ keywords = ["high-energy-physics", "physics"] license = "GPL-3.0-or-later" repository = "https://github.com/NNPDF/pineappl" rust-version = "1.80.1" -version = "1.3.2" +version = "1.3.3-alpha-1" [workspace.lints.clippy] all = { level = "warn", priority = -1 } diff --git a/pineappl_capi/Cargo.toml b/pineappl_capi/Cargo.toml index 3a2327c2..e1ef5165 100644 --- a/pineappl_capi/Cargo.toml +++ b/pineappl_capi/Cargo.toml @@ -19,7 +19,7 @@ version.workspace = true workspace = true [dependencies] -pineappl = { path = "../pineappl", version = "=1.3.2" } +pineappl = { path = "../pineappl", version = "=1.3.3-alpha-1" } itertools = "0.10.1" ndarray = "0.15.4" diff --git a/pineappl_cli/Cargo.toml b/pineappl_cli/Cargo.toml index d4760d6a..b8f4e972 100644 --- a/pineappl_cli/Cargo.toml +++ b/pineappl_cli/Cargo.toml @@ -30,9 +30,9 @@ lhapdf = { package = "managed-lhapdf", version = "0.3.4" } lz4_flex = { optional = true, version = "0.9.2" } ndarray = "0.15.4" ndarray-npy = { default-features = false, features = ["npz"], optional = true, version = "0.8.1" } -pineappl = { path = "../pineappl", version = "=1.3.2" } -pineappl_applgrid = { optional = true, path = "../pineappl_applgrid", version = "=1.3.2" } -pineappl_fastnlo = { optional = true, path = "../pineappl_fastnlo", version = "=1.3.2" } +pineappl = { path = "../pineappl", version = "=1.3.3-alpha-1" } +pineappl_applgrid = { optional = true, path = "../pineappl_applgrid", version = "=1.3.3-alpha-1" } +pineappl_fastnlo = { optional = true, path = "../pineappl_fastnlo", version = "=1.3.3-alpha-1" } prettytable-rs = { default-features = false, features = ["win_crlf"], version = "0.10.0" } rayon = "1.5.1" serde = { features = ["derive"], optional = true, version = "1.0.130" } diff --git a/pineappl_py/Cargo.toml b/pineappl_py/Cargo.toml index e338737f..b57ec993 100644 --- a/pineappl_py/Cargo.toml +++ b/pineappl_py/Cargo.toml @@ -31,5 +31,5 @@ crate-type = ["cdylib"] itertools = "0.10.1" ndarray = "0.15.4" numpy = "0.26.0" -pineappl = { path = "../pineappl", version = "=1.3.2" } +pineappl = { path = "../pineappl", version = "=1.3.3-alpha-1" } pyo3 = { features = ["extension-module"], version = "0.26.0" } diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 313e2405..192290a7 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -21,4 +21,4 @@ clap_mangen = "0.2.26" enum_dispatch = "0.3.7" #git2 = "0.17.2" #semver = "1.0.17" -pineappl_cli = { path = "../pineappl_cli", version = "=1.3.2" } +pineappl_cli = { path = "../pineappl_cli", version = "=1.3.3-alpha-1" }