mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Add Windows arm tests (#5932)
* adding windows arm test - excluding numpy 2.2.0 for arm64 builds * adding windows arm msys2 test * testing mingw python * unnamed namespace test on windows arm with clang and mingw * Revert "unnamed namespace test on windows arm with clang and mingw" This reverts commit08abf889ae. * bumping c++ version * commenting out other tests * Ignore unnmaed namespace on arm windows with mingw - Updatig XFAIL condition to expect a failure on windows arm with mingw and clang - setting python home and path variables in c++ tests * Revert "commenting out other tests" This reverts commitdc75243963. * removing windows-11-arm from big test, push * removing redundant shell * removing trailing whitespace * Clarify Windows ARM clang job naming Rename the Windows ARM clang jobs to windows_arm_clang_msvc and windows_arm_clang_msys2 and adjust their display names to clang-msvc / clang-msys2. The first runs clang against the MSVC/Windows SDK toolchain and python.org CPython for Windows ARM, while the second runs clang inside the MSYS2/MinGW-w64 CLANGARM64 environment with MSYS2 Python. Using clearly distinguished job names makes it easier to discuss failures and behavior in each environment without ambiguity, both in logs and in PR review discussions. * Reduce Windows ARM clang matrix size Limit the windows_arm_clang_msvc job to Python 3.13 and the windows_arm_clang_msys2 job to Python 3.12 to stay within our constrained GitHub Actions resources. Keep both jobs using a matrix over os and python so their structure stays aligned and it remains easy to expand coverage when needed. * Remove matrix.python from windows_arm_clang_msys2 job: the Python version is determined by the msys2/setup-msys2 action and cannot be changed --------- Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
This commit is contained in:
131
.github/workflows/ci.yml
vendored
131
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user