-
Notifications
You must be signed in to change notification settings - Fork 16
194 lines (161 loc) · 5.75 KB
/
Build.yml
File metadata and controls
194 lines (161 loc) · 5.75 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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: 4223ad0b0aa13cc48c820a5c8c5b8ab72bcdaa9f
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: 4223ad0b0aa13cc48c820a5c8c5b8ab72bcdaa9f
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: 4223ad0b0aa13cc48c820a5c8c5b8ab72bcdaa9f
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