Raw data viewer upgrade #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Python Bindings on Linux | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Load repository cache | |
| run: sudo apt-get update --allow-releaseinfo-change | |
| - name: Install system libraries | |
| run: sudo apt-get install -y --no-install-recommends libx11-dev libxi-dev libtbb-dev libegl1-mesa-dev libglu1-mesa-dev libopencv-dev | |
| - 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 | |
| run: | | |
| wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.sh | |
| sudo sh cmake.sh --skip-license --prefix=/usr/local | |
| cmake --version | |
| - name: Configure CMake with Python bindings | |
| run: | | |
| cmake -B ${{github.workspace}}/build_pybind \ | |
| -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
| -DPYBIND=ON | |
| - 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')" | |