Skip to content

Commit 1ca4642

Browse files
authored
aerospike: Add version 19.2.2 (#2310)
1 parent 7475a2d commit 1ca4642

3 files changed

Lines changed: 153 additions & 0 deletions

File tree

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on the manylinux build path of upstream's own
5+
# _build-wheel-natively.bash/build-wheel.bash (they build in a custom manylinux_2_28
6+
# image with a hand-built OpenSSL baked in; we use the standard riscv64 image instead).
7+
name: Build aerospike wheels (riscv64)
8+
9+
on:
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Version glob to (re)build; empty builds every version of docs/packages/aerospike.yaml not released yet'
14+
required: false
15+
default: ''
16+
pull_request:
17+
branches: [main]
18+
paths:
19+
- '.github/workflows/build-aerospike.yml'
20+
- 'docs/packages/aerospike.yaml'
21+
- 'patches/aerospike/**'
22+
push:
23+
branches: [main]
24+
paths:
25+
- '.github/workflows/build-aerospike.yml'
26+
- 'docs/packages/aerospike.yaml'
27+
- 'patches/aerospike/**'
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
31+
cancel-in-progress: true
32+
33+
permissions:
34+
contents: read # to fetch code (actions/checkout)
35+
36+
env:
37+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
38+
39+
jobs:
40+
setup:
41+
uses: $/.github/workflows/_setup.yml
42+
with:
43+
package: aerospike
44+
version: ${{ inputs.version }}
45+
46+
build_wheels:
47+
needs: [setup]
48+
if: needs.setup.outputs.versions != '[]'
49+
name: Build aerospike ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
50+
runs-on: ubuntu-24.04-riscv
51+
timeout-minutes: 90
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
56+
python: [cp312, cp313, cp314, cp314t]
57+
58+
env:
59+
AEROSPIKE_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout aerospike-client-python ${{ env.AEROSPIKE_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: aerospike/aerospike-client-python
66+
ref: ${{ env.AEROSPIKE_VERSION }}
67+
submodules: recursive
68+
persist-credentials: false
69+
70+
- name: Checkout python-wheels
71+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
72+
with:
73+
path: python-wheels
74+
persist-credentials: false
75+
76+
- name: Patch aerospike-client-c source
77+
run: git apply python-wheels/patches/aerospike/${{ env.AEROSPIKE_VERSION }}/*.patch
78+
79+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
80+
with:
81+
output-dir: wheelhouse/
82+
only: ${{ matrix.python }}-manylinux_riscv64
83+
env:
84+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
85+
# libyaml-devel is CRB-only, not EPEL (gotcha 51 doesn't apply); openssl-devel
86+
# is in AppStream. Both resolve on riscv64, matching upstream's own yum install.
87+
CIBW_BEFORE_ALL_LINUX: dnf install -y libyaml-devel openssl-devel
88+
# Real Aerospike server is out of scope; instead prove the extension is
89+
# compiled and client() exercises the real C cluster-init code path (the one
90+
# the riscv64 as_arch_pause patch touches), failing fast against a closed port.
91+
CIBW_TEST_COMMAND: |
92+
python3 - <<'PYEOF'
93+
import aerospike
94+
from aerospike import exception
95+
import aerospike_helpers
96+
from aerospike_helpers import expressions
97+
from aerospike_helpers.operations import operations
98+
assert aerospike.__file__.endswith('.so'), aerospike.__file__
99+
try:
100+
aerospike.client({'hosts': [('127.0.0.1', 13000)], 'policies': {'timeout': 1000}})
101+
raise SystemExit('expected a ConnectionError connecting to a closed port')
102+
except exception.ConnectionError:
103+
pass
104+
PYEOF
105+
106+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
107+
with:
108+
name: aerospike-${{ env.AEROSPIKE_VERSION }}-${{ matrix.python }}-manylinux_riscv64
109+
path: wheelhouse/*.whl
110+
if-no-files-found: error
111+
112+
publish:
113+
name: Publish aerospike ${{ matrix.version }}
114+
needs: [setup, build_wheels]
115+
if: needs.setup.outputs.versions != '[]'
116+
strategy:
117+
fail-fast: false
118+
matrix:
119+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
120+
permissions:
121+
contents: write
122+
pull-requests: write
123+
uses: $/.github/workflows/_publish-wheel.yml
124+
secrets:
125+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
126+
with:
127+
artifact-pattern: aerospike-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/aerospike.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package-name: aerospike
2+
source-code: https://github.com/aerospike/aerospike-client-python
3+
license: Apache-2.0
4+
versions:
5+
- version: 19.2.2
6+
patched: true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Upstream-Status: To upstream [not yet submitted]
2+
3+
as_arch_pause() is only defined for __x86_64__/__aarch64__ (and _MSC_VER), but is
4+
used unconditionally by the spinlock/rwlock inline functions in as_atomic_gcc.h,
5+
which are always compiled. On any other architecture (e.g. riscv64) this is an
6+
implicit-declaration compile error under -Werror. Add a portable no-op fallback,
7+
matching the existing MSVC-vs-gcc/clang structure of the file.
8+
--- a/aerospike-client-c/modules/common/src/include/aerospike/as_arch.h
9+
+++ b/aerospike-client-c/modules/common/src/include/aerospike/as_arch.h
10+
@@ -33,6 +33,10 @@
11+
12+
#define as_arch_pause() asm volatile("isb" : : : "memory")
13+
14+
+#else
15+
+
16+
+#define as_arch_pause()
17+
+
18+
#endif
19+
20+
#endif // gcc & clang

0 commit comments

Comments
 (0)