Skip to content
Merged
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
17 changes: 15 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
arch: aarch64
- os: windows-2025
arch: x86_64
- os: windows-11-arm
arch: arm64
- os: macos-15
arch: arm64
runs-on: ${{ matrix.os }}
Expand All @@ -46,6 +48,8 @@ jobs:
- name: Setup MSVC
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1.13.0 # to use cl
with:
arch: ${{ matrix.arch == 'arm64' && 'arm64' || 'x64' }}
- name: Build C++
run: bash .github/scripts/build-cpu.sh
env:
Expand Down Expand Up @@ -188,20 +192,27 @@ jobs:
- build-xpu
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025, macos-15]
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025, windows-11-arm, macos-15]
include:
- os: ubuntu-22.04
arch: x86_64
python-version: "3.10"
- os: ubuntu-22.04-arm
arch: aarch64
python-version: "3.10"
- os: windows-2025
arch: x86_64
python-version: "3.10"
- os: windows-11-arm
arch: arm64
# Python for Windows ARM64 is only available from 3.12+
python-version: "3.12"
- os: macos-15
arch: arm64
python-version: "3.10"
# The specific Python version is irrelevant in this context as we are only packaging non-C extension
# code. This ensures compatibility across Python versions, as compatibility is
# dictated by the packaged code itself, not the Python version used for packaging.
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -327,6 +338,8 @@ jobs:
echo "### Linux (aarch64)" >> body.md
elif [[ "$fname" == *"win_amd64"* ]]; then
echo "### Windows (x86_64)" >> body.md
elif [[ "$fname" == *"win_arm64"* ]]; then
echo "### Windows (arm64)" >> body.md
elif [[ "$fname" == *"macosx"* ]]; then
echo "### macOS 14+ (arm64)" >> body.md
else
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,13 @@ if(WIN32)
endif()

if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2 /fp:fast")
# /arch:AVX2 is only valid for x86/x64 targets, not ARM64
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _msvc_arch)
if(_msvc_arch MATCHES "x86|x64|amd64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2 /fp:fast")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast")
endif()
endif()

set_source_files_properties(${CPP_FILES} PROPERTIES LANGUAGE CXX)
Expand Down
Loading
Loading