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
  •  
  •  
  •  
29 changes: 23 additions & 6 deletions .github/workflows/_build-cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ on:
required: false
default: 1
type: number
pre-build:
description: Shell commands to run after checkout and before cibuildwheel.
required: false
default: ''
type: string
post-build:
description: Shell commands to run after cibuildwheel and before artifact upload.
required: false
default: ''
type: string
cibw-package-dir:
description: Package directory passed to the cibuildwheel action.
required: false
Expand Down Expand Up @@ -130,11 +140,6 @@ on:
required: false
default: ''
type: string
cibw-environment:
description: CIBW_ENVIRONMENT value.
required: false
default: ''
type: string
cibw-environment-linux:
description: CIBW_ENVIRONMENT_LINUX value.
required: false
Expand Down Expand Up @@ -246,6 +251,12 @@ jobs:
fetch-depth: ${{ inputs['checkout-fetch-depth'] }}
persist-credentials: false

- name: Prepare for cibuildwheel
if: inputs['pre-build'] != ''
env:
COMMAND: ${{ inputs['pre-build'] }}
run: bash --noprofile --norc -euo pipefail -c "$COMMAND"

- name: Configure cibuildwheel
env:
CIBW_ARCHS: ${{ inputs['cibw-archs'] }}
Expand All @@ -262,7 +273,7 @@ jobs:
CIBW_CONFIG_SETTINGS: ${{ inputs['cibw-config-settings'] }}
CIBW_CONTAINER_ENGINE: ${{ inputs['cibw-container-engine'] }}
CIBW_DEPENDENCY_VERSIONS: ${{ inputs['cibw-dependency-versions'] }}
CIBW_ENVIRONMENT: ${{ inputs['cibw-environment'] }}
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple
CIBW_ENVIRONMENT_LINUX: ${{ inputs['cibw-environment-linux'] }}
CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs['cibw-environment-pass-linux'] }}
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ inputs['cibw-manylinux-riscv64-image'] }}
Expand Down Expand Up @@ -340,6 +351,12 @@ jobs:
config-file: ${{ inputs['cibw-config-file'] }}
extras: ${{ inputs['cibw-extras'] }}

- name: Finish cibuildwheel build
if: inputs['post-build'] != ''
env:
COMMAND: ${{ inputs['post-build'] }}
run: bash --noprofile --norc -euo pipefail -c "$COMMAND"

- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
73 changes: 35 additions & 38 deletions .github/workflows/build-accelerator-toolbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,46 +50,50 @@ jobs:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build accelerator-toolbox ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

uses: $/.github/workflows/_build-cibuildwheel.yml
with:
package: "accelerator-toolbox"
version: "${{ matrix.version }}"
repository: "atcollab/at"
ref: "pyat-${{ matrix.version }}"
artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64"
checkout-fetch-depth: 0
cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64"
# numpy is a build-time requirement (pyproject.toml build-system.requires);
# scipy/h5py are runtime deps pulled in when cibuildwheel installs the
# wheel for the test step. Only our registry has any of these for
# riscv64; only-binary keeps a newer PyPI release from winning the
# resolution and then compiling from sdist (h5py would need libhdf5-dev).
cibw-environment-linux: "PIP_ONLY_BINARY=numpy,scipy,h5py"
cibw-test-sources: "pyat/test"
cibw-test-requires: "pytest"
# test_long_arrays_in_m_file reads machine_data/kickmap_w150_20mm.txt, which
# pyproject.toml's package-data glob (*.m, *.mat only) never ships in any
# installed wheel -- reproduced against a local x86_64 build, unrelated to riscv64.
cibw-test-command: "python -m pytest pyat/test -k \"not test_long_arrays_in_m_file\""

verify_wheels:
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

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

