-
Notifications
You must be signed in to change notification settings - Fork 57
56 lines (45 loc) · 1.71 KB
/
python-bindings-windows.yml
File metadata and controls
56 lines (45 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build Python Bindings on Windows
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python --version
- name: Install CMake 4.0 on Windows
run: |
choco install cmake --version=4.0.0 -y
refreshenv
cmake --version
shell: pwsh
- name: Configure CMake with Python bindings
run: |
cmake -B ${{github.workspace}}/build_pybind `
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DBUILD_WITH_PYBIND=ON `
shell: pwsh
- name: Build Python bindings
run: cmake --build ${{github.workspace}}/build_pybind --target pybind_all --config ${{env.BUILD_TYPE}}
- name: Test Python imports
working-directory: ${{github.workspace}}/build_pybind/bin/${{env.BUILD_TYPE}}
run: |
python -c "import sys; sys.path.insert(0, '.'); import core_py; print('core_py imported successfully')"
python -c "import sys; sys.path.insert(0, '.'); import lidar_odometry_py; print('lidar_odometry_py imported successfully')"
python -c "import sys; sys.path.insert(0, '.'); import multi_view_tls_registration_py; print('multi_view_tls_registration_py imported successfully')"
shell: pwsh