Skip to content

Commit 2aa8d50

Browse files
authored
cityseer: Add version 5.8.0 (#3057)
* Port cityseer 5.8.0 to riscv64 Pure-Rust PyO3/maturin extension (geo, ndarray, petgraph, rayon, rstar, wkt, exmex; no -sys crates, no SIMD/arch-specific code, no GPL build-time linkage beyond glibc), so the manylinux_riscv64 image builds it like any other maturin port. Not abi3, matching upstream's own per-interpreter release matrix; cp314 is dropped because statsmodels (a runtime dependency) has no riscv64 wheel for it yet, leaving cp312/cp313. AGPL-3.0: maturin bundles LICENSE.txt into the wheel automatically, satisfying the licence-compliance check. * cityseer: fix riscv64 test failures (missing pyarrow, inert addopts ignore) Both cp312 and cp313 manylinux_riscv64 test runs failed identically with 5 failures: - 4 ImportErrors: CityNetwork.save() calls geopandas.to_parquet(), which needs the optional pyarrow dependency. Upstream's own CI only gets it transitively (overturemaps, a dev-group dependency, requires pyarrow), so it was never declared explicitly; CIBW_TEST_REQUIRES only installed pytest. pyarrow already has a riscv64 wheel on pypi.riseproject.dev, so add it to CIBW_TEST_REQUIRES. - 1 timing assertion in tests/test_performance.py::test_local_centrality_time (func_time < 1, observed ~2.9-3.2s): upstream's own pyproject.toml already excludes this file via `addopts = "--ignore=tests/test_performance.py"`, but that path is resolved relative to pytest's invocation directory, not its rootdir. cibuildwheel's default empty test_cwd made the two differ, so the ignore silently did nothing and the file was collected and run for real. `cd {package}` before invoking pytest makes cwd match rootdir, so the ignore applies as upstream intends (same pattern as build-lapx.yml).
1 parent 5aafc92 commit 2aa8d50

2 files changed

Lines changed: 122 additions & 0 deletions

File tree

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on the `linux` job of
5+
# https://github.com/benchmark-urbanism/cityseer-api/blob/v5.8.0/.github/workflows/publish_package.yml
6+
name: Build cityseer wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version glob to (re)build; empty builds every version of docs/packages/cityseer.yaml not released yet'
13+
required: false
14+
default: ''
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- '.github/workflows/build-cityseer.yml'
19+
- 'docs/packages/cityseer.yaml'
20+
push:
21+
branches: [main]
22+
paths:
23+
- '.github/workflows/build-cityseer.yml'
24+
- 'docs/packages/cityseer.yaml'
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
28+
cancel-in-progress: true
29+
30+
permissions:
31+
contents: read # to fetch code (actions/checkout)
32+
33+
env:
34+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
35+
36+
jobs:
37+
setup:
38+
uses: $/.github/workflows/_setup.yml
39+
with:
40+
package: cityseer
41+
version: ${{ inputs.version }}
42+
43+
build_wheels:
44+
needs: [setup]
45+
if: needs.setup.outputs.versions != '[]'
46+
name: Build cityseer ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
47+
runs-on: ubuntu-24.04-riscv
48+
timeout-minutes: 120
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
53+
# cityseer's pyo3 dependency carries no abi3-pyNN feature, matching
54+
# upstream's own per-interpreter wheel matrix. Upstream builds no
55+
# free-threaded wheel, so cp314t is dropped; cp314 is dropped too --
56+
# statsmodels (a runtime dependency) has no riscv64 wheel for it yet.
57+
python: ['cp312', 'cp313']
58+
59+
env:
60+
CITYSEER_VERSION: ${{ matrix.version }}
61+
62+
steps:
63+
- name: Checkout cityseer v${{ env.CITYSEER_VERSION }}
64+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
65+
with:
66+
repository: benchmark-urbanism/cityseer-api
67+
ref: v${{ env.CITYSEER_VERSION }}
68+
persist-credentials: false
69+
70+
- name: Build wheels
71+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
72+
with:
73+
output-dir: wheelhouse/
74+
only: ${{ matrix.python }}-manylinux_riscv64
75+
env:
76+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
77+
# cityseer ships no [tool.cibuildwheel], so the Rust toolchain its
78+
# maturin backend needs is installed in-container here.
79+
CIBW_BEFORE_ALL_LINUX: >-
80+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
81+
CIBW_ENVIRONMENT_LINUX: >-
82+
PATH="$PATH:$HOME/.cargo/bin"
83+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
84+
PIP_ONLY_BINARY=:all:
85+
# Upstream's own `check` job: run the pytest suite (minus the
86+
# performance benchmarks pyproject.toml's addopts already ignores --
87+
# `cd` into {package} first so cwd matches rootdir and that addopts
88+
# is actually read. The Overpass-API network test upstream's own
89+
# suite carries self-skips under GITHUB_ACTIONS.
90+
# pyarrow is an optional geopandas dependency upstream's own dev
91+
# group pulls in transitively (via overturemaps); CityNetwork.save()
92+
# needs it directly and we already ship a riscv64 wheel for it.
93+
CIBW_TEST_REQUIRES: pytest pyarrow
94+
CIBW_TEST_COMMAND: cd {package} && pytest tests -v
95+
96+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
97+
with:
98+
name: cityseer-${{ env.CITYSEER_VERSION }}-${{ matrix.python }}-manylinux_riscv64
99+
path: wheelhouse/*.whl
100+
if-no-files-found: error
101+
102+
publish:
103+
name: Publish cityseer ${{ matrix.version }}
104+
needs: [setup, build_wheels]
105+
if: needs.setup.outputs.versions != '[]'
106+
strategy:
107+
fail-fast: false
108+
matrix:
109+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
110+
permissions:
111+
contents: write
112+
pull-requests: write
113+
uses: $/.github/workflows/_publish-wheel.yml
114+
secrets:
115+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
116+
with:
117+
artifact-pattern: cityseer-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/cityseer.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: cityseer
2+
source-code: https://github.com/benchmark-urbanism/cityseer-api
3+
license: AGPL-3.0
4+
versions:
5+
- version: 5.8.0

0 commit comments

Comments
 (0)