11name : " Python Bindings Unit Tests"
2-
32on :
43 push :
54 branches :
65 - main
76 pull_request :
87 branches :
98 - main
10-
119concurrency :
1210 group : build-python-${{ github.event.pull_request.number || github.ref }}
1311 cancel-in-progress : true
14-
1512jobs :
1613 python-tests :
1714 name : " Test Python bindings"
1815 strategy :
1916 matrix :
20- os : [ 'ubuntu-24.04', 'macos-15-intel', 'macos-26' ]
17+ on : [ 'ubuntu-24.04', 'macos-15-intel', 'macos-26' ]
2118 python : [ '3.10', '3.11', '3.12', '3.13' ]
2219
23- runs-on : ${{ matrix.os }}
20+ runs-on : ${{ matrix.on }}
2421 env :
2522 INSTALL_PREFIX : " /usr/local"
2623
@@ -35,37 +32,27 @@ jobs:
3532
3633 # Install platform build dependencies
3734 - name : " Install system packages (Ubuntu)"
38- if : startsWith(matrix.os , 'ubuntu-')
35+ if : startsWith(matrix.on , 'ubuntu-')
3936 run : sudo apt-get update && sudo apt-get install -y ninja-build g++ cmake
4037
4138 - name : " Setup Homebrew (macOS)"
42- if : startsWith(matrix.os , 'macos-')
39+ if : startsWith(matrix.on , 'macos-')
4340 uses : Homebrew/actions/setup-homebrew@main
4441
4542 - name : " Install system packages (macOS)"
46- if : startsWith(matrix.os , 'macos-')
43+ if : startsWith(matrix.on , 'macos-')
4744 run : brew install ninja gcc cmake
4845
4946 # Install Python build dependencies
50- - name : " Install Python build tools "
47+ - name : " Build and Install Python wheel "
5148 run : |
5249 python -m pip install --upgrade pip
5350 python -m pip install -r build-requirements.txt
54- python -m pip install build pytest
55-
56- # Build wheel from pyproject.toml
57- - name : " Build Python wheel"
58- run : |
5951 python -m build
60- ls -lh dist/
61-
62- # Install built wheel for testing
63- - name : " Install built package"
64- run : |
6552 pip install dist/*.whl
66- python -c "import importlib.metadata; print('Installed:', importlib.metadata.version('py-capio-cl'))"
6753
6854 # Run unit tests
6955 - name : " Run Python tests"
7056 run : |
57+ python -m pip install -r test-requirements.txt
7158 pytest -v tests/python/test_*
0 commit comments