Skip to content

Commit a4b3aa4

Browse files
authored
emcache: Add version 1.3.3 (#3152)
1 parent cf6c00a commit a4b3aa4

2 files changed

Lines changed: 119 additions & 0 deletions

File tree

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/emcache/emcache/blob/v1.3.3/.github/workflows/release.yml
5+
name: Build emcache 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/emcache.yaml not released yet'
12+
required: false
13+
default: ''
14+
pull_request:
15+
branches: [main]
16+
paths:
17+
- '.github/workflows/build-emcache.yml'
18+
- 'docs/packages/emcache.yaml'
19+
push:
20+
branches: [main]
21+
paths:
22+
- '.github/workflows/build-emcache.yml'
23+
- 'docs/packages/emcache.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: emcache
40+
version: ${{ inputs.version }}
41+
42+
build_wheels:
43+
needs: [setup]
44+
if: needs.setup.outputs.versions != '[]'
45+
name: Build emcache ${{ 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+
python:
53+
- "cp312"
54+
- "cp313"
55+
- "cp314"
56+
- "cp314t"
57+
58+
env:
59+
EMCACHE_VERSION: ${{ matrix.version }}
60+
61+
steps:
62+
- name: Checkout emcache v${{ env.EMCACHE_VERSION }}
63+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64+
with:
65+
repository: emcache/emcache
66+
ref: v${{ env.EMCACHE_VERSION }}
67+
submodules: true
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+
CIBW_BEFORE_BUILD: make -C vendor/murmur3 static && make cythonize
78+
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
79+
# Rocky 10's memcached stands in for upstream's compose.yaml service containers.
80+
CIBW_BEFORE_TEST_LINUX: >-
81+
dnf -y install memcached &&
82+
memcached -d -u root -p 11211 &&
83+
memcached -d -u root -p 11212 &&
84+
memcached -d -u root -p 11213 --enable-ssl
85+
-o ssl_chain_cert={project}/tests/acceptance/data/localhost.crt,ssl_key={project}/tests/acceptance/data/localhost.key &&
86+
memcached -d -u root -p 11214 -S -Y {project}/tests/acceptance/data/auth_pwd.txt &&
87+
memcached -d -u root -s /tmp/emcache.test1.sock &&
88+
memcached -d -u root -s /tmp/emcache.test2.sock
89+
CIBW_TEST_REQUIRES: pytest==8.2.2 pytest-mock==3.14.0 pytest-asyncio==0.23.8
90+
CIBW_TEST_SOURCES: tests pyproject.toml
91+
CIBW_TEST_COMMAND: python -m pytest -sv tests
92+
93+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
94+
with:
95+
name: emcache-${{ env.EMCACHE_VERSION }}-${{ matrix.python }}-manylinux_riscv64
96+
path: wheelhouse/*.whl
97+
if-no-files-found: error
98+
99+
publish:
100+
name: Publish emcache ${{ matrix.version }}
101+
needs: [setup, build_wheels]
102+
if: needs.setup.outputs.versions != '[]'
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
version: ${{ fromJSON(needs.setup.outputs.versions) }}
107+
permissions:
108+
contents: write
109+
pull-requests: write
110+
uses: $/.github/workflows/_publish-wheel.yml
111+
secrets:
112+
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
113+
with:
114+
artifact-pattern: emcache-${{ matrix.version }}-*-manylinux_riscv64

‎docs/packages/emcache.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-name: emcache
2+
source-code: https://github.com/emcache/emcache
3+
license: MIT
4+
versions:
5+
- version: 1.3.3

0 commit comments

Comments
 (0)