Skip to content

Commit b2f7567

Browse files
Merge pull request #15 from uptick/plt-1623/python-314-wheels
PLT-1623 ci(maturin): publish python 3.14 wheels and fix release race
2 parents 9cb9d50 + ffd70d8 commit b2f7567

2 files changed

Lines changed: 30 additions & 9 deletions

File tree

.github/workflows/maturin.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Publish Release
33
on:
44
workflow_dispatch:
55
push:
6+
# Branches only. A tag push and its release event would otherwise start two
7+
# concurrent runs that race to upload the same release assets.
8+
branches:
9+
- "**"
610
release:
711
types:
812
- released
@@ -11,6 +15,10 @@ on:
1115
permissions:
1216
contents: write
1317

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ github.event_name == 'push' }}
21+
1422
jobs:
1523
linux:
1624
runs-on: ubuntu-latest
@@ -28,13 +36,17 @@ jobs:
2836
with:
2937
python-version: "3.13"
3038

39+
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # ratchet:actions/setup-python@v4
40+
with:
41+
python-version: "3.14"
42+
3143
- name: Build wheels
3244
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # ratchet:PyO3/maturin-action@v1
3345
with:
3446
working-directory: ./vrp-cli
3547
target: ${{ matrix.target }}
3648
sccache: "true"
37-
args: --release --out dist -m Cargo.toml -i 3.12 -i 3.13
49+
args: --release --out dist -m Cargo.toml -i 3.12 -i 3.13 -i 3.14
3850
manylinux: auto
3951

4052
- name: Upload wheels
@@ -61,12 +73,17 @@ jobs:
6173
python-version: "3.13"
6274
architecture: "arm64"
6375

76+
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # ratchet:actions/setup-python@v4
77+
with:
78+
python-version: "3.14"
79+
architecture: "arm64"
80+
6481
- name: Build wheels
6582
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # ratchet:PyO3/maturin-action@v1
6683
with:
6784
working-directory: ./vrp-cli
6885
target: ${{ matrix.target }}
69-
args: --release --out dist -m Cargo.toml -i 3.12 -i 3.13
86+
args: --release --out dist -m Cargo.toml -i 3.12 -i 3.13 -i 3.14
7087
sccache: "true"
7188

7289
- name: Upload wheels
@@ -77,7 +94,9 @@ jobs:
7794

7895
pypi-publish:
7996
name: Publish artifacts to Uptick's Pypi repo
80-
if: startsWith(github.ref, 'refs/tags/')
97+
# Manual runs must be dispatched from a tag, so the wheels always match a
98+
# released version.
99+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/'))
81100
permissions:
82101
id-token: write
83102
contents: write
@@ -107,7 +126,9 @@ jobs:
107126
uvx s3pypi@2.0.1 upload dist/* --bucket s3pypi-610829907584-us-east-1
108127
gh-publish:
109128
name: Publish artifacts to GH
110-
if: startsWith(github.ref, 'refs/tags/')
129+
# Same rule. action-gh-release falls back to github.ref, so a branch dispatch
130+
# would create a release named after the branch.
131+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/'))
111132
permissions:
112133
contents: write
113134
needs: [linux, macos]

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ members = [
1313
]
1414

1515
[workspace.package]
16-
version = "1.25.4"
16+
version = "1.25.5"
1717
authors = ["Ilya Builuk <ilya.builuk@gmail.com>"]
1818
license = "Apache-2.0"
1919
keywords = ["vrp", "optimization"]
@@ -26,10 +26,10 @@ edition = "2024"
2626
[workspace.dependencies]
2727
# internal dependencies
2828
rosomaxa = { path = "rosomaxa", version = "0.9.3" }
29-
vrp-core = { path = "vrp-core", version = "1.25.4" }
30-
vrp-scientific = { path = "vrp-scientific", version = "1.25.4" }
31-
vrp-pragmatic = { path = "vrp-pragmatic", version = "1.25.4" }
32-
vrp-cli = { path = "vrp-cli", version = "1.25.4" }
29+
vrp-core = { path = "vrp-core", version = "1.25.5" }
30+
vrp-scientific = { path = "vrp-scientific", version = "1.25.5" }
31+
vrp-pragmatic = { path = "vrp-pragmatic", version = "1.25.5" }
32+
vrp-cli = { path = "vrp-cli", version = "1.25.5" }
3333

3434
# external dependencies
3535
serde = { version = "1.0.219", features = ["derive"] }

0 commit comments

Comments
 (0)