-
Notifications
You must be signed in to change notification settings - Fork 432
/
script.sh
executable file
·104 lines (96 loc) · 2 KB
/
script.sh
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
#!/bin/sh -e
# Builds and tests PDAL
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
echo "@edgecommunity http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
apk update
apk add \
cmake \
alpine-sdk \
eigen-dev@edgecommunity \
hexer \
hexer-dev \
nitro \
nitro-dev \
gdal \
gdal-dev \
geos \
geos-dev \
laz-perf \
laz-perf-dev \
libgeotiff \
libgeotiff-dev \
libxml2 \
libxml2-dev \
python \
python-dev \
py-numpy \
py-numpy-dev \
cython \
cython-dev \
py-pip \
jsoncpp \
jsoncpp-dev \
hdf5 \
hdf5-dev \
proj4 \
proj4-dev \
cpd \
cpd-dev \
fgt \
fgt-dev \
sqlite \
sqlite-dev \
postgresql-dev \
libcurl \
curl-dev \
linux-headers \
laszip \
laszip-dev \
libspatialite \
libspatialite-dev \
xz-dev \
xz-libs \
zstd \
zstd-dev \
gcc --version
g++ --version
cd /pdal
mkdir -p _build || exit 1
cd _build || exit 1
cmake .. \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_MAKE_PROGRAM=make \
-DBUILD_PLUGIN_PYTHON=ON \
-DBUILD_PLUGIN_CPD=ON \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_HEXBIN=ON \
-DBUILD_PLUGIN_NITF=ON \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
-DBUILD_PGPOINTCLOUD_TESTS=OFF \
-DBUILD_PLUGIN_SQLITE=ON \
-DWITH_LASZIP=ON \
-DWITH_LAZPERF=ON \
-DWITH_TESTS=ON
make -j2
LD_LIBRARY_PATH=./lib
ctest -V
make install
# Python extension testing
cd /pdal/python
pip install packaging
python setup.py build
echo "current path: " `pwd`
export PDAL_TEST_DIR=/pdal/_build/test
python setup.py test
for EXAMPLE in writing writing-filter writing-kernel writing-reader writing-writer
do
cd /pdal/examples/$EXAMPLE
mkdir -p _build || exit 1
cd _build || exit 1
cmake -G "Unix Makefiles" .. && \
make
done