Skip to content

Commit e95e6a3

Browse files
committed
zipline-reloaded: Add build-zipline-reloaded.yml for riscv64
Backtesting engine with real Cython extensions (assets, data, finance, lib windowing). Upstream ships no riscv64 wheel. Mirrors upstream's build_wheels.yml, narrowed to the manylinux_riscv64 image.
1 parent 6d21813 commit e95e6a3

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/stefan-jansen/zipline-reloaded/blob/3.1.1/.github/workflows/build_wheels.yml
5+
name: Build zipline-reloaded wheels (riscv64)
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Version glob to (re)build; empty builds every version of docs/packages/zipline-reloaded.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-zipline-reloaded.yml'
18+
- 'docs/packages/zipline-reloaded.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-zipline-reloaded.yml'
23+
- 'docs/packages/zipline-reloaded.yaml'
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
29+
permissions:
30+
contents: read # to fetch code (actions/checkout)
31+
32+
env:
33+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
34+
35+
jobs:
36+
setup:
37+
uses: $/.github/workflows/_setup.yml
38+
with:
39+
package: zipline-reloaded
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build zipline-reloaded ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
46+
runs-on: ubuntu-24.04-riscv
47+
timeout-minutes: 90
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
52+
# Matches upstream's own build_wheels.yml matrix (cp310-cp313); it
53+
# does not build cp314/cp314t.
54+
python:
55+
- "cp310"
56+
- "cp311"
57+
- "cp312"
58+
- "cp313"
59+
60+
env:
61+
ZIPLINE_RELOADED_VERSION: ${{ matrix.version }}
62+
63+
steps:
64+
- name: Checkout zipline-reloaded v${{ env.ZIPLINE_RELOADED_VERSION }}
65+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
66+
with:
67+
repository: stefan-jansen/zipline-reloaded
68+
ref: ${{ env.ZIPLINE_RELOADED_VERSION }}
69+
persist-credentials: false
70+
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+
# Shallow checkout has no tag history for setuptools_scm to read.
78+
CIBW_ENVIRONMENT: >-
79+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ZIPLINE_RELOADED=${{ env.ZIPLINE_RELOADED_VERSION }}
80+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
81+
82+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
83+
with:
84+
name: zipline-reloaded-${{ env.ZIPLINE_RELOADED_VERSION }}-${{ matrix.python }}-manylinux_riscv64
85+
path: ./wheelhouse/*.whl
86+
if-no-files-found: error
87+
88+
publish:
89+
name: Publish zipline-reloaded ${{ matrix.version }}
90+
needs: [setup, build_wheels]
91+
if: needs.setup.outputs.versions != '[]'
92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
96+
permissions:
97+
contents: write
98+
pull-requests: write
99+
uses: $/.github/workflows/_publish-wheel.yml
100+
secrets:
101+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
102+
with:
103+
artifact-pattern: zipline-reloaded-${{ matrix.version }}-*-manylinux_riscv64
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: zipline-reloaded
2+
source-code: https://github.com/stefan-jansen/zipline-reloaded
3+
license: Apache-2.0
4+
versions:
5+
- version: 3.1.1

0 commit comments

Comments
 (0)