summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/FUNDING.yml12
-rw-r--r--.github/ISSUE_TEMPLATE/1_bug_report.yml63
-rw-r--r--.github/ISSUE_TEMPLATE/2_feature_request.yml46
-rw-r--r--.github/ISSUE_TEMPLATE/3_blank_issue.yml21
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml5
-rw-r--r--.github/code-of-conduct.md78
-rw-r--r--.github/report-handling-manual.md92
-rw-r--r--.github/workflows/ci.yml281
-rw-r--r--.github/workflows/wheel-manylinux.yml90
-rw-r--r--.github/workflows/wheels.yml146
10 files changed, 660 insertions, 174 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 000000000..091606923
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: scoder # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: pypi/Cython # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yml b/.github/ISSUE_TEMPLATE/1_bug_report.yml
new file mode 100644
index 000000000..f1828b030
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1_bug_report.yml
@@ -0,0 +1,63 @@
+name: Bug Report
+description: File a bug report
+title: "[BUG] "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **PLEASE READ THIS FIRST:**
+ - DO NOT use the bug and feature tracker for general questions and support requests.
+ Use the [`cython-users`](https://groups.google.com/g/cython-users) mailing list instead.
+ It has a wider audience, so you get more and better answers.
+ - Did you search for SIMILAR ISSUES already?
+ Please do, it helps to save us precious time that we otherwise could not invest into development.
+ - Did you try the LATEST MASTER BRANCH or pre-release?
+ It might already have what you want to report.
+ Specifically, the legacy stable 0.29.x release series receives only important low-risk bug fixes.
+ Also see the [Changelog](https://github.com/cython/cython/blob/master/CHANGES.rst) regarding recent changes
+ - type: textarea
+ id: describe
+ attributes:
+ label: "Describe the bug"
+ description: "A clear and concise description of what the bug is."
+ placeholder: "Tell us what you see!"
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: "Code to reproduce the behaviour:"
+ value: |
+ ```cython
+ # example code
+ ```
+ - type: textarea
+ id: expected
+ attributes:
+ label: "Expected behaviour"
+ description: "A clear and concise description of what you expected to happen."
+ - type: markdown
+ attributes:
+ value: |
+ **Environment** - please complete the following information:
+ - type: input
+ id: environment_os
+ attributes:
+ label: "OS"
+ placeholder: "e.g. Linux, Windows, macOS"
+ - type: input
+ id: environment_python_v
+ attributes:
+ label: "Python version"
+ placeholder: "e.g. 3.10.2"
+ - type: input
+ id: environment_cython_v
+ attributes:
+ label: "Cython version"
+ placeholder: "e.g. 3.0.0a11"
+ - type: textarea
+ id: context
+ attributes:
+ label: Additional context
+ description: Add any other context about the problem here.
+
diff --git a/.github/ISSUE_TEMPLATE/2_feature_request.yml b/.github/ISSUE_TEMPLATE/2_feature_request.yml
new file mode 100644
index 000000000..3d46fe3bc
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/2_feature_request.yml
@@ -0,0 +1,46 @@
+name: Feature request
+description: Suggest an idea for this project
+title: "[ENH] "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **PLEASE READ THIS FIRST:**
+ - DO NOT use the bug and feature tracker for general questions and support requests.
+ Use the [`cython-users`](https://groups.google.com/g/cython-users) mailing list instead.
+ It has a wider audience, so you get more and better answers.
+ - Did you search for SIMILAR ISSUES already?
+ Please do, it helps to save us precious time that we otherwise could not invest into development.
+ - Did you try the LATEST MASTER BRANCH or pre-release?
+ It might already have what you want to report.
+ Specifically, the legacy stable 0.29.x release series receives only important low-risk bug fixes.
+ Also see the [Changelog](https://github.com/cython/cython/blob/master/CHANGES.rst) regarding recent changes
+ - type: textarea
+ id: problem
+ attributes:
+ label: "Is your feature request related to a problem? Please describe."
+ description: "A clear and concise description of what the problem is."
+ value: |
+ In my code, I would like to do [...]
+ ```cython
+ # add use case related code here
+ ```
+ validations:
+ required: true
+ - type: textarea
+ id: solution
+ attributes:
+ label: "Describe the solution you'd like."
+ description: "A clear and concise description of what you want to happen, including code examples if applicable."
+ placeholder: add a proposed code/syntax example here
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: "Describe alternatives you've considered."
+ description: "A clear and concise description of any alternative solutions or features you've considered."
+ placeholder: "add alternative code/syntax proposals here"
+ - type: textarea
+ id: context
+ attributes:
+ label: "Additional context"
+ description: "Add any other context about the feature request here."
diff --git a/.github/ISSUE_TEMPLATE/3_blank_issue.yml b/.github/ISSUE_TEMPLATE/3_blank_issue.yml
new file mode 100644
index 000000000..2b278de5e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/3_blank_issue.yml
@@ -0,0 +1,21 @@
+name: Blank Issue
+description: Not a Bug or a Feature Request. DO NOT post support questions here, see the "I NEED HELP" section
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **PLEASE READ THIS FIRST:**
+ - DO NOT use the bug and feature tracker for general questions and support requests.
+ Use the [`cython-users`](https://groups.google.com/g/cython-users) mailing list instead.
+ It has a wider audience, so you get more and better answers.
+ - Did you search for SIMILAR ISSUES already?
+ Please do, it helps to save us precious time that we otherwise could not invest into development.
+ - Did you try the LATEST MASTER BRANCH or pre-release?
+ It might already have what you want to report.
+ Specifically, the legacy stable 0.29.x release series receives only important low-risk bug fixes.
+ Also see the [Changelog](https://github.com/cython/cython/blob/master/CHANGES.rst) regarding recent changes
+ - type: textarea
+ attributes:
+ label: "Describe your issue"
+ validations:
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..67c3c671c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+ - name: I NEED HELP or I have a question/comment
+ url: https://groups.google.com/g/cython-users
+ about: The Cython-users mailing list is a place to ask and answer support questions.
diff --git a/.github/code-of-conduct.md b/.github/code-of-conduct.md
new file mode 100644
index 000000000..c3590a96f
--- /dev/null
+++ b/.github/code-of-conduct.md
@@ -0,0 +1,78 @@
+# Cython Code of Conduct
+
+## Introduction
+
+This Code of Conduct applies to all spaces managed by the Cython project, including all public and private mailing lists, issue trackers, wikis, and any other communication channel used by our community. The Cython project may also organise or participate in in-person or virtual events. This Code of Conduct applies to events organized by the Cython project, and we expect other events related to our community to have a code of conduct similar in spirit to this one.
+
+This Code of Conduct should be honored by everyone who participates in the Cython community formally or informally, or claims any affiliation with the project, in any project-related activities and especially when representing the project, in any role.
+
+This code is not exhaustive or complete. It serves to distill our common understanding of a collaborative, shared environment and goals. Please try to follow this code in spirit as much as in letter, to create a friendly and productive environment that enriches the surrounding community.
+
+## Specific Guidelines
+
+We strive to:
+
+1. Be open. We invite anyone to participate in our community. We prefer to use public methods of communication for project-related messages, unless discussing something sensitive. This applies to messages for help or project-related support, too; not only is a public support request much more likely to result in an answer to a question, it also ensures that any inadvertent mistakes in answering are more easily detected and corrected.
+2. Be empathetic, welcoming, friendly, and patient. We work together to resolve conflict, and assume good intentions. We may all experience some frustration from time to time, but we do not allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one.
+3. Be collaborative. Our work will be used by other people, and in turn we will depend on the work of others. When we make something for the benefit of the project, we are willing to explain to others how it works, so that they can build on the work to make it even better. Any decision we make will affect users and colleagues, and we take those consequences seriously when making decisions.
+4. Be inquisitive. Nobody knows everything! Asking questions early avoids many problems later, so we encourage questions, although we may direct them to the appropriate forum. We will try hard to be responsive and helpful.
+5. Be careful in the words that we choose. We are careful and respectful in our communication, and we take responsibility for our own speech. Be kind to others. Do not insult or put down other participants. We will not accept harassment or other exclusionary behaviour, such as:
+ * Violent threats or language directed against another person.
+ * Sexist, racist, or otherwise discriminatory jokes and language.
+ * Posting sexually explicit or violent material.
+ * Posting (or threatening to post) other people’s personally identifying information (“doxing”).
+ * Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history, without the sender’s consent.
+ * Personal insults, especially those using racist or sexist terms.
+ * Unwelcome sexual attention.
+ * Excessive profanity. Please avoid swearwords; people differ greatly in their sensitivity to swearing.
+ * Repeated harassment of others. In general, if someone asks you to stop, then stop.
+ * Advocating for, or encouraging, any of the above behaviour.
+
+## Diversity Statement
+
+The Cython project welcomes and encourages participation by everyone. We are committed to being a community that everyone enjoys being part of. Although we may not always be able to accommodate each individual’s preferences, we try our best to treat everyone kindly.
+
+No matter how you identify yourself or how others perceive you: we welcome you. Though no list can hope to be comprehensive, we explicitly honour diversity in: age, culture, ethnicity, genotype, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, subculture and technical ability, to the extent that these do not conflict with this code of conduct.
+
+Though we welcome people fluent in all languages, Cython development is conducted in English.
+
+Standards for behaviour in the Cython community are detailed in the Code of Conduct above. Participants in our community should uphold these standards in all their interactions and help others to do so as well (see next section).
+
+## Reporting Guidelines
+
+We know that it is painfully common for Internet communication to start at or devolve into obvious and flagrant abuse. We also recognize that sometimes people may have a bad day, or be unaware of some of the guidelines in this Code of Conduct. Please keep this in mind when deciding on how to respond to a breach of this Code.
+
+For clearly intentional breaches, report those to the Code of Conduct Committee (see below). For possibly unintentional breaches, you may reply to the person and point out this code of conduct (either in public or in private, whatever is most appropriate). If you would prefer not to do that, please feel free to report to the Code of Conduct Committee directly, or ask the Committee for advice, in confidence.
+
+You can report issues to the Cython Code of Conduct Committee at cython-conduct@googlegroups.com.
+
+Currently, the Committee consists of:
+
+* Stefan Behnel
+* Robert Bradshaw
+* Ralf Gommers
+
+If your report involves any members of the Committee, or if they feel they have a conflict of interest in handling it, then they will step aside and not involve themselves from considering your report. Alternatively, if for any reason you feel uncomfortable making a report to the Committee, then you can also contact senior NumFOCUS staff at [conduct@numfocus.org](https://numfocus.org/code-of-conduct#persons-responsible).
+
+## Incident reporting resolution & Code of Conduct enforcement
+
+_This section summarizes the most important points, more details can be found in_ [Cython Code of Conduct - How to follow up on a report](report-handling-manual.md).
+
+We will investigate and respond to all complaints. The Cython Code of Conduct Committee will protect the identity of the reporter, and treat the content of complaints as confidential (unless the reporter agrees otherwise).
+
+In case of severe and obvious breaches, e.g. personal threat or violent, sexist or racist language, we will immediately disconnect the originator from Cython communication channels; please see the manual for details.
+
+In cases not involving clear severe and obvious breaches of this Code of Conduct the process for acting on any received Code of Conduct violation report will be:
+
+1. acknowledge report is received,
+2. reasonable discussion/feedback,
+3. mediation (if feedback didn’t help, and only if both reporter and reportee agree to this),
+4. enforcement via transparent decision (see [Resolutions](report-handling-manual.md#resolutions)) by the Code of Conduct Committee.
+
+The Committee will respond to any report as soon as possible, and at most within 72 hours.
+
+## Endnotes
+
+We are thankful to the groups behind the following documents, from which we drew content and inspiration:
+
+- [The SciPy Code of Conduct](https://docs.scipy.org/doc/scipy/reference/dev/conduct/code_of_conduct.html)
diff --git a/.github/report-handling-manual.md b/.github/report-handling-manual.md
new file mode 100644
index 000000000..5c33c14b4
--- /dev/null
+++ b/.github/report-handling-manual.md
@@ -0,0 +1,92 @@
+# Cython Code of Conduct - How to follow up on a report
+
+This is the manual followed by Cython’s Code of Conduct Committee. It’s used when we respond to an issue to make sure we’re consistent and fair.
+
+Enforcing the [Code of Conduct](code-of-conduct.md) impacts our community today and for the future. It’s an action that we do not take lightly. When reviewing enforcement measures, the Code of Conduct Committee will keep the following values and guidelines in mind:
+
+* Act in a personal manner rather than impersonal. The Committee can engage the parties to understand the situation while respecting the privacy and any necessary confidentiality of reporters. However, sometimes it is necessary to communicate with one or more individuals directly: the Committee’s goal is to improve the health of our community rather than only produce a formal decision.
+* Emphasize empathy for individuals rather than judging behavior, avoiding binary labels of “good” and “bad/evil”. Overt, clear-cut aggression and harassment exist, and we will address them firmly. But many scenarios that can prove challenging to resolve are those where normal disagreements devolve into unhelpful or harmful behavior from multiple parties. Understanding the full context and finding a path that re-engages all is hard, but ultimately the most productive for our community.
+* We understand that email is a difficult medium and can be isolating. Receiving criticism over email, without personal contact, can be particularly painful. This makes it especially important to keep an atmosphere of open-minded respect for the views of others. It also means that we must be transparent in our actions, and that we will do everything in our power to make sure that all our members are treated fairly and with sympathy.
+* Discrimination can be subtle and it can be unconscious. It can show itself as unfairness and hostility in otherwise ordinary interactions. We know that this does occur, and we will take care to look out for it. We would very much like to hear from you if you feel you have been treated unfairly, and we will use these procedures to make sure that your complaint is heard and addressed.
+* Help increase engagement in good discussion practice: try to identify where discussion may have broken down, and provide actionable information, pointers, and resources that can lead to positive change on these points.
+* Be mindful of the needs of new members: provide them with explicit support and consideration, with the aim of increasing participation from underrepresented groups in particular.
+* Individuals come from different cultural backgrounds and native languages. Try to identify any honest misunderstandings caused by a non-native speaker and help them understand the issue and what they can change to avoid causing offence. Complex discussion in a foreign language can be very intimidating, and we want to grow our diversity also across nationalities and cultures.
+
+
+## Mediation
+
+Voluntary informal mediation is a tool at our disposal. In contexts such as when two or more parties have all escalated to the point of inappropriate behavior (something sadly common in human conflict), it may be useful to facilitate a mediation process. This is only an example: the Committee can consider mediation in any case, mindful that the process is meant to be strictly voluntary and no party can be pressured to participate. If the Committee suggests mediation, it should:
+
+* Find a candidate who can serve as a mediator.
+* Obtain the agreement of the reporter(s). The reporter(s) have complete freedom to decline the mediation idea or to propose an alternate mediator.
+* Obtain the agreement of the reported person(s).
+* Settle on the mediator: while parties can propose a different mediator than the suggested candidate, only if a common agreement is reached on all terms can the process move forward.
+* Establish a timeline for mediation to complete, ideally within two weeks.
+
+The mediator will engage with all the parties and seek a resolution that is satisfactory to all. Upon completion, the mediator will provide a report (vetted by all parties to the process) to the Committee, with recommendations on further steps. The Committee will then evaluate these results (whether a satisfactory resolution was achieved or not) and decide on any additional action deemed necessary.
+
+
+## How the Committee will respond to reports
+
+When the Committee (or a Committee member) receives a report, they will first determine whether the report is about a clear and severe breach (as defined below). If so, immediate action needs to be taken in addition to the regular report handling process.
+
+
+## Clear and severe breach actions
+
+We know that it is painfully common for internet communication to start at or devolve into obvious and flagrant abuse. We will deal quickly with clear and severe breaches like personal threats, violent, sexist or racist language.
+
+When a member of the Code of Conduct Committee becomes aware of a clear and severe breach, they will do the following:
+
+* Immediately disconnect the originator from all Cython communication channels.
+* Reply to the reporter that their report has been received and that the originator has been disconnected.
+* In every case, the moderator should make a reasonable effort to contact the originator, and tell them specifically how their language or actions qualify as a “clear and severe breach”. The moderator should also say that, if the originator believes this is unfair or they want to be reconnected to Cython, they have the right to ask for a review, as below, by the Code of Conduct Committee. The moderator should copy this explanation to the Code of Conduct Committee.
+* The Code of Conduct Committee will formally review and sign off on all cases where this mechanism has been applied to make sure it is not being used to control ordinary heated disagreement.
+
+
+## Report handling
+
+When a report is sent to the Committee they will immediately reply to the reporter to confirm receipt. This reply must be sent within 72 hours, and the group should strive to respond much quicker than that.
+
+If a report doesn’t contain enough information, the Committee will obtain all relevant data before acting. It may contact any individuals involved to get a more complete account of events.
+
+The Committee will then review the incident and determine, to the best of their ability:
+
+* What happened.
+* Whether this event constitutes a Code of Conduct violation.
+* Who are the responsible party(ies).
+* Whether this is an ongoing situation, and there is a threat to anyone’s physical safety.
+
+This information will be collected in writing, and whenever possible the group’s deliberations will be recorded and retained (i.e. chat transcripts, email discussions, recorded conference calls, summaries of voice conversations, etc).
+
+It is important to retain an archive of all activities of this Committee to ensure consistency in behavior and provide institutional memory for the project. To assist in this, the default channel of discussion for this Committee will be a private mailing list accessible to current and future members of the Committee. If the Committee finds the need to use off-list communications (e.g. phone calls for early/rapid response), it should in all cases summarize these back to the list so there’s a good record of the process.
+
+The Code of Conduct Committee should aim to have a resolution agreed upon within two weeks. In the event that a resolution can’t be determined in that time, the Committee will respond to the reporter(s) with an update and projected timeline for resolution.
+
+
+## Resolutions
+
+The Committee must agree on a resolution by consensus. If the group cannot reach consensus and deadlocks for over a week, the group will turn the matter over to the NumFOCUS Code of Conduct Enforcement Team for resolution.
+
+Possible responses may include:
+
+* Taking no further action:
+ - if we determine no violations have occurred;
+ - if the matter has been resolved publicly while the Committee was considering responses.
+* Coordinating voluntary mediation: if all involved parties agree, the Committee may facilitate a mediation process as detailed above.
+* Remind publicly, and point out that some behavior/actions/language have been judged inappropriate and why in the current context, or can but hurtful to some people, requesting the community to self-adjust.
+* A private reprimand from the Committee to the individual(s) involved. In this case, the group chair will deliver that reprimand to the individual(s) over email, cc’ing the group.
+* A public reprimand. In this case, the Committee chair will deliver that reprimand in the same venue that the violation occurred, within the limits of practicality. E.g., the original mailing list for an email violation, but for a chat room discussion where the person/context may be gone, they can be reached by other means. The group may choose to publish this message elsewhere for documentation purposes.
+* A request for a public or private apology, assuming the reporter agrees to this idea: they may at their discretion refuse further contact with the violator. The chair will deliver this request. The Committee may, if it chooses, attach “strings” to this request: for example, the group may ask a violator to apologize in order to retain one’s membership on a mailing list.
+* A “mutually agreed upon hiatus” where the Committee asks the individual to temporarily refrain from community participation. If the individual chooses not to take a temporary break voluntarily, the Committee may issue a “mandatory cooling off period”.
+* A permanent or temporary ban from some or all Cython spaces (mailing list, GitHub, etc.). The group will maintain records of all such bans so that they may be reviewed in the future or otherwise maintained.
+
+Once a resolution is agreed upon, but before it is enacted, the Committee will contact the original reporter and any other affected parties and explain the proposed resolution. The Committee will ask if this resolution is acceptable, and must note feedback for the record.
+
+Finally, the Committee will make a report to the Cython project leadership (as well as the Cython core team in the event of an ongoing resolution, such as a ban).
+
+The Committee will never publicly discuss the issue; all public statements will be made by the chair of the Code of Conduct Committee.
+
+
+## Conflicts of Interest
+
+In the event of any conflict of interest, a Committee member must immediately notify the other members, and recuse themselves if necessary.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 32fcf3d7d..ce603e0fb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,11 +1,25 @@
name: CI
-on: [push, pull_request]
+on:
+ push:
+ paths:
+ - '**'
+ - '!.github/**'
+ - '.github/workflows/ci.yml'
+ pull_request:
+ paths:
+ - '**'
+ - '!.github/**'
+ - '.github/workflows/ci.yml'
+ workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
jobs:
ci:
strategy:
@@ -27,9 +41,18 @@ jobs:
#
# FIXME: 'cpp' tests seems to fail due to compilation errors (numpy_pythran_unit)
# in all python versions and test failures (builtin_float) in 3.5<
- os: [ubuntu-18.04]
+ os: [windows-2019, ubuntu-20.04, macos-11]
backend: [c, cpp]
- python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
+ python-version:
+ - "2.7"
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "3.9"
+ - "3.10"
+ - "3.11"
+ - "3.12-dev"
env: [{}]
include:
@@ -39,129 +62,162 @@ jobs:
# Ubuntu sub-jobs:
# ================
- # GCC 11
- - os: ubuntu-18.04
+ # GCC 11 (with latest language standards)
+ - os: ubuntu-20.04
python-version: 3.9
backend: c
- env: { GCC_VERSION: 11 }
+ env: { GCC_VERSION: 11, EXTRA_CFLAGS: "-std=c17" }
extra_hash: "-gcc11"
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: 3.9
backend: cpp
- env: { GCC_VERSION: 11 }
+ env: { GCC_VERSION: 11, EXTRA_CFLAGS: "-std=c++20" }
extra_hash: "-gcc11"
# compile all modules
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: 2.7
backend: c
env: { CYTHON_COMPILE_ALL: 1 }
extra_hash: "-all"
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: 2.7
backend: cpp
env: { CYTHON_COMPILE_ALL: 1 }
extra_hash: "-all"
- - os: ubuntu-18.04
- python-version: 3.9
+ - os: ubuntu-20.04
+ python-version: "3.10"
backend: c
env: { CYTHON_COMPILE_ALL: 1 }
extra_hash: "-all"
- - os: ubuntu-18.04
- python-version: 3.9
+ - os: ubuntu-20.04
+ python-version: "3.10"
backend: cpp
env: { CYTHON_COMPILE_ALL: 1 }
extra_hash: "-all"
# Linting
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: 3.7
backend: "c,cpp"
env: { TEST_CODE_STYLE: 1, NO_CYTHON_COMPILE: 1 }
extra_hash: "-codestyle"
+ # Limited API
+ - os: ubuntu-20.04
+ python-version: 3.6
+ backend: "c,cpp"
+ env: { LIMITED_API: "--limited-api", EXCLUDE: "--no-file" }
+ extra_hash: "-limited_api"
+ - os: ubuntu-20.04
+ python-version: 3.7
+ backend: "c,cpp"
+ env: { LIMITED_API: "--limited-api", EXCLUDE: "--no-file" }
+ extra_hash: "-limited_api"
+ - os: ubuntu-20.04
+ python-version: 3.8
+ backend: "c,cpp"
+ env: { LIMITED_API: "--limited-api", EXCLUDE: "--no-file" }
+ extra_hash: "-limited_api"
+ - os: ubuntu-20.04
+ python-version: "3.11"
+ backend: "c,cpp"
+ env: { LIMITED_API: "--limited-api", EXCLUDE: "--no-file" }
+ extra_hash: "-limited_api"
+ - os: ubuntu-20.04
+ python-version: "3.12-dev"
+ allowed_failure: true
+ backend: "c,cpp"
+ env: { LIMITED_API: "--limited-api", EXCLUDE: "--no-file" }
+ extra_hash: "-limited_api"
+ # Type specs
+ - os: ubuntu-20.04
+ python-version: 3.9
+ backend: c
+ env: { EXTRA_CFLAGS: "-DCYTHON_USE_TYPE_SPECS=1" }
+ extra_hash: "-typespecs"
+ - os: ubuntu-20.04
+ python-version: 3.8
+ backend: c
+ env: { EXTRA_CFLAGS: "-DCYTHON_USE_TYPE_SPECS=1" }
+ extra_hash: "-typespecs"
+ - os: ubuntu-20.04
+ python-version: 3.7
+ backend: c
+ env: { EXTRA_CFLAGS: "-DCYTHON_USE_TYPE_SPECS=1" }
+ extra_hash: "-typespecs"
+ - os: ubuntu-20.04
+ python-version: 3.6
+ backend: c
+ env: { EXTRA_CFLAGS: "-DCYTHON_USE_TYPE_SPECS=1" }
+ extra_hash: "-typespecs"
# Stackless
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: 2.7
backend: c
env: { STACKLESS: true, PY: 2 }
extra_hash: "-stackless"
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: 3.6
backend: c
env: { STACKLESS: true, PY: 3 }
extra_hash: "-stackless"
+ - os: ubuntu-20.04
+ python-version: 3.8
+ backend: c
+ env: { STACKLESS: true, PY: 3 }
+ extra_hash: "-stackless"
# Pypy
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
python-version: pypy-2.7
backend: c
env: { NO_CYTHON_COMPILE: 1 }
- allowed_failure: true
- extra_hash: "-allowed_failures"
- - os: ubuntu-18.04
- python-version: pypy-3.7
+ - os: ubuntu-20.04
+ python-version: pypy-3.9
backend: c
env: { NO_CYTHON_COMPILE: 1 }
- allowed_failure: true
- extra_hash: "-allowed_failures"
- # Coverage - Disabled due to taking too long to run
- # - os: ubuntu-18.04
- # python-version: 3.7
- # backend: "c,cpp"
- # env: { COVERAGE: 1 }
- # extra_hash: '-coverage'
-
- # MacOS sub-jobs
- # ==============
- # (C-only builds are used to create wheels)
- - os: macos-11
- python-version: 2.7
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
- python-version: 2.7
- backend: cpp
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
- python-version: 3.5
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
+ # Coverage
+ - os: ubuntu-20.04
+ python-version: 3.8
+ backend: "c,cpp"
+ env: { COVERAGE: 1 }
+ extra_hash: '-coverage'
+
+ - os: windows-2019
+ # missing dependencies
python-version: 3.6
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
- python-version: 3.7
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
+ allowed_failure: true
+ - os: windows-2019
+ # TestInline
python-version: 3.8
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
- python-version: 3.9
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
- python-version: 3.9
- backend: cpp
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
- python-version: "3.10"
- backend: c
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
- - os: macos-11
+ allowed_failure: true
+ - os: windows-2019
+ # TestInline
python-version: "3.10"
+ allowed_failure: true
+ - os: windows-2019
+ # TestInline
+ python-version: "3.11"
+ allowed_failure: true
+
+ exclude:
+ # fails due to lack of a compatible compiler
+ - os: windows-2019
+ python-version: 2.7
+
+ # cpp specific test fails
+ - os: windows-2019
+ python-version: 3.5
backend: cpp
- env: { MACOSX_DEPLOYMENT_TARGET: 10.14 }
+
# This defaults to 360 minutes (6h) which is way too long and if a test gets stuck, it can block other pipelines.
- # From testing, the runs tend to take ~20/~30 minutes, so a limit of 40 minutes should be enough. This can always be
- # changed in the future if needed.
- timeout-minutes: 40
+ # From testing, the runs tend to take ~20 minutes for ubuntu / macos and ~40 for windows,
+ # so a limit of 60 minutes should be enough. This can always be changed in the future if needed.
+ timeout-minutes: 60
runs-on: ${{ matrix.os }}
env:
BACKEND: ${{ matrix.backend }}
- OS_NAME: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
+ MACOSX_DEPLOYMENT_TARGET: 10.15
GCC_VERSION: 8
USE_CCACHE: 1
CCACHE_SLOPPINESS: "pch_defines,time_macros"
@@ -170,21 +226,21 @@ jobs:
steps:
- name: Checkout repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- - name: Cache [ccache]
- uses: pat-s/always-upload-cache@v2.1.3
- if: startsWith(runner.os, 'Linux')
+ - name: Compilation Cache
+ uses: hendrikmuhs/ccache-action@v1.2
with:
- path: ~/.ccache
- key: ${{ runner.os }}-ccache${{ matrix.extra_hash }}-${{ matrix.python-version }}-${{ matrix.backend == 'c' || matrix.backend == 'c,cpp' }}-${{ contains(matrix.backend, 'cpp') }}-${{ hashFiles('**/test-requirements*.txt', '**/ci.yml', '**/ci-run.sh') }}
+ variant: ${{ startsWith(runner.os, 'windows') && 'sccache' || 'ccache' }} # fake ternary
+ key: ${{ runner.os }}-hendrikmuhs-ccache${{ matrix.extra_hash }}-${{ matrix.python-version }}-${{ matrix.backend == 'c' || matrix.backend == 'c,cpp' }}-${{ contains(matrix.backend, 'cpp') }}-${{ hashFiles('test-requirements*.txt', '.github/**/ci.yml', '.github/**/ci-run.sh') }}
+ max-size: ${{ env.CCACHE_MAXSIZE }}
- name: Run CI
continue-on-error: ${{ matrix.allowed_failure || false }}
@@ -192,15 +248,72 @@ jobs:
run: bash ./Tools/ci-run.sh
- name: Upload HTML docs
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: htmldocs
path: docs/build/html
if-no-files-found: ignore
- name: Upload wheels
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
- name: wheels-${{ runner.os }}
+ name: wheels-${{ runner.os }}${{ matrix.extra_hash }}
path: dist/*.whl
if-no-files-found: ignore
+
+
+ pycoverage:
+ runs-on: ubuntu-20.04
+
+ env:
+ BACKEND: c,cpp
+ OS_NAME: ubuntu-20.04
+ PYTHON_VERSION: "3.10"
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v3
+
+ - name: Setup python
+ uses: actions/setup-python@v3
+ with:
+ python-version: "3.10"
+
+ - name: Run Coverage
+ env: { COVERAGE: 1, NO_CYTHON_COMPILE: 1 }
+ run: bash ./Tools/ci-run.sh
+
+ - name: Upload Coverage Report
+ uses: actions/upload-artifact@v3
+ with:
+ name: pycoverage_html
+ path: coverage-report-html
+
+ cycoverage:
+ runs-on: ubuntu-20.04
+
+ env:
+ BACKEND: c,cpp
+ OS_NAME: ubuntu-20.04
+ PYTHON_VERSION: 3.9
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - name: Setup python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+
+ - name: Run Coverage
+ env: { COVERAGE: 1 }
+ run: bash ./Tools/ci-run.sh
+
+ - name: Upload Coverage Report
+ uses: actions/upload-artifact@v2
+ with:
+ name: cycoverage_html
+ path: coverage-report-html
diff --git a/.github/workflows/wheel-manylinux.yml b/.github/workflows/wheel-manylinux.yml
deleted file mode 100644
index 8e3cdffa4..000000000
--- a/.github/workflows/wheel-manylinux.yml
+++ /dev/null
@@ -1,90 +0,0 @@
-name: Linux wheel build
-
-on:
- release:
- types: [created]
-
-jobs:
- python:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
-
- - name: Set up Python
- uses: actions/setup-python@v1
- with:
- python-version: 3.8
-
- - name: Install build dependencies
- run: pip install -U setuptools pip wheel
-
- - name: Make sdist and Python wheel
- run: make sdist pywheel
-
- - name: Release
- uses: softprops/action-gh-release@v1
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: |
- dist/*.tar.gz
- dist/*-none-any.whl
-
- - name: Upload sdist
- uses: actions/upload-artifact@v2
- with:
- name: sdist
- path: dist/*.tar.gz
- if-no-files-found: ignore
-
- - name: Upload Python wheel
- uses: actions/upload-artifact@v2
- with:
- name: wheel-Python
- path: dist/*-none-any.whl
- if-no-files-found: ignore
-
- binary:
- strategy:
- # Allows for matrix sub-jobs to fail without canceling the rest
- fail-fast: false
-
- matrix:
- image:
- - manylinux1_x86_64
- - manylinux1_i686
- - musllinux_1_1_x86_64
- - manylinux_2_24_x86_64
- - manylinux_2_24_i686
- - manylinux_2_24_aarch64
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Set up Python 3.9
- uses: actions/setup-python@v2
- with:
- python-version: 3.9
-
- - name: Building wheel
- run: |
- make sdist wheel_${{ matrix.image }}
-
- - name: Copy wheels in dist
- run: cp wheelhouse*/*.whl dist/
-
- - name: Release
- uses: softprops/action-gh-release@v1
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: |
- dist/*manylinux*.whl
- dist/*musllinux*.whl
-
- - name: Archive Wheels
- uses: actions/upload-artifact@v2
- with:
- name: ${{ matrix.image }}
- path: dist/*m[au][ns][yl]linux*.whl
- if-no-files-found: ignore
diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
new file mode 100644
index 000000000..7e12f08c0
--- /dev/null
+++ b/.github/workflows/wheels.yml
@@ -0,0 +1,146 @@
+# Workflow to build wheels for upload to PyPI.
+#
+# In an attempt to save CI resources, wheel builds do
+# not run on each push but only weekly and for releases.
+# Wheel builds can be triggered from the Actions page
+# (if you have the perms) on a commit to master.
+#
+# Alternatively, if you would like to trigger wheel builds
+# on a pull request, the labels that trigger builds are:
+# - Build System
+
+name: Wheel Builder
+on:
+ release:
+ types: [created]
+ 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: "42 1 * * 4"
+ pull_request:
+ types: [labeled, opened, synchronize, reopened]
+ paths:
+ #- Cython/Build/**
+ - .github/workflows/wheels.yml
+ - MANIFEST.in
+ - setup.*
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+permissions:
+ contents: write # to create GitHub release (softprops/action-gh-release)
+
+jobs:
+ build_wheels:
+ name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
+ if: >-
+ github.event_name == 'release' ||
+ github.event_name == 'schedule' ||
+ github.event_name == 'workflow_dispatch' ||
+ (github.event_name == 'pull_request' &&
+ contains(github.event.pull_request.labels.*.name, 'Build System'))
+ runs-on: ${{ matrix.buildplat[0] }}
+ strategy:
+ # Ensure that a wheel builder finishes even if another fails
+ fail-fast: false
+ matrix:
+ # Github Actions doesn't support pairing matrix values together, let's improvise
+ # https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
+ buildplat:
+ - [ubuntu-20.04, manylinux_x86_64]
+ - [ubuntu-20.04, manylinux_aarch64]
+ - [ubuntu-20.04, manylinux_i686]
+ - [ubuntu-20.04, musllinux_x86_64]
+ - [ubuntu-20.04, musllinux_aarch64]
+ - [macos-11, macosx_*]
+ - [windows-2019, win_amd64]
+ - [windows-2019, win32]
+ python: ["cp36", "cp37", "cp38", "cp39", "cp310", "cp311"] # Note: Wheels not needed for PyPy
+ steps:
+ - name: Checkout Cython
+ uses: actions/checkout@v3
+
+ - name: Set up QEMU
+ if: contains(matrix.buildplat[1], '_aarch64')
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: all
+
+ - name: Build wheels
+ uses: pypa/cibuildwheel@v2.11.4
+ env:
+ # TODO: Build Cython with the compile-all flag?
+ CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
+ CIBW_PRERELEASE_PYTHONS: True
+ CIBW_ARCHS_LINUX: auto aarch64
+ CIBW_ENVIRONMENT: CFLAGS='-O3 -g0 -mtune=generic -pipe -fPIC' LDFLAGS='-fPIC'
+ # TODO: Cython tests take a long time to complete
+ # consider running a subset in the future?
+ #CIBW_TEST_COMMAND: python {project}/runtests.py -vv --no-refnanny
+
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ files: wheelhouse/*.whl
+ prerelease: >-
+ ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b')
+ || contains(github.ref_name, 'rc') || contains(github.ref_name, 'dev') }}
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
+ path: ./wheelhouse/*.whl
+
+ build_sdist_pure_wheel:
+ name: Build sdist and pure wheel
+ if: >-
+ github.event_name == 'release' ||
+ github.event_name == 'schedule' ||
+ github.event_name == 'workflow_dispatch' ||
+ (github.event_name == 'pull_request' &&
+ contains(github.event.pull_request.labels.*.name, 'Build System'))
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Cython
+ uses: actions/checkout@v3
+
+ # Used to push the built wheels
+ - uses: actions/setup-python@v3
+ with:
+ # Build sdist on lowest supported Python
+ python-version: '3.8'
+
+ - name: Build sdist
+ run: |
+ pip install --upgrade wheel setuptools
+ python setup.py sdist
+ python setup.py bdist_wheel --no-cython-compile --universal
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: sdist
+ path: ./dist/*.tar.gz
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: pure-wheel
+ path: ./dist/*.whl
+
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ files: |
+ dist/*.tar.gz
+ dist/*-none-any.whl
+ prerelease: >-
+ ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b')
+ || contains(github.ref_name, 'rc') || contains(github.ref_name, 'dev') }}