steps:
- name: Checkout accelerator-toolbox pyat-${{ env.ACCELERATOR_TOOLBOX_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
repository: atcollab/at
ref: pyat-${{ env.ACCELERATOR_TOOLBOX_VERSION }}
fetch-depth: 0 # setuptools_scm derives the version from `git describe --tags`
persist-credentials: false

- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# numpy is a build-time requirement (pyproject.toml build-system.requires);
# scipy/h5py are runtime deps pulled in when cibuildwheel installs the
# wheel for the test step. Only our registry has any of these for
# riscv64; only-binary keeps a newer PyPI release from winning the
# resolution and then compiling from sdist (h5py would need libhdf5-dev).
CIBW_ENVIRONMENT: >-
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
PIP_ONLY_BINARY=numpy,scipy,h5py
CIBW_TEST_SOURCES: pyat/test
CIBW_TEST_REQUIRES: pytest
# test_long_arrays_in_m_file reads machine_data/kickmap_w150_20mm.txt, which
# pyproject.toml's package-data glob (*.m, *.mat only) never ships in any
# installed wheel -- reproduced against a local x86_64 build, unrelated to riscv64.
CIBW_TEST_COMMAND: python -m pytest pyat/test -k "not test_long_arrays_in_m_file"
name: accelerator-toolbox-${{ env.ACCELERATOR_TOOLBOX_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64
path: wheelhouse

- name: Check wheel contents
run: |
Expand All @@ -104,16 +108,9 @@ jobs:
assert licences == {"LICENSE"}, licences
EOF

- name: Store wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: accelerator-toolbox-${{ env.ACCELERATOR_TOOLBOX_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error

publish:
name: Publish accelerator-toolbox ${{ matrix.version }}
needs: [setup, build_wheels]
needs: [setup, build_wheels, verify_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-accesscontrol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
# The compiled test-time dependencies (zope.interface, ExtensionClass,
# BTrees, persistent, ...) have no riscv64 wheel on public PyPI.
cibw-environment: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
cibw-test-extras: test
# RestrictedPython 9.0 (2026-11-04) removed `sorted`/`bytes`/`tuple`/`zip`
# from safe_builtins (zopefoundation/RestrictedPython#335); AccessControl
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-acquisition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
# ExtensionClass and zope.interface, Acquisition's two deps, have no
# riscv64 wheel on public PyPI.
cibw-environment: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
cibw-test-extras: test
cibw-test-environment: ZOPE_INTERFACE_STRICT_IRO=1
# Upstream's two test steps: with and without the C extension.
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-acsylla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ jobs:
openssl_version=$(openssl version | awk '{print $2}')
curl -fsSL -o LICENSE.openssl "https://raw.githubusercontent.com/openssl/openssl/openssl-${openssl_version}/LICENSE.txt"
fi
cibw-environment: >-
cibw-environment-linux: >
LIBUV_ROOT_DIR=/usr/local
UV_LIBRARY_PATH=/usr/local/lib
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
cibw-before-build: make cythonize
# Upstream tests against the cassandra:latest image, which has no riscv64 build;
# run the same Cassandra release on Temurin 17 (the image's JRE) in the container.
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-ada-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
artifact-tag: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
# cffi is a build requirement and has no riscv64 wheel on public PyPI.
cibw-environment: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
cibw-test-sources: tests
cibw-test-command: python -m unittest discover -s tests -v
timeout-minutes: 90
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-adbc-driver-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
cibw-package-dir: python/adbc_driver_manager
cibw-build: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
# pandas/pyarrow riscv64 wheels only exist on our own registry.
cibw-environment: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
# The [dbapi] test install pulls pandas; PyPI's newest pandas has no
# riscv64 wheel and its sdist fails to build (meson/xsimd), so install it
# wheel-only, with the registry visible, and let pip back off to a release
Expand All @@ -81,7 +80,7 @@ jobs:
# since the Arrow C++ library isn't installed in this test env) - wheel-only
# lets pip back off to a published riscv64 build. The registry does have a
# cp314t pyarrow wheel, unlike pandas, so that leg can go wheel-only for it.
cibw-test-environment: ${{ matrix.python == 'cp314t' && 'PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_CONSTRAINT=/tmp/pandas-constraint.txt PIP_ONLY_BINARY=pyarrow' || 'PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_ONLY_BINARY=pandas,pyarrow' }}
cibw-test-environment: "${{ matrix.python == 'cp314t' && ' PIP_CONSTRAINT=/tmp/pandas-constraint.txt PIP_ONLY_BINARY=pyarrow' || ' PIP_ONLY_BINARY=pandas,pyarrow' }}"
cibw-test-extras: dbapi
cibw-test-requires: ${{ matrix.python == 'cp314t' && 'pytest>=9 pandas<3.1' || 'pytest>=9' }}
cibw-test-sources: python/adbc_driver_manager/tests python/adbc_driver_manager/pyproject.toml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-aggdraw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
# Pillow (a test/runtime dep) ships no riscv64 wheel on public PyPI; ours is
# what the test env installs. PIP_ONLY_BINARY keeps pip from falling back to
# building it from source.
cibw-environment: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_ONLY_BINARY=Pillow
cibw-environment-linux: "PIP_ONLY_BINARY=Pillow"
timeout-minutes: 90

publish:
Expand Down
Loading