Skip to content

Commit 6eaa653

Browse files
authored
apsw: add build-apsw.yml for riscv64 wheels (#1071)
* **Package**: `apsw` * **Version**: `3.53.4.0` * **Source**: https://github.com/rogerbinns/apsw * **Docs**: https://rogerbinns.github.io/apsw/ CPython C extension wrapping SQLite, built against a downloaded matching SQLite amalgamation. Upstream publishes no riscv64 wheel. Mirrors upstream's [`build-pypi.yml`](https://github.com/rogerbinns/apsw/blob/3.53.4.0/.github/workflows/build-pypi.yml) `binary` job. **Differs from upstream** - Only Linux (glibc) - upstream also builds macOS, Windows and pyodide. **Testing** - same as upstream **License**: OK
1 parent 7c97fe8 commit 6eaa653

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

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

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on the `binary` job of
5+
# https://github.com/rogerbinns/apsw/blob/3.53.4.0/.github/workflows/build-pypi.yml
6+
name: Build apsw wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'apsw version/tag to build, e.g. 3.53.4.0'
13+
required: true
14+
default: '3.53.4.0'
15+
pull_request:
16+
paths:
17+
- '.github/workflows/build-apsw.yml'
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ inputs.version || '3.53.4.0' }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read # to fetch code (actions/checkout)
25+
26+
env:
27+
APSW_VERSION: ${{ inputs.version || '3.53.4.0' }}
28+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
29+
30+
jobs:
31+
setup:
32+
uses: $/.github/workflows/_setup.yml
33+
34+
build_wheels:
35+
needs: [setup]
36+
name: Build apsw ${{ inputs.version || '3.53.4.0' }} ${{ matrix.python }}-manylinux_riscv64
37+
runs-on: ubuntu-24.04-riscv
38+
timeout-minutes: 60
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
python: ["cp312", "cp313", "cp314", "cp314t"]
43+
44+
steps:
45+
- name: Checkout apsw ${{ env.APSW_VERSION }}
46+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47+
with:
48+
repository: rogerbinns/apsw
49+
ref: ${{ env.APSW_VERSION }}
50+
persist-credentials: false
51+
52+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
53+
env:
54+
CIBW_ARCHS: riscv64
55+
CIBW_BUILD: ${{ matrix.python }}-manylinux_riscv64
56+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
57+
CIBW_BEFORE_BUILD: python -c "import shutil ; shutil.copyfile('tools/setup-pypi.cfg','setup.apsw')"
58+
CIBW_TEST_COMMAND: python -m apsw.tests -v
59+
APSW_HEAVY_DURATION: 2
60+
61+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
62+
with:
63+
name: apsw-${{ env.APSW_VERSION }}-${{ matrix.python }}-manylinux_riscv64
64+
path: ./wheelhouse/*.whl
65+
if-no-files-found: error
66+
67+
publish:
68+
name: Publish apsw ${{ inputs.version || '3.53.4.0' }}
69+
needs: [setup, build_wheels]
70+
permissions:
71+
contents: write
72+
pull-requests: write
73+
uses: $/.github/workflows/_publish-wheel.yml
74+
with:
75+
artifact-pattern: apsw-${{ inputs.version || '3.53.4.0' }}-*-manylinux_riscv64

0 commit comments

Comments
 (0)