-
-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (79 loc) · 3.06 KB
/
cython.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Cython
on:
workflow_dispatch:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/cython.yml'
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
- cron: "0 2 * * 0"
jobs:
# This workflow contains a single job called "build"
cython:
name: Cython ${{ matrix.python_version }} ${{ matrix.os }} ${{ matrix.extra_cflags }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macOS]
backend: [c]
python_version: [pypy-3.10-nightly, pypy-3.9-nightly]
extra_cflags: ['', '-DCYTHON_USE_TYPE_SPECS=1']
include:
- os: windows
cflags: '/Od /W3'
- os: ubuntu
cflags: '-O0 -g3'
- os: macOS
cflags: '-O0 -g3 -Wno-parentheses-equality'
timeout-minutes: 60
env:
BACKEND: ${{ matrix.backend }}
PYTHON_VERSION: ${{ matrix.python_version }}
USE_CCACHE: 1
CCACHE_SLOPPINESS: "pch_defines,time_macros"
CCACHE_COMPRESS: 1
CCACHE_MAXSIZE: "200M"
NO_CYTHON_COMPILE: 1
CFLAGS: ${{ matrix.cflags }} ${{ matrix.extra_cflags }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python_version }}
- uses: actions/[email protected]
with:
fetch-depth: 1
repository: cython/cython
path: cy
- name: install external dependencies
if : ${{ matrix.os == 'ubuntu' }}
run: |
python -m pip install --upgrade pip
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
python -m pip install pythran --no-build-isolation
- name: install external dependencies
if : ${{ matrix.os == 'macos' }}
run: |
python -m pip install --upgrade pip
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
python -m pip install pythran --no-build-isolation
- name: Enable long paths on Windows
if: startsWith(runner.os, 'Windows')
run: Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1
shell: pwsh
- name: test cython
shell: bash
run: |
cd cy
python -m pip install -U pip "setuptools<60" wheel
#precompile _testmultiphase
python -c "import _testmultiphase_build"
# python setup.py build_ext -i # pypy should be faster with pure python
python runtests.py -vv --no-code-style -x Debugger -x pyximport --backends=${{ matrix.backend }} -j5