Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 36 additions & 1 deletion .github/workflows/_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,45 @@ name: Build workflow setup

on:
workflow_call:
inputs:
package:
description: Package whose docs/packages/<package>.yaml lists the versions to build.
required: true
type: string
version:
description: Version glob to (re)build; empty builds every version not released yet.
required: false
default: ''
type: string
outputs:
versions:
description: JSON list of versions to build; "[]" when there is nothing to build.
value: ${{ jobs.setup.outputs.versions }}

jobs:
setup:
if: github.event_name != 'pull_request' || github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.versions }}
steps:
- run: true
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: |
ci_scripts
docs/packages
persist-credentials: false

- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
enable-cache: false

- name: Select versions of ${{ inputs.package }} to build
id: versions
env:
PACKAGE: ${{ inputs.package }}
VERSION_GLOB: ${{ inputs.version }}
run: |
versions=$(uv run --quiet ci_scripts/pending_versions.py ${VERSION_GLOB:+--glob "$VERSION_GLOB"} "$PACKAGE")
echo "versions=$versions" >> "$GITHUB_OUTPUT"
echo "Versions to build: $versions"
35 changes: 27 additions & 8 deletions .github/workflows/build-ada-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,52 @@ on:
workflow_dispatch:
inputs:
version:
description: 'ada-url version to build (git tag without the v prefix, e.g. 4.0.0)'
required: true
default: '4.0.0'
description: 'Version glob to (re)build; empty builds every version of docs/packages/ada-url.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-ada-url.yml'
- 'docs/packages/ada-url.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-ada-url.yml'
- 'docs/packages/ada-url.yaml'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '4.0.0' }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

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

env:
ADA_URL_VERSION: ${{ inputs.version || '4.0.0' }}
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64

jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: ada-url
version: ${{ inputs.version }}

build_wheels:
needs: [setup]
name: Build ada-url ${{ inputs.version || '4.0.0' }} ${{ matrix.python }}-manylinux_riscv64
if: needs.setup.outputs.versions != '[]'
name: Build ada-url ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python: ["cp312", "cp313", "cp314"]

env:
ADA_URL_VERSION: ${{ matrix.version }}

steps:
- name: Checkout ada-url ${{ env.ADA_URL_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -67,11 +81,16 @@ jobs:
if-no-files-found: error

publish:
name: Publish ada-url ${{ inputs.version || '4.0.0' }}
name: Publish ada-url ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: ada-url-${{ inputs.version || '4.0.0' }}-*-manylinux_riscv64
artifact-pattern: ada-url-${{ matrix.version }}-*-manylinux_riscv64
36 changes: 27 additions & 9 deletions .github/workflows/build-adbc-driver-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,56 @@ on:
workflow_dispatch:
inputs:
version:
description: 'adbc-driver-manager version to build (PyPI version, e.g. 1.12.0)'
required: true
default: '1.12.0'
description: 'Version glob to (re)build; empty builds every version of docs/packages/adbc-driver-manager.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-adbc-driver-manager.yml'
- 'docs/packages/adbc-driver-manager.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-adbc-driver-manager.yml'
- 'docs/packages/adbc-driver-manager.yaml'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '1.12.0' }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

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

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

jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: adbc-driver-manager
version: ${{ inputs.version }}

build_wheels:
needs: [setup]
name: Build adbc-driver-manager ${{ inputs.version || '1.12.0' }} ${{ matrix.python }}-manylinux_riscv64
if: needs.setup.outputs.versions != '[]'
name: Build adbc-driver-manager ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python:
- "cp312"
- "cp313"
- "cp314"
- "cp314t"

env:
ADBC_VERSION: ${{ matrix.version }}

steps:
# The monorepo has no tag that literally embeds the PyPI version (releases are
# tagged with a sequential counter, e.g. this version is "apache-arrow-adbc-24"),
Expand Down Expand Up @@ -86,11 +99,16 @@ jobs:
if-no-files-found: error

publish:
name: Publish adbc-driver-manager ${{ inputs.version || '1.12.0' }}
name: Publish adbc-driver-manager ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: adbc-driver-manager-${{ inputs.version || '1.12.0' }}-*-manylinux_riscv64
artifact-pattern: adbc-driver-manager-${{ matrix.version }}-*-manylinux_riscv64
39 changes: 30 additions & 9 deletions .github/workflows/build-adbc-driver-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,54 @@ on:
workflow_dispatch:
inputs:
version:
description: 'adbc-driver-postgresql version to build (PyPI version, e.g. 1.12.0)'
required: true
default: '1.12.0'
description: 'Version glob to (re)build; empty builds every version of docs/packages/adbc-driver-postgresql.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-adbc-driver-postgresql.yml'
- 'docs/packages/adbc-driver-postgresql.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-adbc-driver-postgresql.yml'
- 'docs/packages/adbc-driver-postgresql.yaml'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '1.12.0' }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

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

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

jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: adbc-driver-postgresql
version: ${{ inputs.version }}

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

env:
ADBC_VERSION: ${{ matrix.version }}

steps:
- name: Checkout apache/arrow-adbc v${{ env.ADBC_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -147,11 +163,16 @@ jobs:
if-no-files-found: error

publish:
name: Publish adbc-driver-postgresql ${{ inputs.version || '1.12.0' }}
name: Publish adbc-driver-postgresql ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: adbc-driver-postgresql-${{ inputs.version || '1.12.0' }}-*-manylinux_riscv64
artifact-pattern: adbc-driver-postgresql-${{ matrix.version }}-*-manylinux_riscv64
39 changes: 30 additions & 9 deletions .github/workflows/build-adbc-driver-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,54 @@ on:
workflow_dispatch:
inputs:
version:
description: 'adbc-driver-sqlite version to build (PyPI version, e.g. 1.12.0)'
required: true
default: '1.12.0'
description: 'Version glob to (re)build; empty builds every version of docs/packages/adbc-driver-sqlite.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-adbc-driver-sqlite.yml'
- 'docs/packages/adbc-driver-sqlite.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-adbc-driver-sqlite.yml'
- 'docs/packages/adbc-driver-sqlite.yaml'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '1.12.0' }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

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

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

jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: adbc-driver-sqlite
version: ${{ inputs.version }}

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

env:
ADBC_VERSION: ${{ matrix.version }}

steps:
- name: Checkout apache/arrow-adbc v${{ env.ADBC_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -138,11 +154,16 @@ jobs:
if-no-files-found: error

publish:
name: Publish adbc-driver-sqlite ${{ inputs.version || '1.12.0' }}
name: Publish adbc-driver-sqlite ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: adbc-driver-sqlite-${{ inputs.version || '1.12.0' }}-*-manylinux_riscv64
artifact-pattern: adbc-driver-sqlite-${{ matrix.version }}-*-manylinux_riscv64
Loading
Loading