Skip to content

Commit a90c481

Browse files
committed
Add CI logic
1 parent 23d52c3 commit a90c481

File tree

11 files changed

+235
-6
lines changed

11 files changed

+235
-6
lines changed

.github/actions/coverage-ci/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ inputs:
2626
openvdb_version:
2727
description: 'Version of openvdb to build'
2828
required: false
29+
pdal_version:
30+
description: 'Version of PDAL to build'
31+
required: false
2932
usd_version:
3033
description: 'Version of usd to build'
3134
required: false
@@ -60,6 +63,7 @@ runs:
6063
occt_version: ${{inputs.occt_version}}
6164
openexr_version: ${{inputs.openexr_version}}
6265
openvdb_version: ${{inputs.openvdb_version}}
66+
pdal_version: ${{inputs.pdal_version}}
6367
usd_version: ${{inputs.usd_version}}
6468

6569
- name: Install VTK dependency
@@ -68,6 +72,7 @@ runs:
6872
vtk_version: ${{inputs.vtk_version}}
6973
raytracing_label: raytracing
7074
openvdb_version: ${{inputs.openvdb_version}}
75+
pdal_version: ${{inputs.pdal_version}}
7176

7277
# coverage build is done in source as it seems to be required for codecov
7378
# CMAKE_MODULE_PATH is required because of
@@ -83,7 +88,7 @@ runs:
8388
-DBUILD_TESTING=ON
8489
-DCMAKE_BUILD_TYPE=Release
8590
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
86-
-DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/
91+
-DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/:$(pwd)/../dependencies/install/lib/cmake/PDAL/
8792
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/
8893
-DF3D_COVERAGE=ON
8994
-DF3D_MODULE_EXR=ON
@@ -96,6 +101,7 @@ runs:
96101
-DF3D_PLUGIN_BUILD_OCCT=ON
97102
-DF3D_PLUGIN_BUILD_USD=ON
98103
-DF3D_PLUGIN_BUILD_VDB=ON
104+
-DF3D_PLUGIN_BUILD_PDAL=ON
99105
-DF3D_STRICT_BUILD=ON
100106
-DF3D_TESTING_ENABLE_EGL_TESTS=ON
101107
-DF3D_TESTING_ENABLE_EXTERNAL_GLFW=ON
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: 'Install GDAL Dependency'
2+
description: 'Install GDAL Dependency using cache when possible'
3+
inputs:
4+
cpu:
5+
description: 'CPU architecture to build for'
6+
required: false
7+
default: 'x86_64'
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
13+
- name: Cache GDAL
14+
id: cache-gdal
15+
uses: actions/cache/restore@v4
16+
with:
17+
path: dependencies/gdal_install
18+
key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0
19+
20+
# Dependents: pdal, proj
21+
- name: Checkout GDAL
22+
if: steps.cache-gdal.outputs.cache-hit != 'true'
23+
uses: actions/checkout@v4
24+
with:
25+
repository: OSGeo/gdal
26+
path: './dependencies/gdal'
27+
ref: v3.8.0
28+
29+
- name: Setup GDAL
30+
if: steps.cache-gdal.outputs.cache-hit != 'true'
31+
working-directory: ${{github.workspace}}/dependencies
32+
shell: bash
33+
run: |
34+
mkdir gdal_build
35+
mkdir gdal_install
36+
37+
- name: Configure GDAL
38+
if: steps.cache-gdal.outputs.cache-hit != 'true'
39+
working-directory: ${{github.workspace}}/dependencies/gdal_build
40+
shell: bash
41+
run: >
42+
cmake ../gdal
43+
-DBUILD_SHARED_LIBS=ON
44+
-DCMAKE_BUILD_TYPE=Release
45+
-DCMAKE_INSTALL_PREFIX=../gdal_install
46+
-DGDAL_USE_EXTERNAL_LIBS=ON
47+
-DGDAL_ENABLE_DRIVER_GPKG=ON
48+
-DGDAL_ENABLE_DRIVER_TIFF=ON
49+
-DGDAL_ENABLE_DRIVER_NETCDF=OFF
50+
-DGDAL_ENABLE_DRIVER_POSTGIS=OFF
51+
-DGDAL_ENABLE_DRIVER_SHP=ON
52+
-DGDAL_ENABLE_DRIVER_VRT=ON
53+
-DGDAL_ENABLE_DRIVER_PDF=OFF
54+
-DGDAL_ENABLE_DRIVER_OPENJPEG=OFF
55+
-DGDAL_ENABLE_DRIVER_JPEG=ON
56+
-DGDAL_ENABLE_DRIVER_PNG=ON
57+
-DGDAL_USE_ZLIB=ON
58+
-DGDAL_USE_LZMA=ON
59+
-DGDAL_USE_ZSTD=ON
60+
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/
61+
${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }}
62+
${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }}
63+
64+
- name: Build GDAL
65+
if: steps.cache-gdal.outputs.cache-hit != 'true'
66+
working-directory: ${{github.workspace}}/dependencies/gdal_build
67+
shell: bash
68+
run: cmake --build . --parallel 2 --target install --config Release
69+
70+
- name: Copy to install
71+
working-directory: ${{github.workspace}}/dependencies/gdal_install
72+
shell: bash
73+
run: cp -r ./* ../install/
74+
75+
- name: Save cache
76+
if: steps.cache-gdal.outputs.cache-hit != 'true'
77+
uses: actions/cache/save@v4
78+
with:
79+
key: ${{ steps.cache-gdal.outputs.cache-primary-key }}
80+
path: dependencies/gdal_install

.github/actions/generic-dependencies/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ inputs:
3131
openvdb_version:
3232
description: 'Version of openvdb to build'
3333
required: false
34+
pdal_version:
35+
description: 'Version of PDAL to build'
36+
required: false
3437
pybind11_version:
3538
description: 'Version of pybind11 to build'
3639
required: false
@@ -55,6 +58,7 @@ runs:
5558
with:
5659
cpu: ${{inputs.cpu}}
5760
openvdb_version: ${{inputs.openvdb_version}}
61+
pdal_version: ${{inputs.pdal_version}}
5862

5963
- name: Install Raytracing Dependencies
6064
if: inputs.raytracing_label == 'raytracing'
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: 'Install PDAL Dependency'
2+
description: 'Install PDAL Dependency using cache when possible'
3+
inputs:
4+
cpu:
5+
description: 'CPU architecture to build for'
6+
required: false
7+
default: 'x86_64'
8+
version:
9+
description: 'Version of PDAL to build'
10+
required: true
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
16+
- name: Check required inputs
17+
shell: bash
18+
run: |
19+
[[ "${{ inputs.version }}" ]] || { echo "version input is empty" ; exit 1; }
20+
21+
- name: Cache PDAL
22+
id: cache-pdal
23+
uses: actions/cache/restore@v4
24+
with:
25+
path: dependencies/pdal_install
26+
key: pdal-${{inputs.version}}-${{runner.os}}-${{inputs.cpu}}-0
27+
28+
# Dependents (not version): vtk
29+
- name: Checkout PDAL
30+
if: steps.cache-pdal.outputs.cache-hit != 'true'
31+
uses: actions/checkout@v4
32+
with:
33+
repository: PDAL/PDAL
34+
path: './dependencies/pdal'
35+
ref: ${{inputs.version}}
36+
37+
- name: Setup PDAL
38+
if: steps.cache-pdal.outputs.cache-hit != 'true'
39+
working-directory: ${{github.workspace}}/dependencies
40+
shell: bash
41+
run: |
42+
mkdir pdal_build
43+
mkdir pdal_install
44+
45+
- name: Configure PDAL
46+
if: steps.cache-pdal.outputs.cache-hit != 'true'
47+
working-directory: ${{github.workspace}}/dependencies/pdal_build
48+
shell: bash
49+
run: >
50+
cmake ../pdal
51+
-DBUILD_SHARED_LIBS=ON
52+
-DCMAKE_BUILD_TYPE=Release
53+
-DCMAKE_CXX_STANDARD=17
54+
-DCMAKE_CXX_STANDARD_REQUIRED=ON
55+
-DCMAKE_CXX_EXTENSIONS=OFF
56+
-DCMAKE_INSTALL_LIBDIR:PATH=lib
57+
-DCMAKE_INSTALL_PREFIX=../pdal_install
58+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
59+
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/
60+
-DWITH_TESTS=OFF
61+
-DWITH_COMPLETION=OFF
62+
-DWITH_LASZIP=ON
63+
-DWITH_ZSTD=ON
64+
-DWITH_LZMA=ON
65+
-DWITH_GDAL=ON
66+
${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }}
67+
${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }}
68+
69+
- name: Build PDAL
70+
if: steps.cache-pdal.outputs.cache-hit != 'true'
71+
working-directory: ${{github.workspace}}/dependencies/pdal_build
72+
shell: bash
73+
run: cmake --build . --parallel 2 --target install --config Release
74+
75+
- name: Copy to install
76+
working-directory: ${{github.workspace}}/dependencies/pdal_install
77+
shell: bash
78+
run: cp -r ./* ../install/
79+
80+
- name: Save cache
81+
if: steps.cache-pdal.outputs.cache-hit != 'true'
82+
uses: actions/cache/save@v4
83+
with:
84+
key: ${{ steps.cache-pdal.outputs.cache-primary-key }}
85+
path: dependencies/pdal_install

.github/actions/static-analysis-ci/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ inputs:
2222
openvdb_version:
2323
description: 'Version of openvdb to build'
2424
required: true
25+
pdal_version:
26+
description: 'Version of PDAL to build'
27+
required: true
2528
usd_version:
2629
description: 'Version of usd to build'
2730
required: true
@@ -56,13 +59,15 @@ runs:
5659
occt_version: ${{inputs.occt_version}}
5760
openexr_version: ${{inputs.openexr_version}}
5861
openvdb_version: ${{inputs.openvdb_version}}
62+
pdal_version: ${{inputs.pdal_version}}
5963
usd_version: ${{inputs.usd_version}}
6064

6165
- name: Install VTK dependency
6266
uses: ./source/.github/actions/vtk-install-dep
6367
with:
6468
vtk_version: ${{inputs.vtk_version}}
6569
openvdb_version: ${{inputs.openvdb_version}}
70+
pdal_version: ${{inputs.pdal_version}}
6671

6772
- name: Setup Build Directory
6873
shell: bash
@@ -81,7 +86,7 @@ runs:
8186
--warn-uninitialized
8287
-DBUILD_TESTING=ON
8388
-DCMAKE_BUILD_TYPE=Release
84-
-DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/
89+
-DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/:$(pwd)/../dependencies/install/lib/cmake/PDAL/
8590
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/
8691
-DF3D_MODULE_EXR=ON
8792
-DF3D_MODULE_UI=ON
@@ -91,6 +96,7 @@ runs:
9196
-DF3D_PLUGIN_BUILD_OCCT=ON
9297
-DF3D_PLUGIN_BUILD_USD=ON
9398
-DF3D_PLUGIN_BUILD_VDB=ON
99+
-DF3D_PLUGIN_BUILD_PDAL=ON
94100
-DF3D_STRICT_BUILD=ON
95101
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
96102

.github/actions/vtk-dependencies/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ inputs:
1212
openvdb_version:
1313
description: 'Version of openvdb to build'
1414
required: false
15+
pdal_version:
16+
description: 'Version of PDAL to build'
17+
required: false
1518

1619
runs:
1720
using: "composite"
@@ -39,9 +42,21 @@ runs:
3942
with:
4043
cpu: ${{inputs.cpu}}
4144

45+
- name: Install GDAL
46+
uses: ./.actions/gdal-install-dep
47+
with:
48+
cpu: ${{inputs.cpu}}
49+
4250
- name: Install OpenVDB
4351
if: inputs.openvdb_version != ''
4452
uses: ./.actions/openvdb-install-dep
4553
with:
4654
cpu: ${{inputs.cpu}}
4755
version: ${{inputs.openvdb_version}}
56+
57+
- name: Install PDAL
58+
if: inputs.pdal_version != ''
59+
uses: ./.actions/pdal-install-dep
60+
with:
61+
cpu: ${{inputs.cpu}}
62+
version: ${{inputs.pdal_version}}

.github/actions/vtk-install-dep/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ inputs:
1313
required: false
1414
default: 'x86_64'
1515
openvdb_version:
16-
description: 'Version of openvdb to build against'
16+
description: 'Version of OpenVDB to build against'
17+
required: false
18+
pdal_version:
19+
description: 'Version of PDAL to build against'
1720
required: false
1821

1922
runs:
@@ -30,7 +33,7 @@ runs:
3033
uses: actions/cache/restore@v4
3134
with:
3235
path: dependencies/vtk_install
33-
key: vtk-${{ inputs.vtk_version }}-openvdb-${{inputs.openvdb_version}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.cpu}}-8
36+
key: vtk-${{ inputs.vtk_version }}-openvdb-${{inputs.openvdb_version}}-pdal-${{inputs.pdal_version}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.cpu}}-9
3437

3538
- name: Setup VTK
3639
if: steps.cache-vtk.outputs.cache-hit != 'true'
@@ -76,6 +79,7 @@ runs:
7679
-DCMAKE_INSTALL_PREFIX:PATH=../vtk_install
7780
-DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/
7881
-DOpenVDB_CMAKE_PATH=${{ inputs.openvdb_version != '' && '$(pwd)/../install/lib/cmake/OpenVDB/' || '' }}
82+
-DPDAL_CMAKE_PATH=${{ inputs.pdal_version != '' && '$(pwd)/../install/lib/cmake/PDAL/' || '' }}
7983
-DVTKOSPRAY_ENABLE_DENOISER=ON
8084
-DVTK_BUILD_TESTING=OFF
8185
-DVTK_DEBUG_LEAKS=ON
@@ -94,6 +98,7 @@ runs:
9498
-DVTK_MODULE_ENABLE_VTK_IOImage=YES
9599
-DVTK_MODULE_ENABLE_VTK_IOImport=YES
96100
-DVTK_MODULE_ENABLE_VTK_IOOpenVDB=${{ inputs.openvdb_version != '' && 'YES' || 'DEFAULT' }}
101+
-DVTK_MODULE_ENABLE_VTK_IOPDAL=${{ inputs.pdal_version != '' && 'YES' || 'DEFAULT' }}
97102
-DVTK_MODULE_ENABLE_VTK_IOPLY=YES
98103
-DVTK_MODULE_ENABLE_VTK_IOParallel=YES
99104
-DVTK_MODULE_ENABLE_VTK_IOXML=YES

.github/actions/zlib-install-dep/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
path: dependencies/zlib_install
1818
key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4
1919

20-
# Dependents: blosc openvdb vtk
20+
# Dependents: blosc openvdb pdal vtk
2121
- name: Checkout zlib
2222
if: steps.cache-zlib.outputs.cache-hit != 'true'
2323
uses: actions/checkout@v4

0 commit comments

Comments
 (0)