Actually use pybind11 3.0 in CI #897
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 | |
| on: [ push, pull_request ] | |
| jobs: | |
| Windows-Build: | |
| name: Windows embedded-modules=${{matrix.use_embedded_modules}} | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| use_embedded_modules: [ ON, OFF ] | |
| steps: | |
| - name: Clone CloudCompare | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'CloudCompare/CloudCompare' | |
| ref: fc2fe88a33ca9e406aab43b3bda6a9c6d38a2313 | |
| submodules: recursive | |
| - name: Clone PythonRuntime | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'plugins/private/CloudCompare-PythonRuntime' | |
| - name: Install Miniconda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: CloudCompareDev | |
| auto-activate-base: false | |
| python-version: "3.14" | |
| miniconda-version: 'latest' | |
| - name: Install Dependencies | |
| run: | | |
| conda install -c conda-forge qt6-main==6.8.3 ninja doxygen | |
| pip install pytest "pybind11>=3.0" numpy | |
| - name: Configure MSVC console | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Set environment for MSVC | |
| run: | | |
| # Set these env vars so cmake picks the correct compiler | |
| # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files | |
| echo "CXX=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "CC=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Configure CMake | |
| shell: pwsh | |
| run: | | |
| mkdir build | |
| cmake ` | |
| -G Ninja ` | |
| -B build ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DOPTION_BUILD_CCVIEWER=OFF ` | |
| -DCMAKE_INSTALL_PREFIX=install ` | |
| -DPLUGIN_PYTHON=ON ` | |
| -DPLUGIN_PYTHON_USE_EMBEDDED_MODULES=${{ matrix.use_embedded_modules }} ` | |
| -DPLUGIN_STANDARD_QM3C2=ON ` | |
| . | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Install | |
| run: cmake --install build | |
| # - name: Run Tests | |
| # run: cmake --build build --target pytest | |
| Ubuntu-Build: | |
| name: "Ubuntu Build" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone CloudCompare | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'CloudCompare/CloudCompare' | |
| ref: fc2fe88a33ca9e406aab43b3bda6a9c6d38a2313 | |
| submodules: recursive | |
| - name: Clone PythonRuntime | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'plugins/private/CloudCompare-PythonRuntime' | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt install -y build-essential cmake ninja-build xvfb doxygen graphviz | |
| sudo apt install -y qt6-base-dev qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools pybind11-dev | |
| python3 -m pip install -r plugins/private/CloudCompare-PythonRuntime/requirements-dev.txt | |
| - name: Configure CMake | |
| shell: pwsh | |
| run: | | |
| mkdir build | |
| cmake ` | |
| -G Ninja ` | |
| -B build ` | |
| -DPLUGIN_PYTHON=ON ` | |
| -DOPTION_BUILD_CCVIEWER=OFF ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DPLUGIN_STANDARD_QM3C2=ON ` | |
| . | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Install | |
| run: sudo cmake --install build | |
| # - name: Run Tests | |
| # run: | | |
| # export LD_LIBRARY_PATH=/usr/local/lib | |
| # xvfb-run python3 -m pytest plugins/private/CloudCompare-PythonRuntime/tests --cloudcompare_exe /usr/local/bin/CloudCompare --verbose | |
| - name: Run doctests | |
| run: | | |
| export LD_LIBRARY_PATH=/usr/local/lib | |
| cd plugins/private/CloudCompare-PythonRuntime/docs | |
| xvfb-run /usr/local/bin/CloudCompare -SILENT -PYTHON_SCRIPT build_doc.py -b doctest . _doctests | |
| - name: Build docs | |
| run: | | |
| export LD_LIBRARY_PATH=/usr/local/lib | |
| cd plugins/private/CloudCompare-PythonRuntime/docs | |
| xvfb-run /usr/local/bin/CloudCompare -SILENT -PYTHON_SCRIPT build_doc.py -b html . _build | |
| - name: Deploy Documentation | |
| if: github.ref == 'refs/heads/master' | |
| uses: JamesIves/github-pages-deploy-action@4.1.5 | |
| with: | |
| branch: gh-pages | |
| folder: plugins/private/CloudCompare-PythonRuntime/docs/_build | |
| macOS-Build: | |
| name: "macOS Build" | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone CloudCompare | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'CloudCompare/CloudCompare' | |
| ref: fc2fe88a33ca9e406aab43b3bda6a9c6d38a2313 | |
| submodules: recursive | |
| - name: Clone PythonRuntime | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'plugins/private/CloudCompare-PythonRuntime' | |
| - name : setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.14' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| brew install qt6 ninja | |
| echo "CMAKE_PREFIX_PATH=$(brew --prefix qt@6)" >> $GITHUB_ENV | |
| pip install --upgrade pip | |
| pip install pytest "pybind11>=3.0" | |
| - name: Configure CMake | |
| run: | | |
| mkdir build | |
| cmake \ | |
| --log-level=debug \ | |
| -G Ninja \ | |
| -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DOPTION_BUILD_CCVIEWER=OFF \ | |
| -DCMAKE_INSTALL_PREFIX=install \ | |
| -DPLUGIN_PYTHON=ON \ | |
| -DPLUGIN_STANDARD_QM3C2=ON \ | |
| . | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Install | |
| run: sudo cmake --install build | |
| # - name: Run Tests | |
| # run: | | |
| # cmake --build build --target pytest |