-
Notifications
You must be signed in to change notification settings - Fork 2
136 lines (122 loc) · 4.88 KB
/
build.yaml
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
name: build
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
workflow_dispatch:
jobs:
linux-build:
name: Linux build
runs-on: ubuntu-20.04
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
VCPKG_DEFAULT_BINARY_CACHE: '${{ github.workspace }}/bin-cache'
PCL_INSTALL_PREFIX: '${{ github.workspace }}/pcl-build'
PCL_MAJOR_VERSION: '1.10'
PCL_VERSION: '1.10.1'
ARC: x64-linux
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: '0'
- name: Create vcpkg binary cache
run: mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
- name: Install OpenGL and additional dependencies
run: |
sudo apt update
sudo apt install -y ninja-build \
autoconf \
libudev-dev \
libxinerama-dev \
libxcursor-dev \
xorg-dev \
libglu1-mesa-dev \
build-essential \
wget \
curl \
zip \
unzip \
tar \
pkg-config \
dh-autoreconf \
libxt-dev
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v6
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
additionalCachedPaths: ${{ github.workspace }}/vcpkg_installed;${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
- name: Install dependencies
run: ./vcpkg/vcpkg install --triplet ${{ env.ARC }} --clean-after-build
- name: Cache PCL
id: cache-pcl
uses: actions/cache@v2
with:
path: ${{ env.PCL_INSTALL_PREFIX }}
key: ${{ runner.os }}-pcl-build
- name: Download PCL ${{ env.PCL_VERSION }} release
if: steps.cache-pcl.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ github.workspace }}/pcl-source
cd ${{ github.workspace }}/pcl-source
wget -nv https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-${PCL_VERSION}.tar.gz
tar -xf ./pcl-${PCL_VERSION}.tar.gz
rm ./pcl-${PCL_VERSION}.tar.gz
- name: Configure PCL
if: steps.cache-pcl.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/pcl-source/pcl-pcl-${{ env.PCL_VERSION }}
run: |
cmake -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_2d:BOOL=ON \
-DBUILD_CUDA:BOOL=OFF \
-DBUILD_GPU:BOOL=OFF \
-DBUILD_apps:BOOL=OFF \
-DBUILD_common:BOOL=ON \
-DBUILD_examples:BOOL=OFF \
-DBUILD_features:BOOL=ON \
-DBUILD_filters:BOOL=ON \
-DBUILD_geometry:BOOL=ON \
-DBUILD_global_tests:BOOL=OFF \
-DBUILD_io:BOOL=ON \
-DBUILD_kdtree:BOOL=ON \
-DBUILD_keypoints:BOOL=OFF \
-DBUILD_ml:BOOL=ON \
-DBUILD_octree:BOOL=ON \
-DBUILD_outofcore:BOOL=OFF \
-DBUILD_people:BOOL=OFF \
-DBUILD_recognition:BOOL=OFF \
-DBUILD_registration:BOOL=OFF \
-DBUILD_sample_consensus:BOOL=ON \
-DBUILD_search:BOOL=ON \
-DBUILD_segmentation:BOOL=ON \
-DBUILD_simulation:BOOL=OFF \
-DBUILD_stereo:BOOL=OFF \
-DBUILD_surface:BOOL=OFF \
-DBUILD_surface_on_nurbs:BOOL=0 \
-DBUILD_tools:BOOL=OFF \
-DBUILD_tracking:BOOL=OFF \
-DBUILD_visualization:BOOL=ON \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DOpenGL_GL_PREFERENCE=GLVND \
-DFLANN_INCLUDE_DIR:PATH=${{ github.workspace }}/vcpkg_installed/${{ env.ARC }}/include \
-DBoost_INCLUDE_DIR:PATH=${{ github.workspace }}/vcpkg_installed/${{ env.ARC }}/include \
-DEIGEN_INCLUDE_DIR:PATH=${{ github.workspace }}/vcpkg_installed/${{ env.ARC }}/include \
-DVTK_DIR=${{ github.workspace }}/vcpkg_installed/${{ env.ARC }}/share/vtk \
-DFLANN_LIBRARY:PATH=${{ github.workspace }}/vcpkg_installed/${{ env.ARC }}/lib/libflann_cpp.a \
-Dpugixml_DIR=${{ github.workspace }}/vcpkg_installed/${{ env.ARC }}/share/pugixml \
-DCMAKE_INSTALL_PREFIX=${{ env.PCL_INSTALL_PREFIX }} \
-S . -B ./build
- name: Build PCL
if: steps.cache-pcl.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/pcl-source/pcl-pcl-${{ env.PCL_VERSION }}
run: |
cmake --build ./build --config Release --target install
rm -r ${{ github.workspace }}/pcl-source
- name: Configure project
run: cmake --preset linux-ninja -DPCL_DIR:PATH=${{ env.PCL_INSTALL_PREFIX }}/share/pcl-${{ env.PCL_MAJOR_VERSION }}
- name: Build project
run: cmake --build ./build --config Release