Skip to content

Cython

Cython #251

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Cython
# Controls when the action will run.
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"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
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/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- uses: actions/checkout@v3
with:
fetch-depth: 1
repository: cython/cython
path: cy
- name: install external dependencies
if : ${{ matrix.os == 'ubuntu' }}
run: python -m pip install numpy pythran
- name: install external dependencies
if : ${{ matrix.os == 'macos' }}
run: python -m pip install numpy pythran
- 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