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
131 changes: 131 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1205,3 +1205,134 @@ jobs:

- name: Clean directory
run: git clean -fdx

# Clang with MSVC/Windows SDK toolchain + python.org CPython (Windows ARM)
windows_arm_clang_msvc:
if: github.event.pull_request.draft == false

strategy:
fail-fast: false
matrix:
os: [windows-11-arm]
python: ['3.13']

runs-on: "${{ matrix.os }}"
timeout-minutes: 90

name: "🐍 ${{ matrix.python }} • ${{ matrix.os }} • clang-msvc"

steps:
- name: Show env
run: env

- name: Checkout
uses: actions/checkout@v6

- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
architecture: arm64

- name: Run pip installs
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/requirements.txt

- name: Configure CMake
run: >
cmake -G Ninja -S . -B .
-DPYBIND11_WERROR=OFF
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=20
-DPython_ROOT_DIR="$env:Python_ROOT_DIR"

- name: Build
run: cmake --build . -j 2

- name: Python tests
run: cmake --build . --target pytest -j 2

- name: C++ tests
run: cmake --build . --target cpptest -j 2

- name: Interface test
run: cmake --build . --target test_cmake_build -j 2

- name: Visibility test
run: cmake --build . --target test_cross_module_rtti -j 2

# Clang in MSYS2/MinGW-w64 CLANGARM64 toolchain + MSYS2 Python (Windows ARM)
windows_arm_clang_msys2:
if: github.event.pull_request.draft == false

strategy:
fail-fast: false
matrix:
os: [windows-11-arm]

runs-on: "${{ matrix.os }}"
timeout-minutes: 90

name: "${{ matrix.os }} • clang-msys2"

defaults:
run:
shell: msys2 {0}

steps:
- uses: actions/checkout@v6
with:
submodules: true

- uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
install: |
mingw-w64-clang-aarch64-cmake
mingw-w64-clang-aarch64-clang
mingw-w64-clang-aarch64-ninja
mingw-w64-clang-aarch64-python-pip
mingw-w64-clang-aarch64-python-pytest
mingw-w64-clang-aarch64-python-numpy

- name: Debug info
run: |
clang++ --version
cmake --version
ninja --version
python --version

- name: Run pip installs
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/requirements.txt

- name: Configure CMake
run: >-
cmake -S . -B build
-DPYBIND11_WERROR=OFF
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=20
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")

- name: Build
run: cmake --build build -j 2

- name: Python tests
run: cmake --build build --target pytest -j 2

- name: C++ tests
run: PYTHONHOME=/clangarm64 PYTHONPATH=/clangarm64 cmake --build build --target cpptest -j 2

- name: Interface test
run: cmake --build build --target test_cmake_build -j 2

- name: Visibility test
run: cmake --build build --target test_cross_module_rtti -j 2
5 changes: 3 additions & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ numpy~=2.2.0; python_version=="3.10" and platform_python_implementation=="PyPy"
numpy~=1.26.0; platform_python_implementation=="GraalVM" and sys_platform=="linux"
numpy~=1.21.5; platform_python_implementation=="CPython" and python_version>="3.8" and python_version<"3.10"
numpy~=1.22.2; platform_python_implementation=="CPython" and python_version=="3.10"
numpy~=1.26.0; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13"
numpy~=2.2.0; platform_python_implementation=="CPython" and python_version=="3.13"
numpy~=1.26.0; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13" and platform_machine!="ARM64"
numpy~=2.3.0; platform_python_implementation=="CPython" and python_version>="3.11" and platform_machine=="ARM64"
numpy~=2.2.0; platform_python_implementation=="CPython" and python_version=="3.13" and platform_machine!="ARM64"
pytest>=6
pytest-timeout
scipy~=1.5.4; platform_python_implementation=="CPython" and python_version<"3.10"
Expand Down
5 changes: 4 additions & 1 deletion tests/test_unnamed_namespace_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
from pybind11_tests import unnamed_namespace_a as m
from pybind11_tests import unnamed_namespace_b as mb

XFAIL_CONDITION = "not m.defined_WIN32_or__WIN32 and (m.defined___clang__ or m.defined__LIBCPP_VERSION)"
XFAIL_CONDITION = (
"m.defined__LIBCPP_VERSION or "
"(not m.defined_WIN32_or__WIN32 and m.defined___clang__)"
)
XFAIL_REASON = "Known issues: https://github.com/pybind/pybind11/pull/4319"


Expand Down
Loading