File tree Expand file tree Collapse file tree 4 files changed +69
-6
lines changed Expand file tree Collapse file tree 4 files changed +69
-6
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,27 @@ jobs:
145
145
- name : Perform CodeQL Analysis
146
146
uses : github/codeql-action/analyze@v3
147
147
148
- manylinux :
148
+ riscv64 :
149
+ runs-on : ubuntu-latest
150
+ name : RiscV 64
151
+ steps :
152
+ - name : checkout
153
+ uses : actions/checkout@v4
154
+ - name : Set up Python
155
+ uses : actions/setup-python@v5
156
+ with :
157
+ python-version : " 3.13"
158
+ - name : Set up QEMU
159
+ uses : docker/setup-qemu-action@v3
160
+ with :
161
+ platforms : all
162
+ - name : Build and test greenlet
163
+ env :
164
+ DOCKER_IMAGE : riscv64/ubuntu:latest
165
+ run : bash ./ubuntu-test
149
166
167
+
168
+ manylinux :
150
169
runs-on : ubuntu-latest
151
170
# We use a regular Python matrix entry to share as much code as possible.
152
171
strategy :
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ include LICENSE.PSF
50
50
include MANIFEST.in
51
51
52
52
include make-manylinux
53
+ include ubuntu-test
53
54
54
55
global-exclude *.pyc
55
56
global-exclude *.pyd
Original file line number Diff line number Diff line change @@ -12,13 +12,9 @@ static int
12
12
slp_switch (void )
13
13
{
14
14
int ret ;
15
- #if __riscv_xlen == 32
16
15
long fp ;
17
16
long * stackref , stsizediff ;
18
- #else
19
- int fp ;
20
- int * stackref , stsizediff ;
21
- #endif
17
+
22
18
__asm__ volatile ("" : : : REGS_TO_SAVE );
23
19
__asm__ volatile ("mv %0, fp" : "=r" (fp ) : );
24
20
__asm__ volatile ("mv %0, sp" : "=r" (stackref ) : );
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This needs to be run from the root of the project.
4
+
5
+ set -e
6
+ export PYTHONUNBUFFERED=1
7
+ export PYTHONDONTWRITEBYTECODE=1
8
+ # Use a fixed hash seed for reproducibility
9
+ export PYTHONHASHSEED=8675309
10
+ export CI=1
11
+ export TRAVIS=true
12
+ export PIP_NO_WARN_SCRIPT_LOCATION=1
13
+
14
+
15
+ if [ -d /greenlet ]; then
16
+ # Running inside docker
17
+ export GREENLET_MANYLINUX=1
18
+ # Our setup.py overrides this with -Os; be sure it does.
19
+ export CFLAGS=" -O3 -DNDEBUG -Wall"
20
+
21
+ apt-get update
22
+ apt-get install -y python3.12 python3.12-dev python3.12-venv gcc git g++
23
+ update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
24
+
25
+ # Build in an isolated directory
26
+ mkdir /tmp/build
27
+ cd /tmp/build
28
+ git config --global --add safe.directory /greenlet/.git
29
+ git clone /greenlet greenlet
30
+ cd greenlet
31
+
32
+ python -m venv /tmp/venv
33
+ . /tmp/venv/bin/activate
34
+ echo " Python"
35
+ python --version
36
+
37
+ python -mpip install -U pip
38
+ python -mpip install -U setuptools wheel
39
+ python -mpip wheel -v --wheel-dir ./dist .
40
+ python -mpip install -U .[test]
41
+ python -m unittest discover -v greenlet.tests
42
+
43
+ exit 0
44
+ fi
45
+
46
+ # Mount the current directory as /greenlet
47
+ docker run --rm --platform linux/riscv64 -v " $( pwd) :/greenlet" ${DOCKER_IMAGE:- riscv64/ ubuntu: latest} /greenlet/$( basename $0 )
You can’t perform that action at this time.
0 commit comments