forked from CloudCompare/CloudCompare
-
Notifications
You must be signed in to change notification settings - Fork 0
231 lines (203 loc) · 7.71 KB
/
build.yml
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
name: Build
on: [ push, pull_request ]
jobs:
build:
name: ${{ matrix.config.name }} SCALAR_DOUBLE=${{ matrix.scalar_double }}
runs-on: ${{ matrix.config.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
scalar_double: [ "OFF", "ON" ]
config:
- {
name: "Windows MSVC",
os: windows-latest,
generator: "Ninja",
conda_library_dir: "Library",
compile_qanimation_with_ffmpeg: "ON",
compile_qpcl: "OFF",
compile_qransac: "ON",
}
- {
name: "macOS Clang",
os: macos-latest,
generator: "Ninja",
conda_library_dir: ".",
compile_qanimation_with_ffmpeg: "OFF",
compile_qpcl: "OFF",
compile_qransac: "ON",
}
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: true
# Turn off for now since GitHub Actions is broken (will eventually move to brew anyways)
# - name: Conda Cache (macOS)
# if: matrix.config.os == 'macos-latest'
# uses: actions/cache@v1
# with:
# path: /Users/runner/miniconda3/envs/CloudCompareDev
# key: conda-cache-${{ runner.os }}-${{ hashFiles('.ci/conda.yml') }}
- name: Conda Cache (Windows)
if: matrix.config.os == 'windows-latest'
uses: actions/cache@v1
with:
path: C:\Miniconda3\envs\CloudCompareDev
key: conda-cache-${{ runner.os }}-${{ hashFiles('.ci/conda.yml') }}
- name: Install Dependencies
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: CloudCompareDev
auto-activate-base: false
environment-file: .ci/conda.yml
miniconda-version: 'latest'
- name: Install Dependencies (macOS)
if: matrix.config.os == 'macos-latest'
run: brew install xerces-c
- name: Configure MSVC console (Windows)
if: matrix.config.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Set environment for MSVC (Windows)
if: matrix.config.os == 'windows-latest'
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: bash -l {0}
run: |
mkdir build
export CONDA_LIB_DIR="$CONDA_PREFIX/${{ matrix.config.conda_library_dir }}"
export EIGEN_ROOT_DIR="$CONDA_LIB_DIR/include/eigen3"
cmake \
-B build \
-G "${{ matrix.config.generator }}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$CONDA_LIB_DIR" \
-DCCCORELIB_SCALAR_DOUBLE=${{ matrix.scalar_double }} \
-DEIGEN_ROOT_DIR="$EIGEN_ROOT_DIR" \
-DOPTION_SUPPORT_GAMEPADS=ON \
-DPLUGIN_EXAMPLE_GL=ON \
-DPLUGIN_EXAMPLE_IO=ON \
-DPLUGIN_EXAMPLE_STANDARD=ON \
-DPLUGIN_GL_QEDL=ON \
-DPLUGIN_GL_QSSAO=ON \
-DPLUGIN_IO_QADDITIONAL=ON \
-DPLUGIN_IO_QCORE=ON \
-DPLUGIN_IO_QE57=ON \
-DPLUGIN_IO_QPHOTOSCAN=ON \
-DPLUGIN_IO_QPDAL=ON \
-DPLUGIN_IO_QRDB=ON \
-DPLUGIN_IO_QRDB_FETCH_DEPENDENCY=ON \
-DPLUGIN_IO_QRDB_INSTALL_DEPENDENCY=ON \
-DPLUGIN_STANDARD_QANIMATION=ON \
-DQANIMATION_WITH_FFMPEG_SUPPORT=${{ matrix.config.compile_qanimation_with_ffmpeg }} \
-DPLUGIN_STANDARD_QBROOM=ON \
-DPLUGIN_STANDARD_QCANUPO=OFF \
-DPLUGIN_STANDARD_QCOMPASS=ON \
-DPLUGIN_STANDARD_QCSF=ON \
-DPLUGIN_STANDARD_QFACETS=ON \
-DPLUGIN_STANDARD_QHOUGH_NORMALS=ON \
-DPLUGIN_STANDARD_QHPR=ON \
-DPLUGIN_STANDARD_QM3C2=ON \
-DPLUGIN_STANDARD_QPCV=ON \
-DPLUGIN_STANDARD_QPOISSON_RECON=ON \
-DPLUGIN_STANDARD_QSRA=ON \
-DPLUGIN_STANDARD_QRANSAC_SD=${{ matrix.config.compile_qransac }} \
-DPLUGIN_STANDARD_QPCL=${{ matrix.config.compile_qpcl }} \
-DPLUGIN_STANDARD_QCLOUDLAYERS=ON \
.
- name: Build
run: cmake --build build --parallel
- name: Install (macOs)
if: matrix.config.os == 'macos-latest'
run: sudo cmake --install build
- name: Install (Windows)
if: matrix.config.os == 'windows-latest'
run: cmake --install build
ubuntu-build:
name: Ubuntu ${{ matrix.compiler }} SCALAR_DOUBLE=${{ matrix.scalar_double }}
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
scalar_double: [ "OFF", "ON" ]
compiler: ["GCC", "Clang"]
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: true
- name: Install Dependencies
run: >
sudo apt-get update -qq
sudo apt-get install -qy cmake ninja-build
libqt5svg5-dev libqt5opengl5-dev qt5-default qttools5-dev qttools5-dev-tools libqt5websockets5-dev
libtbb-dev
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
libboost-program-options-dev libboost-thread-dev
libeigen3-dev
libcgal-dev libcgal-qt5-dev libgdal-dev libpcl-dev
libdlib-dev libproj-dev libxerces-c-dev xvfb libpdal-dev libjsoncpp-dev
- name: Setup GCC
if: matrix.compiler == 'GCC'
run: |
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
- name: Setup Clang
if: matrix.compiler == 'Clang'
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Configure cmake
run: >
mkdir build
cmake
-B build
-S .
-G Ninja
-DEIGEN_ROOT_DIR=/usr/include/eigen3
-DJSON_ROOT_DIR=/usr/include/jsoncpp
-DDLIB_ROOT=/usr/include
-DCCCORELIB_SCALAR_DOUBLE=${{ matrix.scalar_double }}
-DCCCORELIB_USE_TBB=ON
-DPLUGIN_EXAMPLE_GL=ON
-DPLUGIN_EXAMPLE_IO=ON
-DPLUGIN_EXAMPLE_STANDARD=ON
-DPLUGIN_GL_QEDL=ON
-DPLUGIN_GL_QSSAO=ON
-DPLUGIN_IO_QADDITIONAL=ON
-DPLUGIN_IO_QCORE=ON
-DPLUGIN_IO_QE57=ON
-DPLUGIN_IO_QPHOTOSCAN=ON
-DPLUGIN_IO_QPDAL=ON
-DPLUGIN_IO_QRDB=ON
-DPLUGIN_IO_QRDB_FETCH_DEPENDENCY=ON
-DPLUGIN_IO_QRDB_INSTALL_DEPENDENCY=ON
-DPLUGIN_STANDARD_QANIMATION=ON
-DQANIMATION_WITH_FFMPEG_SUPPORT=ON
-DPLUGIN_STANDARD_QBROOM=ON
-DPLUGIN_STANDARD_QCANUPO=ON
-DPLUGIN_STANDARD_QCOMPASS=ON
-DPLUGIN_STANDARD_QCSF=ON
-DPLUGIN_STANDARD_QFACETS=ON
-DPLUGIN_STANDARD_QHOUGH_NORMALS=ON
-DPLUGIN_STANDARD_QHPR=ON
-DPLUGIN_STANDARD_QM3C2=ON
-DPLUGIN_STANDARD_QPCV=ON
-DPLUGIN_STANDARD_QPOISSON_RECON=ON
-DPLUGIN_STANDARD_QSRA=ON
-DPLUGIN_STANDARD_QRANSAC_SD=ON
-DPLUGIN_STANDARD_QPCL=ON
-DPLUGIN_STANDARD_QCLOUDLAYERS=ON
-DBUILD_TESTING=ON
- name: Build
run: cmake --build build --parallel
- name: Test
run: xvfb-run ctest --test-dir build
- name: Install
run: sudo cmake --install build