Cython #310
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.11-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 |