forked from cython/cython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull request cython#22: Fannkuch test fixes rebased
* commit '0cbe8d46df78fe73ddc216823984ff7327a9725f': (286 commits) Fixed problems from rebase Use HPyIter_Next Fixed float issues on GraalPy Fixed issues reintroduced on fannkuch Made float test work for HPy Make coverage work, start work on float Fixed most errors for fannkuch benchmark Fix: use API_CALL_TUPLE_DICT for __Pyx_PyObject_Call Remove helper funcs HPySlice_New and HPy_GetSlice Use HPyList_Insert for LIST_INSERT Introduce SEQUENCE_(GET/SET)_SLICE Use HPy_GetItem_i for LIST_GET_ITEM Merge decl of __Pyx__PyObject_PopNewIndex Use HPy_GetItem_i for TUPLE_GET_ITEM(_SAFE) Prefer SEQUENCE_SET_SLICE over __Pyx_PyObject_SetSlice if possible Fixed segfaults on CPython ABI Fix: wrong usage of HPy_Call Fix compilation warnings Also define __pyx_vectorcallfunc if CYTHON_METH_FASTCALL Fix operator precedence issues with expanded macros ...
- Loading branch information
Showing
122 changed files
with
3,299 additions
and
1,317 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,14 @@ on: | |
paths: | ||
#- Cython/Build/** | ||
- .github/workflows/wheels.yml | ||
- pyproject.toml | ||
- MANIFEST.in | ||
- setup.* | ||
push: | ||
paths: | ||
#- Cython/Build/** | ||
- .github/workflows/wheels.yml | ||
- pyproject.toml | ||
- MANIFEST.in | ||
- setup.* | ||
workflow_dispatch: | ||
|
@@ -38,52 +46,77 @@ permissions: | |
contents: write # to create GitHub release (softprops/action-gh-release) | ||
|
||
jobs: | ||
generate-wheels-matrix: | ||
# Create a matrix of all architectures & versions to build. | ||
# This enables the next step to run cibuildwheel in parallel. | ||
# From https://iscinumpy.dev/post/cibuildwheel-2-10-0/#only-210 | ||
name: Generate wheels matrix | ||
if: >- | ||
github.event_name == 'push' || | ||
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 | ||
outputs: | ||
include: ${{ steps.set-matrix.outputs.include }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install cibuildwheel | ||
# Nb. keep cibuildwheel version pin consistent with job below | ||
run: pipx install cibuildwheel==2.16.2 | ||
- id: set-matrix | ||
run: | | ||
MATRIX=$( | ||
{ | ||
cibuildwheel --print-build-identifiers --prerelease-pythons --platform linux \ | ||
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ | ||
&& cibuildwheel --print-build-identifiers --prerelease-pythons --platform macos \ | ||
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \ | ||
&& cibuildwheel --print-build-identifiers --prerelease-pythons --platform windows \ | ||
| jq -nRc '{"only": inputs, "os": "windows-2019"}' | ||
} | jq -sc | ||
) | ||
echo "$MATRIX" | ||
echo "include=$MATRIX" >> $GITHUB_OUTPUT | ||
build_wheels: | ||
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
name: Wheel ${{ matrix.only }} | ||
if: >- | ||
github.event_name == 'push' || | ||
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] }} | ||
needs: generate-wheels-matrix | ||
runs-on: ${{ matrix.os }} | ||
|
||
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: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312"] # Note: Wheels not needed for PyPy | ||
include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }} | ||
|
||
steps: | ||
- name: Checkout Cython | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
if: contains(matrix.buildplat[1], '_aarch64') | ||
uses: docker/setup-qemu-action@v1 | ||
if: runner.os == 'Linux' && !contains(matrix.only, 'x86') && !contains(matrix.only, 'i686') | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
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 | ||
# Nb. keep cibuildwheel version pin consistent with generate-matrix job above | ||
uses: pypa/[email protected] | ||
with: | ||
only: ${{ matrix.only }} | ||
# TODO: Cython tests take a long time to complete | ||
# consider running a subset in the future? | ||
#CIBW_TEST_COMMAND: python {project}/runtests.py -vv | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
|
@@ -96,12 +129,13 @@ jobs: | |
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} | ||
name: ${{ matrix.only }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist_pure_wheel: | ||
name: Build sdist and pure wheel | ||
if: >- | ||
github.event_name == 'push' || | ||
github.event_name == 'release' || | ||
github.event_name == 'schedule' || | ||
github.event_name == 'workflow_dispatch' || | ||
|
@@ -122,7 +156,7 @@ jobs: | |
run: | | ||
pip install --upgrade wheel setuptools | ||
python setup.py sdist | ||
python setup.py bdist_wheel --no-cython-compile --universal | ||
python setup.py bdist_wheel --no-cython-compile | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
|
Oops, something went wrong.