Skip to content

Commit 009537e

Browse files
committed
more full test of build in github runners.
1 parent 4784fc9 commit 009537e

1 file changed

Lines changed: 237 additions & 31 deletions

File tree

.github/workflows/build-pcl.yml

Lines changed: 237 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,250 @@ name: build-pcl
33
on: [push, pull_request]
44

55
jobs:
6-
build-pcl:
7-
runs-on: ubuntu-latest
8-
container:
9-
image: pointcloudlibrary/env:24.04
10-
6+
gcc-build:
7+
runs-on: ubuntu-24.04
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
include:
12+
- name: ubuntu20.04-gcc
13+
image: pointcloudlibrary/env:20.04
14+
cc: gcc
15+
cxx: g++
16+
build_gpu: ON
17+
cmake_args: '-DPCL_WARNINGS_ARE_ERRORS=ON -DCMAKE_CXX_STANDARD=14 -DCMAKE_CUDA_STANDARD=14'
18+
- name: ubuntu24.04-gcc
19+
image: pointcloudlibrary/env:24.04
20+
cc: gcc
21+
cxx: g++
22+
build_gpu: ON
23+
cmake_args: '-DCMAKE_CXX_STANDARD=17 -DCMAKE_CUDA_STANDARD=17'
24+
container: ${{ matrix.image }}
25+
env:
26+
CC: ${{ matrix.cc }}
27+
CXX: ${{ matrix.cxx }}
28+
BUILD_GPU: ${{ matrix.build_gpu }}
29+
CMAKE_CXX_FLAGS: '-Wall -Wextra -Wnoexcept-type'
30+
DISPLAY: ':99.0'
1131
steps:
12-
- uses: actions/checkout@v4
13-
14-
- name: list free space
15-
run: df -h
16-
17-
- name: build with CMake
18-
run: |
19-
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON . \
32+
- uses: actions/checkout@v4
33+
- name: Start Xvfb (${{ matrix.name }})
34+
run: (nohup Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp -nolisten unix &)
35+
- name: Configure (${{ matrix.name }})
36+
run: |
37+
cmake -B build -S . ${{ matrix.cmake_args }} \
38+
-DCMAKE_BUILD_TYPE=MinSizeRel \
39+
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
40+
-DPCL_ONLY_CORE_POINT_TYPES=ON \
41+
-DPCL_DISABLE_GPU_TESTS=ON \
42+
-DBUILD_simulation=ON \
43+
-DBUILD_surface_on_nurbs=ON \
44+
-DBUILD_global_tests=ON \
2045
-DBUILD_benchmarks=ON \
2146
-DBUILD_examples=ON \
22-
-DBUILD_simulation=ON \
23-
-DBUILD_global_tests=ON
24-
make -j$(nproc)
47+
-DBUILD_tools=ON \
48+
-DBUILD_apps=ON \
49+
-DBUILD_apps_3d_rec_framework=ON \
50+
-DBUILD_apps_cloud_composer=ON \
51+
-DBUILD_apps_in_hand_scanner=ON \
52+
-DBUILD_apps_modeler=ON \
53+
-DBUILD_apps_point_cloud_editor=ON \
54+
-DBUILD_CUDA=$BUILD_GPU \
55+
-DBUILD_GPU=$BUILD_GPU \
56+
-DBUILD_cuda_io=$BUILD_GPU \
57+
-DBUILD_gpu_tracking=$BUILD_GPU \
58+
-DBUILD_gpu_surface=$BUILD_GPU
59+
# Temporary fix to ensure no tests are skipped
60+
cmake -B build -S .
61+
- name: Build (${{ matrix.name }})
62+
run: cmake --build build -- -j$(nproc)
63+
- name: Build tests target (${{ matrix.name }})
64+
run: cmake --build build --target tests -- -j$(nproc)
65+
- name: Run ctest (${{ matrix.name }})
66+
run: ctest --test-dir build --output-on-failure -j$(nproc)
2567

