Syntax update/fixes #674
This file contains 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: dde99864332e10d6bb0da8acb3c16d36d054c2aa | |
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.8" | |
miniconda-version: 'latest' | |
- name: Install Dependencies | |
run: | | |
conda install -c conda-forge qt=5.12.* ninja doxygen | |
pip install pytest pybind11 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: dde99864332e10d6bb0da8acb3c16d36d054c2aa | |
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 | |
sudo apt install -y libqt5svg5-dev libqt5opengl5-dev qtbase5-dev qttools5-dev qttools5-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/[email protected] | |
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: dde99864332e10d6bb0da8acb3c16d36d054c2aa | |
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.8' | |
cache: 'pip' | |
- name: Install Dependencies | |
run: | | |
brew install qt@5 ninja | |
echo "CMAKE_PREFIX_PATH=$(brew --prefix qt@5)" >> $GITHUB_ENV | |
pip install --upgrade pip | |
pip install pytest pybind11 | |
- 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 | |
Windows-Wheels: | |
name: "Windows Wheels" | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: CloudCompareDev | |
auto-activate-base: false | |
python-version: "3.8" | |
miniconda-version: 'latest' | |
- name: Install Dependencies | |
run: | | |
conda install -c conda-forge qt=5.12.* | |
python -m pip install --upgrade pip | |
pip install pytest | |
- 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: pip install cccorelib | |
working-directory: "./wrapper" | |
run: pip install -v .\cccorelib | |
- name: pip install pycc | |
working-directory: "./wrapper" | |
run: | | |
pip install -v .\pycc | |
env: | |
SKBUILD_CONFIGURE_OPTIONS: "-DPLUGIN_STANDARD_QM3C2=ON" | |
- name: test cccorelib | |
run: pytest -v wrapper\cccorelib\tests | |
- name: test pycc | |
run: pytest -v wrapper\pycc\tests | |
Ubuntu-Wheels: | |
name: "Ubuntu Wheels" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt install build-essential cmake ninja-build libqt5svg5-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools python3-dev xvfb | |
python3 -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
- name: pip install cccorelib | |
run: | | |
source venv/bin/activate | |
python -m pip install -v ./wrapper/cccorelib | |
- name: pip install pycc | |
run: | | |
source venv/bin/activate | |
python -m pip install -v ./wrapper/pycc | |
env: | |
SKBUILD_CONFIGURE_OPTIONS: "-DPLUGIN_STANDARD_QM3C2=ON" | |
- name: test cccorelib | |
run: | | |
source venv/bin/activate | |
python -m pytest -v wrapper/cccorelib/tests | |
- name: test pycc | |
run: | | |
source venv/bin/activate | |
xvfb-run python -m pytest -v wrapper/pycc/tests | |
macOS-Wheels: | |
name: "macOS Wheels" | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
brew install qt@5 ninja | |
python3 -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
echo "CMAKE_PREFIX_PATH=$(brew --prefix qt@5)" >> $GITHUB_ENV | |
- name: pip install cccorelib | |
working-directory: "./wrapper" | |
run: | | |
source ../venv/bin/activate | |
python -m pip install -v ./cccorelib | |
- name: pip install pycc | |
working-directory: "./wrapper" | |
run: | | |
source ../venv/bin/activate | |
python -m pip install -v ./pycc | |
env: | |
SKBUILD_CONFIGURE_OPTIONS: "-DPLUGIN_STANDARD_QM3C2=ON" | |
- name: test cccorelib & pycc | |
run: | | |
source venv/bin/activate | |
python -m pytest wrapper/cccorelib/tests | |
python -m pytest wrapper/pycc/tests |