Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025, macos-latest]
os: [ubuntu-24.04, windows-2025, macos-latest, windows-11-arm]
steps:

- name: Checkout
Expand All @@ -40,8 +40,8 @@ jobs:
env:
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64 x86
CIBW_SKIP: pp* cp36-* cp37-* cp313-* *-win32 *_i686 *-musllinux_*
CIBW_ARCHS_WINDOWS: ${{ matrix.os == 'windows-11-arm' && 'ARM64' || 'AMD64 x86' }}
CIBW_SKIP: pp* cp36-* cp37-* cp313-* *-win32 *_i686 *-musllinux_* cp38-win_arm64 cp39-win_arm64 cp310-win_arm64
CIBW_TEST_COMMAND: pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim
CIBW_TEST_REQUIRES: pytest testfixtures mock
CIBW_TEST_SKIP: cp38* cp39* cp310* cp311* cp313* *_aarch64 *_arm64 *_universal2
Expand Down Expand Up @@ -82,6 +82,9 @@ jobs:
- {python: '3.12', os: windows-2025}
- {python: '3.13', os: windows-2025}

# - {python: '3.11', os: windows-11-arm} installwheel.py doesn't contains a logic for Win-ARM64
# - {python: '3.12', os: windows-11-arm}

runs-on: ${{ matrix.os }}
steps:
- name: Setup up Python ${{ matrix.python }}
Expand All @@ -98,6 +101,7 @@ jobs:
# We want to make sure our wheels run against older Numpy versions
#
- name: Install oldest-supported-numpy
if: matrix.os != 'windows-11-arm'
run: python -m pip install oldest-supported-numpy

#
Expand All @@ -107,8 +111,8 @@ jobs:
#
# https://github.com/RaRe-Technologies/gensim/issues/3489
#
- name: Install newest numpy (windows py3.10 only)
if: ${{ (matrix.os == 'windows-2025') && (matrix.python == '3.10') }}
- name: Install newest numpy (windows-x64 py3.10 only and windows-arm64)
if: ${{ (matrix.os == 'windows-2025') && (matrix.python == '3.10') || matrix.os == 'windows-11-arm'}}
run: |
python -m pip uninstall --yes oldest-supported-numpy
python -m pip install --upgrade numpy
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ requires = [
"Cython>=0.29.32,<3.0.0",
# oldest supported Numpy for this platform is 1.17 but the oldest supported by Gensim
# is 1.18.5, remove the line when they increase oldest supported Numpy for this platform
"numpy==1.18.5; python_version=='3.8' and platform_machine not in 'arm64|aarch64'",
"oldest-supported-numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'",
# Use latest NumPy for Windows ARM64 builds
"numpy>=1.19.0; (python_version > '3.10' and sys_platform == 'win32' and platform_machine == 'ARM64')",
# Gensim specific numpy constraint on CPython 3.8 non-ARM platforms
"numpy==1.18.5; python_version == '3.8' and platform_machine != 'arm64' and platform_machine != 'aarch64'",
# Use oldest-supported-numpy for other cases
"oldest-supported-numpy; (python_version > '3.8' or platform_machine == 'arm64' or platform_machine == 'aarch64') and sys_platform != 'win32'",
"oldest-supported-numpy; python_version > '3.8' and sys_platform == 'win32' and platform_machine=='AMD64'",
"setuptools",
"wheel",
]
Loading