26-
- name: Run unit tests
27-
run: |
28-
ctest --output-on-failure -j$(nproc)
68+
macos-clang:
69+
runs-on: ${{ matrix.vmimage }}
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
include:
74+
- vmimage: macOS-14
75+
osx_version: '14'
76+
- vmimage: macOS-15
77+
osx_version: '15'
78+
env:
79+
CMAKE_CXX_FLAGS: '-Wall -Wextra -Wabi -Werror -Wno-error=deprecated-declarations'
80+
GOOGLE_TEST_DIR: '${{ github.workspace }}/googletest'
81+
OSX_VERSION: ${{ matrix.osx_version }}
82+
steps:
83+
- uses: actions/checkout@v4
84+
- name: Install Dependencies (macOS ${{ matrix.osx_version }})
85+
run: |
86+
brew update
87+
brew install cmake pkg-config boost eigen flann nanoflann glew libusb qhull vtk freeglut qt@5 libpcap libomp suite-sparse zlib google-benchmark cjson
88+
brew install brewsci/science/openni || true
89+
git clone https://github.com/abseil/googletest.git "$GOOGLE_TEST_DIR"
90+
cd "$GOOGLE_TEST_DIR" && git checkout release-1.8.1
91+
- name: Configure (macOS ${{ matrix.osx_version }})
92+
run: |
93+
cmake -B build -S . \
94+
-DCMAKE_BUILD_TYPE=MinSizeRel \
95+
-DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX${OSX_VERSION}.sdk" \
96+
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
97+
-DGTEST_SRC_DIR="$GOOGLE_TEST_DIR/googletest" \
98+
-DGTEST_INCLUDE_DIR="$GOOGLE_TEST_DIR/googletest/include" \
99+
-DQt5_DIR="/usr/local/opt/qt@5/lib/cmake/Qt5" \
100+
-DPCL_ONLY_CORE_POINT_TYPES=ON \
101+
-DBUILD_surface_on_nurbs=ON -DUSE_UMFPACK=ON \
102+
-DBUILD_simulation=ON \
103+
-DBUILD_global_tests=ON \
104+
-DBUILD_benchmarks=ON \
105+
-DBUILD_examples=ON \
106+
-DBUILD_tools=ON \
107+
-DBUILD_apps=ON \
108+
-DBUILD_apps_3d_rec_framework=ON \
109+
-DBUILD_apps_cloud_composer=ON \
110+
-DBUILD_apps_in_hand_scanner=ON \
111+
-DBUILD_apps_modeler=ON \
112+
-DBUILD_apps_point_cloud_editor=ON \
113+
-DBoost_USE_DEBUG_RUNTIME=OFF
114+
- name: Build (macOS ${{ matrix.osx_version }})
115+
run: cmake --build build -- -j$(sysctl -n hw.ncpu)
116+
- name: Build tests target (macOS ${{ matrix.osx_version }})
117+
run: cmake --build build --target tests -- -j$(sysctl -n hw.ncpu)
118+
- name: Run ctest (macOS ${{ matrix.osx_version }})
119+
run: ctest --test-dir build --output-on-failure -j$(sysctl -n hw.ncpu)
29120

30-
test-free-space-host:
31-
runs-on: ubuntu-latest
121+
ubuntu-clang:
122+
runs-on: ubuntu-24.04
123+
strategy:
124+
fail-fast: false
125+
matrix:
126+
include:
127+
- name: ubuntu22.04-clang
128+
image: pointcloudlibrary/env:22.04
129+
cc: clang
130+
cxx: clang++
131+
build_gpu: OFF
132+
cmake_args: ''
133+
container: ${{ matrix.image }}
134+
env:
135+
CC: ${{ matrix.cc }}
136+
CXX: ${{ matrix.cxx }}
137+
BUILD_GPU: ${{ matrix.build_gpu }}
138+
CMAKE_CXX_FLAGS: '-Wall -Wextra'
139+
DISPLAY: ':99.0'
32140
steps:
33-
- name: list free space
34-
run: df -h
141+
- uses: actions/checkout@v4
142+
- name: Start Xvfb (${{ matrix.name }})
143+
run: (nohup Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp -nolisten unix &)
144+
- name: Configure (${{ matrix.name }})
145+
run: |
146+
cmake -B build -S . ${{ matrix.cmake_args }} \
147+
-DCMAKE_BUILD_TYPE=MinSizeRel \
148+
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
149+
-DPCL_ONLY_CORE_POINT_TYPES=ON \
150+
-DPCL_DISABLE_GPU_TESTS=ON \
151+
-DBUILD_simulation=ON \
152+
-DBUILD_surface_on_nurbs=ON \
153+
-DBUILD_global_tests=ON \
154+
-DBUILD_benchmarks=ON \
155+
-DBUILD_examples=ON \
156+
-DBUILD_tools=ON \
157+
-DBUILD_apps=ON \
158+
-DBUILD_apps_3d_rec_framework=ON \
159+
-DBUILD_apps_cloud_composer=ON \
160+
-DBUILD_apps_in_hand_scanner=ON \
161+
-DBUILD_apps_modeler=ON \
162+
-DBUILD_apps_point_cloud_editor=ON \
163+
-DBUILD_CUDA=$BUILD_GPU \
164+
-DBUILD_GPU=$BUILD_GPU \
165+
-DBUILD_cuda_io=$BUILD_GPU \
166+
-DBUILD_gpu_tracking=$BUILD_GPU \
167+
-DBUILD_gpu_surface=$BUILD_GPU
168+
cmake -B build -S .
169+
- name: Build (${{ matrix.name }})
170+
run: cmake --build build -- -j$(nproc)
171+
- name: Build tests target (${{ matrix.name }})
172+
run: cmake --build build --target tests -- -j$(nproc)
173+
- name: Run ctest (${{ matrix.name }})
174+
run: ctest --test-dir build --output-on-failure -j$(nproc)
35175

