Skip to content

Commit f35afaf

Browse files
committed
workflows: build the versions declared in docs/packages/<pkg>.yaml
Every build-<pkg>.yml and test-<pkg>.yml now calls _setup.yml with its package name, iterates every job over matrix.version, keys artifacts and the publish pattern on it, and triggers on pull_request, push to main and a workflow_dispatch version glob instead of a version literal. Jobs cannot pass per-leg values through outputs, so the sdist->bdist workflows name the sdist artifact after the version instead. Workflows whose git tag differs from the wheel version (v-prefixed tags, rtoml, fabio, dprint-py, point-cloud-utils, torch's +cpu) derive the tag from the version; their patch directories follow the wheel version. Signed-off-by: Ludovic Henry <git@ludovic.dev>
1 parent 6396e30 commit f35afaf

713 files changed

Lines changed: 20966 additions & 6739 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build-adbc-driver-manager.yml‎

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,56 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
version:
12-
description: 'adbc-driver-manager version to build (PyPI version, e.g. 1.12.0)'
13-
required: true
14-
default: '1.12.0'
12+
description: 'Version glob to (re)build; empty builds every version of docs/packages/adbc-driver-manager.yaml not released yet'
13+
required: false
14+
default: ''
1515
pull_request:
16+
branches: [main]
1617
paths:
1718
- '.github/workflows/build-adbc-driver-manager.yml'
19+
- 'docs/packages/adbc-driver-manager.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-adbc-driver-manager.yml'
24+
- 'docs/packages/adbc-driver-manager.yaml'
1825

1926
concurrency:
20-
group: ${{ github.workflow }}-${{ inputs.version || '1.12.0' }}-${{ github.head_ref || github.run_id }}
27+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2128
cancel-in-progress: true
2229

2330
permissions:
2431
contents: read # to fetch code (actions/checkout)
2532

2633
env:
27-
# `inputs.version` is empty on pull_request events; default to 1.12.0 there.
28-
ADBC_VERSION: ${{ inputs.version || '1.12.0' }}
2934
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
3035

3136
jobs:
3237
setup:
3338
uses: $/.github/workflows/_setup.yml
39+
with:
40+
package: adbc-driver-manager
41+
version: ${{ inputs.version }}
3442

3543
build_wheels:
3644
needs: [setup]
37-
name: Build adbc-driver-manager ${{ inputs.version || '1.12.0' }} ${{ matrix.python }}-manylinux_riscv64
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build adbc-driver-manager ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
3847
runs-on: ubuntu-24.04-riscv
3948
timeout-minutes: 60
4049
strategy:
4150
fail-fast: false
4251
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
4353
python:
4454
- "cp312"
4555
- "cp313"
4656
- "cp314"
4757
- "cp314t"
4858

59+
env:
60+
ADBC_VERSION: ${{ matrix.version }}
61+
4962
steps:
5063
# The monorepo has no tag that literally embeds the PyPI version (releases are
5164
# tagged with a sequential counter, e.g. this version is "apache-arrow-adbc-24"),
@@ -86,11 +99,16 @@ jobs:
8699
if-no-files-found: error
87100

88101
publish:
89-
name: Publish adbc-driver-manager ${{ inputs.version || '1.12.0' }}
102+
name: Publish adbc-driver-manager ${{ matrix.version }}
90103
needs: [setup, build_wheels]
104+
if: needs.setup.outputs.versions != '[]'
105+
strategy:
106+
fail-fast: false
107+
matrix:
108+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
91109
permissions:
92110
contents: write
93111
pull-requests: write
94112
uses: $/.github/workflows/_publish-wheel.yml
95113
with:
96-
artifact-pattern: adbc-driver-manager-${{ inputs.version || '1.12.0' }}-*-manylinux_riscv64
114+
artifact-pattern: adbc-driver-manager-${{ matrix.version }}-*-manylinux_riscv64

‎.github/workflows/build-adbc-driver-postgresql.yml‎

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,54 @@ on:
1818
workflow_dispatch:
1919
inputs:
2020
version:
21-
description: 'adbc-driver-postgresql version to build (PyPI version, e.g. 1.12.0)'
22-
required: true
23-
default: '1.12.0'
21+
description: 'Version glob to (re)build; empty builds every version of docs/packages/adbc-driver-postgresql.yaml not released yet'
22+
required: false
23+
default: ''
2424
pull_request:
25+
branches: [main]
2526
paths:
2627
- '.github/workflows/build-adbc-driver-postgresql.yml'
28+
- 'docs/packages/adbc-driver-postgresql.yaml'
29+
push:
30+
branches: [main]
31+
paths:
32+
- '.github/workflows/build-adbc-driver-postgresql.yml'
33+
- 'docs/packages/adbc-driver-postgresql.yaml'
2734

2835
concurrency:
29-
group: ${{ github.workflow }}-${{ inputs.version || '1.12.0' }}-${{ github.head_ref || github.run_id }}
36+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
3037
cancel-in-progress: true
3138

3239
permissions:
3340
contents: read # to fetch code (actions/checkout)
3441

3542
env:
36-
# `inputs.version` is empty on pull_request events; default to 1.12.0 there.
37-
ADBC_VERSION: ${{ inputs.version || '1.12.0' }}
3843
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
3944

4045
jobs:
4146
setup:
4247
uses: $/.github/workflows/_setup.yml
48+
with:
49+
package: adbc-driver-postgresql
50+
version: ${{ inputs.version }}
4351

4452
build_wheels:
4553
needs: [setup]
46-
name: Build adbc-driver-postgresql ${{ inputs.version || '1.12.0' }} py3-none-manylinux_riscv64
54+
if: needs.setup.outputs.versions != '[]'
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
59+
name: Build adbc-driver-postgresql ${{ matrix.version }} py3-none-manylinux_riscv64
4760
runs-on: ubuntu-24.04-riscv
4861
# vcpkg builds libpq and its dependencies from source (no riscv64 binary
4962
# cache exists), which alone was exceeding the previous 60-minute budget
5063
# and getting cancelled at exactly the timeout boundary twice in a row.
5164
timeout-minutes: 120
5265

66+
env:
67+
ADBC_VERSION: ${{ matrix.version }}
68+
5369
steps:
5470
- name: Checkout apache/arrow-adbc v${{ env.ADBC_VERSION }}
5571
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -147,11 +163,16 @@ jobs:
147163
if-no-files-found: error
148164

149165
publish:
150-
name: Publish adbc-driver-postgresql ${{ inputs.version || '1.12.0' }}
166+
name: Publish adbc-driver-postgresql ${{ matrix.version }}
151167
needs: [setup, build_wheels]
168+
if: needs.setup.outputs.versions != '[]'
169+
strategy:
170+
fail-fast: false
171+
matrix:
172+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
152173
permissions:
153174
contents: write
154175
pull-requests: write
155176
uses: $/.github/workflows/_publish-wheel.yml
156177
with:
157-
artifact-pattern: adbc-driver-postgresql-${{ inputs.version || '1.12.0' }}-*-manylinux_riscv64
178+
artifact-pattern: adbc-driver-postgresql-${{ matrix.version }}-*-manylinux_riscv64

‎.github/workflows/build-adbc-driver-sqlite.yml‎

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,54 @@ on:
1818
workflow_dispatch:
1919
inputs:
2020
version:
21-
description: 'adbc-driver-sqlite version to build (PyPI version, e.g. 1.12.0)'
22-
required: true
23-
default: '1.12.0'
21+
description: 'Version glob to (re)build; empty builds every version of docs/packages/adbc-driver-sqlite.yaml not released yet'
22+
required: false
23+
default: ''
2424
pull_request:
25+
branches: [main]
2526
paths:
2627
- '.github/workflows/build-adbc-driver-sqlite.yml'
28+
- 'docs/packages/adbc-driver-sqlite.yaml'
29+
push:
30+
branches: [main]
31+
paths:
32+
- '.github/workflows/build-adbc-driver-sqlite.yml'
33+
- 'docs/packages/adbc-driver-sqlite.yaml'
2734

2835
concurrency:
29-
group: ${{ github.workflow }}-${{ inputs.version || '1.12.0' }}-${{ github.head_ref || github.run_id }}
36+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
3037
cancel-in-progress: true
3138

3239
permissions:
3340
contents: read # to fetch code (actions/checkout)
3441

3542
env:
36-
# `inputs.version` is empty on pull_request events; default to 1.12.0 there.
37-
ADBC_VERSION: ${{ inputs.version || '1.12.0' }}
3843
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
3944

4045
jobs:
4146
setup:
4247
uses: $/.github/workflows/_setup.yml
48+
with:
49+
package: adbc-driver-sqlite
50+
version: ${{ inputs.version }}
4351

4452
build_wheels:
4553
needs: [setup]
46-
name: Build adbc-driver-sqlite ${{ inputs.version || '1.12.0' }} py3-none-manylinux_riscv64
54+
if: needs.setup.outputs.versions != '[]'
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
59+
name: Build adbc-driver-sqlite ${{ matrix.version }} py3-none-manylinux_riscv64
4760
runs-on: ubuntu-24.04-riscv
4861
# numpy/pandas/pyarrow/adbc-driver-manager download for the test step alone takes
4962
# ~an hour on this runner (same as adbc-driver-postgresql's identical install line),
5063
# even though the driver build itself is fast with no vcpkg compile involved.
5164
timeout-minutes: 90
5265

66+
env:
67+
ADBC_VERSION: ${{ matrix.version }}
68+
5369
steps:
5470
- name: Checkout apache/arrow-adbc v${{ env.ADBC_VERSION }}
5571
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -138,11 +154,16 @@ jobs:
138154
if-no-files-found: error
139155

140156
publish:
141-
name: Publish adbc-driver-sqlite ${{ inputs.version || '1.12.0' }}
157+
name: Publish adbc-driver-sqlite ${{ matrix.version }}
142158
needs: [setup, build_wheels]
159+
if: needs.setup.outputs.versions != '[]'
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
143164
permissions:
144165
contents: write
145166
pull-requests: write
146167
uses: $/.github/workflows/_publish-wheel.yml
147168
with:
148-
artifact-pattern: adbc-driver-sqlite-${{ inputs.version || '1.12.0' }}-*-manylinux_riscv64
169+
artifact-pattern: adbc-driver-sqlite-${{ matrix.version }}-*-manylinux_riscv64

‎.github/workflows/build-aggdraw.yml‎

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,52 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
version:
12-
description: 'aggdraw version to build (git tag without leading v, e.g. 1.4.1)'
13-
required: true
14-
default: '1.4.1'
12+
description: 'Version glob to (re)build; empty builds every version of docs/packages/aggdraw.yaml not released yet'
13+
required: false
14+
default: ''
1515
pull_request:
16+
branches: [main]
1617
paths:
1718
- '.github/workflows/build-aggdraw.yml'
19+
- 'docs/packages/aggdraw.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-aggdraw.yml'
24+
- 'docs/packages/aggdraw.yaml'
1825

1926
concurrency:
20-
group: ${{ github.workflow }}-${{ inputs.version || '1.4.1' }}-${{ github.head_ref || github.run_id }}
27+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2128
cancel-in-progress: true
2229

2330
permissions:
2431
contents: read # to fetch code (actions/checkout)
2532

2633
env:
27-
AGGDRAW_VERSION: ${{ inputs.version || '1.4.1' }}
2834
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
2935

3036
jobs:
3137
setup:
3238
uses: $/.github/workflows/_setup.yml
39+
with:
40+
package: aggdraw
41+
version: ${{ inputs.version }}
3342

3443
build_wheels:
3544
needs: [setup]
36-
name: Build aggdraw ${{ inputs.version || '1.4.1' }} ${{ matrix.python }}-manylinux_riscv64
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build aggdraw ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
3747
runs-on: ubuntu-24.04-riscv
3848
timeout-minutes: 90
3949
strategy:
4050
fail-fast: false
4151
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
4253
python: ["cp312", "cp313", "cp314", "cp314t"]
4354

55+
env:
56+
AGGDRAW_VERSION: ${{ matrix.version }}
57+
4458
steps:
4559
- name: Checkout aggdraw v${{ env.AGGDRAW_VERSION }}
4660
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -74,11 +88,16 @@ jobs:
7488
if-no-files-found: error
7589

7690
publish:
77-
name: Publish aggdraw ${{ inputs.version || '1.4.1' }}
91+
name: Publish aggdraw ${{ matrix.version }}
7892
needs: [setup, build_wheels]
93+
if: needs.setup.outputs.versions != '[]'
94+
strategy:
95+
fail-fast: false
96+
matrix:
97+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
7998
permissions:
8099
contents: write
81100
pull-requests: write
82101
uses: $/.github/workflows/_publish-wheel.yml
83102
with:
84-
artifact-pattern: aggdraw-${{ inputs.version || '1.4.1' }}-*-manylinux_riscv64
103+
artifact-pattern: aggdraw-${{ matrix.version }}-*-manylinux_riscv64

0 commit comments

Comments
 (0)