36-
test-free-space-windows:
37-
runs-on: windows-latest
176+
ubuntu-indices:
177+
runs-on: ubuntu-24.04
178+
strategy:
179+
matrix:
180+
include:
181+
- name: ubuntu22.04-clang-indices
182+
image: pointcloudlibrary/env:22.04
183+
cc: clang
184+
cxx: clang++
185+
index_signed: OFF
186+
index_size: 64
187+
cmake_args: ''
188+
container: ${{ matrix.image }}
189+
env:
190+
CC: ${{ matrix.cc }}
191+
CXX: ${{ matrix.cxx }}
192+
CMAKE_CXX_FLAGS: '-Wall -Wextra'
38193
steps:
39-
- name: list free space
40-
run: "fsutil volume diskfree c:"
194+
- uses: actions/checkout@v4
195+
- name: Configure (${{ matrix.name }})
196+
run: |
197+
cmake -B build -S . ${{ matrix.cmake_args }} \
198+
-DCMAKE_BUILD_TYPE=MinSizeRel \
199+
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
200+
-DPCL_ONLY_CORE_POINT_TYPES=ON \
201+
-DPCL_INDEX_SIGNED=${{ matrix.index_signed }} \
202+
-DPCL_INDEX_SIZE=${{ matrix.index_size }} \
203+
-DBUILD_global_tests=ON
204+
cmake -B build -S .
205+
- name: Build (${{ matrix.name }})
206+
run: cmake --build build -- -j$(nproc)
207+
- name: Build tests target (${{ matrix.name }})
208+
run: cmake --build build --target tests -- -j$(nproc)
209+
- name: Run ctest (${{ matrix.name }})
210+
run: ctest --test-dir build --output-on-failure -j$(nproc)
41211

42-
test-free-space-macos:
43-
runs-on: macos-latest
212+
windows-msvc:
213+
runs-on: windows-2022
214+
strategy:
215+
fail-fast: false
216+
matrix:
217+
include:
218+
- name: windows-x86
219+
architecture: x86
220+
generator: 'Visual Studio 16 2019'
221+
platform_args: '-A Win32'
222+
- name: windows-x64
223+
architecture: x64
224+
generator: 'Visual Studio 17 2022'
225+
platform_args: '-A x64'
226+
env:
227+
CONFIGURATION: Release
228+
VCPKG_ROOT: 'C:\\vcpkg'
229+
IS_MAIN: ${{ github.ref == 'refs/heads/master' }}
44230
steps:
45-
- name: list free space
46-
run: df -h
231+
- uses: actions/checkout@v4
232+
- name: Configure (${{ matrix.name }})
233+
shell: cmd
234+
run: |
235+
cmake -B build -S . -G"${{ matrix.generator }}" ${{ matrix.platform_args }} ^
236+
-DVCPKG_TARGET_TRIPLET=${{ matrix.architecture }}-windows-rel ^
237+
-DCMAKE_BUILD_TYPE=MinSizeRel ^
238+
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" ^
239+
-DVCPKG_APPLOCAL_DEPS=ON ^
240+
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON ^
241+
-DBUILD_simulation=ON ^
242+
-DBUILD_surface_on_nurbs=ON ^
243+
-DBUILD_global_tests=ON ^
244+
-DBUILD_benchmarks=%IS_MAIN% ^
245+
-DBUILD_tools=%IS_MAIN% ^
246+
-DPCL_DISABLE_VISUALIZATION_TESTS=ON
247+
- name: Build (${{ matrix.name }})
248+
run: cmake --build build --config %CONFIGURATION%
249+
- name: Build tests target (${{ matrix.name }})
250+
run: cmake --build build --target tests --config %CONFIGURATION%
251+
- name: Run ctest (${{ matrix.name }})
252+
run: ctest --test-dir build --config %CONFIGURATION% --output-on-failure

0 commit comments

Comments
 (0)