From f1e02cbd32ff15a6d2453aa70df3a9d054c76a8d Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 18 Feb 2025 19:43:57 +0200 Subject: [PATCH 01/29] copy vdb dir as it --- plugins/pdal/CMakeLists.txt | 33 ++++++++++++++++++++ plugins/pdal/configs/config.d/10_vdb.json | 10 ++++++ plugins/pdal/configs/thumbnail.d/10_vdb.json | 10 ++++++ plugins/pdal/f3d-vdb-formats.xml | 7 +++++ plugins/pdal/vdb.inl | 11 +++++++ 5 files changed, 71 insertions(+) create mode 100644 plugins/pdal/CMakeLists.txt create mode 100644 plugins/pdal/configs/config.d/10_vdb.json create mode 100644 plugins/pdal/configs/thumbnail.d/10_vdb.json create mode 100644 plugins/pdal/f3d-vdb-formats.xml create mode 100644 plugins/pdal/vdb.inl diff --git a/plugins/pdal/CMakeLists.txt b/plugins/pdal/CMakeLists.txt new file mode 100644 index 0000000000..6e3fc18d2c --- /dev/null +++ b/plugins/pdal/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.21) + +project(f3d-plugin-vdb) + +include(GNUInstallDirs) + +# Check if the plugin is built externally +if(PROJECT_IS_TOP_LEVEL) + find_package(f3d REQUIRED COMPONENTS pluginsdk) +else() + include(f3dPlugin) +endif() + +f3d_plugin_init() + +f3d_plugin_declare_reader( + NAME VDB + EXTENSIONS vdb + MIMETYPES application/vnd.vdb + VTK_READER vtkOpenVDBReader + FORMAT_DESCRIPTION "VDB" + CUSTOM_CODE "${CMAKE_CURRENT_SOURCE_DIR}/vdb.inl" +) + +f3d_plugin_build( + NAME vdb + VERSION 1.0 + DESCRIPTION "VTK OpenVDB support" + VTK_MODULES IOOpenVDB + MIMETYPE_XML_FILES "${CMAKE_CURRENT_SOURCE_DIR}/f3d-vdb-formats.xml" + CONFIGURATION_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/configs/config.d" "${CMAKE_CURRENT_SOURCE_DIR}/configs/thumbnail.d" + FREEDESKTOP +) diff --git a/plugins/pdal/configs/config.d/10_vdb.json b/plugins/pdal/configs/config.d/10_vdb.json new file mode 100644 index 0000000000..56198a4c12 --- /dev/null +++ b/plugins/pdal/configs/config.d/10_vdb.json @@ -0,0 +1,10 @@ +[ + { + "match": ".*(vdb)", + "options": { + "load-plugins": "vdb", + "volume": true, + "volume-inverse": true + } + } +] diff --git a/plugins/pdal/configs/thumbnail.d/10_vdb.json b/plugins/pdal/configs/thumbnail.d/10_vdb.json new file mode 100644 index 0000000000..56198a4c12 --- /dev/null +++ b/plugins/pdal/configs/thumbnail.d/10_vdb.json @@ -0,0 +1,10 @@ +[ + { + "match": ".*(vdb)", + "options": { + "load-plugins": "vdb", + "volume": true, + "volume-inverse": true + } + } +] diff --git a/plugins/pdal/f3d-vdb-formats.xml b/plugins/pdal/f3d-vdb-formats.xml new file mode 100644 index 0000000000..b7138c2e92 --- /dev/null +++ b/plugins/pdal/f3d-vdb-formats.xml @@ -0,0 +1,7 @@ + + + + VDB file + + + diff --git a/plugins/pdal/vdb.inl b/plugins/pdal/vdb.inl new file mode 100644 index 0000000000..f13db6a07b --- /dev/null +++ b/plugins/pdal/vdb.inl @@ -0,0 +1,11 @@ +void applyCustomReader(vtkAlgorithm* algo, const std::string&) const override +{ + vtkOpenVDBReader* vdbReader = vtkOpenVDBReader::SafeDownCast(algo); + vdbReader->UpdateInformation(); + + // An arbitrary value that let us read sample files from OpenVDB in a reasonable time frame + vdbReader->SetDownsamplingFactor(0.1); + + // Merge volumes together + vdbReader->MergeImageVolumesOn(); +} From 6bc28c19be2ab579c270f16d86362bb6ad8c91b1 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 18 Feb 2025 20:15:49 +0200 Subject: [PATCH 02/29] rename the files --- plugins/pdal/configs/config.d/{10_vdb.json => 10_pdal.json} | 0 plugins/pdal/configs/thumbnail.d/{10_vdb.json => 10_pdal.json} | 0 plugins/pdal/{f3d-vdb-formats.xml => f3d-pdal-formats.xml} | 0 plugins/pdal/{vdb.inl => pdal.inl} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename plugins/pdal/configs/config.d/{10_vdb.json => 10_pdal.json} (100%) rename plugins/pdal/configs/thumbnail.d/{10_vdb.json => 10_pdal.json} (100%) rename plugins/pdal/{f3d-vdb-formats.xml => f3d-pdal-formats.xml} (100%) rename plugins/pdal/{vdb.inl => pdal.inl} (100%) diff --git a/plugins/pdal/configs/config.d/10_vdb.json b/plugins/pdal/configs/config.d/10_pdal.json similarity index 100% rename from plugins/pdal/configs/config.d/10_vdb.json rename to plugins/pdal/configs/config.d/10_pdal.json diff --git a/plugins/pdal/configs/thumbnail.d/10_vdb.json b/plugins/pdal/configs/thumbnail.d/10_pdal.json similarity index 100% rename from plugins/pdal/configs/thumbnail.d/10_vdb.json rename to plugins/pdal/configs/thumbnail.d/10_pdal.json diff --git a/plugins/pdal/f3d-vdb-formats.xml b/plugins/pdal/f3d-pdal-formats.xml similarity index 100% rename from plugins/pdal/f3d-vdb-formats.xml rename to plugins/pdal/f3d-pdal-formats.xml diff --git a/plugins/pdal/vdb.inl b/plugins/pdal/pdal.inl similarity index 100% rename from plugins/pdal/vdb.inl rename to plugins/pdal/pdal.inl From 5e0f7ec02a21a7ee60a962fe4fb9d355382e4140 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sun, 23 Feb 2025 14:40:04 +0200 Subject: [PATCH 03/29] initial enablement --- CMakeLists.txt | 2 ++ plugins/CMakeLists.txt | 4 ++++ plugins/pdal/CMakeLists.txt | 22 +++++++++---------- plugins/pdal/configs/config.d/10_pdal.json | 4 ++-- plugins/pdal/configs/thumbnail.d/10_pdal.json | 4 ++-- plugins/pdal/f3d-pdal-formats.xml | 6 ++--- plugins/pdal/pdal.inl | 10 ++------- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d39afd9103..d4f6357da4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,7 @@ find_package(VTK 9.2.6 REQUIRED opengl IOExodus IOOpenVDB + IOPDAL RenderingRayTracing) message(STATUS "VTK ${VTK_VERSION} found") @@ -324,3 +325,4 @@ f3d_report_variable(F3D_PLUGIN_BUILD_EXODUS) f3d_report_variable(F3D_PLUGIN_BUILD_OCCT) f3d_report_variable(F3D_PLUGIN_BUILD_USD) f3d_report_variable(F3D_PLUGIN_BUILD_VDB) +f3d_report_variable(F3D_PLUGIN_BUILD_PDAL) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 3b0a5b54f2..e7cf4614ce 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -40,3 +40,7 @@ if (F3D_PLUGIN_BUILD_VDB) message(FATAL_ERROR "VDB plugin requires VTK >= 9.2.20220714") endif() endif() + +if (F3D_PLUGIN_BUILD_PDAL) + add_subdirectory(pdal) +endif() \ No newline at end of file diff --git a/plugins/pdal/CMakeLists.txt b/plugins/pdal/CMakeLists.txt index 6e3fc18d2c..5fa03359bc 100644 --- a/plugins/pdal/CMakeLists.txt +++ b/plugins/pdal/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.21) -project(f3d-plugin-vdb) +project(f3d-plugin-pdal) include(GNUInstallDirs) @@ -14,20 +14,20 @@ endif() f3d_plugin_init() f3d_plugin_declare_reader( - NAME VDB - EXTENSIONS vdb - MIMETYPES application/vnd.vdb - VTK_READER vtkOpenVDBReader - FORMAT_DESCRIPTION "VDB" - CUSTOM_CODE "${CMAKE_CURRENT_SOURCE_DIR}/vdb.inl" + NAME LAS + EXTENSIONS las + MIMETYPES application/vnd.las + VTK_READER vtkPDALReader + FORMAT_DESCRIPTION "LAS" + CUSTOM_CODE "${CMAKE_CURRENT_SOURCE_DIR}/pdal.inl" ) f3d_plugin_build( - NAME vdb + NAME pdal VERSION 1.0 - DESCRIPTION "VTK OpenVDB support" - VTK_MODULES IOOpenVDB - MIMETYPE_XML_FILES "${CMAKE_CURRENT_SOURCE_DIR}/f3d-vdb-formats.xml" + DESCRIPTION "VTK PDAL support" + VTK_MODULES IOPDAL + MIMETYPE_XML_FILES "${CMAKE_CURRENT_SOURCE_DIR}/f3d-pdal-formats.xml" CONFIGURATION_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/configs/config.d" "${CMAKE_CURRENT_SOURCE_DIR}/configs/thumbnail.d" FREEDESKTOP ) diff --git a/plugins/pdal/configs/config.d/10_pdal.json b/plugins/pdal/configs/config.d/10_pdal.json index 56198a4c12..760aae5fe2 100644 --- a/plugins/pdal/configs/config.d/10_pdal.json +++ b/plugins/pdal/configs/config.d/10_pdal.json @@ -1,8 +1,8 @@ [ { - "match": ".*(vdb)", + "match": ".*(las)", "options": { - "load-plugins": "vdb", + "load-plugins": "pdal", "volume": true, "volume-inverse": true } diff --git a/plugins/pdal/configs/thumbnail.d/10_pdal.json b/plugins/pdal/configs/thumbnail.d/10_pdal.json index 56198a4c12..760aae5fe2 100644 --- a/plugins/pdal/configs/thumbnail.d/10_pdal.json +++ b/plugins/pdal/configs/thumbnail.d/10_pdal.json @@ -1,8 +1,8 @@ [ { - "match": ".*(vdb)", + "match": ".*(las)", "options": { - "load-plugins": "vdb", + "load-plugins": "pdal", "volume": true, "volume-inverse": true } diff --git a/plugins/pdal/f3d-pdal-formats.xml b/plugins/pdal/f3d-pdal-formats.xml index b7138c2e92..cbc595e8db 100644 --- a/plugins/pdal/f3d-pdal-formats.xml +++ b/plugins/pdal/f3d-pdal-formats.xml @@ -1,7 +1,7 @@ - - VDB file - + + LAS file + diff --git a/plugins/pdal/pdal.inl b/plugins/pdal/pdal.inl index f13db6a07b..e163a1e556 100644 --- a/plugins/pdal/pdal.inl +++ b/plugins/pdal/pdal.inl @@ -1,11 +1,5 @@ void applyCustomReader(vtkAlgorithm* algo, const std::string&) const override { - vtkOpenVDBReader* vdbReader = vtkOpenVDBReader::SafeDownCast(algo); - vdbReader->UpdateInformation(); - - // An arbitrary value that let us read sample files from OpenVDB in a reasonable time frame - vdbReader->SetDownsamplingFactor(0.1); - - // Merge volumes together - vdbReader->MergeImageVolumesOn(); + vtkPDALReader* pdalReader = vtkPDALReader::SafeDownCast(algo); + pdalReader->UpdateInformation(); } From 73ce03610b025123c5e8a8736b755e5987299b34 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 25 Feb 2025 18:41:15 +0200 Subject: [PATCH 04/29] Fixed review comments --- CMakeLists.txt | 2 +- plugins/CMakeLists.txt | 2 +- plugins/pdal/CMakeLists.txt | 1 - plugins/pdal/configs/config.d/10_pdal.json | 2 -- plugins/pdal/configs/thumbnail.d/10_pdal.json | 2 -- plugins/pdal/f3d-pdal-formats.xml | 2 +- plugins/pdal/pdal.inl | 5 ----- 7 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 plugins/pdal/pdal.inl diff --git a/CMakeLists.txt b/CMakeLists.txt index d4f6357da4..69c2bc6140 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,7 @@ find_package(VTK 9.2.6 REQUIRED opengl IOExodus IOOpenVDB - IOPDAL + IOPDAL RenderingRayTracing) message(STATUS "VTK ${VTK_VERSION} found") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index e7cf4614ce..08106db6d2 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -43,4 +43,4 @@ endif() if (F3D_PLUGIN_BUILD_PDAL) add_subdirectory(pdal) -endif() \ No newline at end of file +endif() diff --git a/plugins/pdal/CMakeLists.txt b/plugins/pdal/CMakeLists.txt index 5fa03359bc..112fcd8e2b 100644 --- a/plugins/pdal/CMakeLists.txt +++ b/plugins/pdal/CMakeLists.txt @@ -19,7 +19,6 @@ f3d_plugin_declare_reader( MIMETYPES application/vnd.las VTK_READER vtkPDALReader FORMAT_DESCRIPTION "LAS" - CUSTOM_CODE "${CMAKE_CURRENT_SOURCE_DIR}/pdal.inl" ) f3d_plugin_build( diff --git a/plugins/pdal/configs/config.d/10_pdal.json b/plugins/pdal/configs/config.d/10_pdal.json index 760aae5fe2..89b406ecaa 100644 --- a/plugins/pdal/configs/config.d/10_pdal.json +++ b/plugins/pdal/configs/config.d/10_pdal.json @@ -3,8 +3,6 @@ "match": ".*(las)", "options": { "load-plugins": "pdal", - "volume": true, - "volume-inverse": true } } ] diff --git a/plugins/pdal/configs/thumbnail.d/10_pdal.json b/plugins/pdal/configs/thumbnail.d/10_pdal.json index 760aae5fe2..89b406ecaa 100644 --- a/plugins/pdal/configs/thumbnail.d/10_pdal.json +++ b/plugins/pdal/configs/thumbnail.d/10_pdal.json @@ -3,8 +3,6 @@ "match": ".*(las)", "options": { "load-plugins": "pdal", - "volume": true, - "volume-inverse": true } } ] diff --git a/plugins/pdal/f3d-pdal-formats.xml b/plugins/pdal/f3d-pdal-formats.xml index cbc595e8db..a77c3ea8e1 100644 --- a/plugins/pdal/f3d-pdal-formats.xml +++ b/plugins/pdal/f3d-pdal-formats.xml @@ -1,6 +1,6 @@ - + LAS file diff --git a/plugins/pdal/pdal.inl b/plugins/pdal/pdal.inl deleted file mode 100644 index e163a1e556..0000000000 --- a/plugins/pdal/pdal.inl +++ /dev/null @@ -1,5 +0,0 @@ -void applyCustomReader(vtkAlgorithm* algo, const std::string&) const override -{ - vtkPDALReader* pdalReader = vtkPDALReader::SafeDownCast(algo); - pdalReader->UpdateInformation(); -} From 9fcd61cf26251c76106f39f9f03ee2a9794a8519 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 4 Mar 2025 21:27:12 +0200 Subject: [PATCH 05/29] add support for other models --- plugins/pdal/CMakeLists.txt | 44 ++++++++++++++++++- plugins/pdal/configs/config.d/10_pdal.json | 2 +- plugins/pdal/configs/thumbnail.d/10_pdal.json | 2 +- plugins/pdal/f3d-pdal-formats.xml | 24 ++++++++++ 4 files changed, 68 insertions(+), 4 deletions(-) diff --git a/plugins/pdal/CMakeLists.txt b/plugins/pdal/CMakeLists.txt index 112fcd8e2b..d4b09a42b3 100644 --- a/plugins/pdal/CMakeLists.txt +++ b/plugins/pdal/CMakeLists.txt @@ -15,10 +15,50 @@ f3d_plugin_init() f3d_plugin_declare_reader( NAME LAS - EXTENSIONS las + EXTENSIONS las laz MIMETYPES application/vnd.las VTK_READER vtkPDALReader - FORMAT_DESCRIPTION "LAS" + FORMAT_DESCRIPTION "Lidar Data Exchange Format" +) + +f3d_plugin_declare_reader( + NAME E57 + EXTENSIONS e57 + MIMETYPES model/e57 + VTK_READER vtkPDALReader + FORMAT_DESCRIPTION "ASTM E57 3D Data Exchange" +) + +f3d_plugin_declare_reader( + NAME PTS + EXTENSIONS pts + MIMETYPES application/vnd.pts + VTK_READER vtkPDALReader + FORMAT_DESCRIPTION "Laser scan plain data format" +) + +f3d_plugin_declare_reader( + NAME PTX + EXTENSIONS ptx + MIMETYPES application/vnd.ptx + VTK_READER vtkPDALReader + FORMAT_DESCRIPTION "ptx plain text data format" +) + +f3d_plugin_declare_reader( + NAME PCD + EXTENSIONS pcd + MIMETYPES application/vnd.pcd + VTK_READER vtkPDALReader + FORMAT_DESCRIPTION "point cloud data" +) + +f3d_plugin_declare_reader( + NAME EPT + EXTENSIONS json + MIMETYPES application/vnd.ept + VTK_READER vtkPDALReader + FORMAT_DESCRIPTION "Entwine Point Tile" ) f3d_plugin_build( diff --git a/plugins/pdal/configs/config.d/10_pdal.json b/plugins/pdal/configs/config.d/10_pdal.json index 89b406ecaa..810192fbb2 100644 --- a/plugins/pdal/configs/config.d/10_pdal.json +++ b/plugins/pdal/configs/config.d/10_pdal.json @@ -1,6 +1,6 @@ [ { - "match": ".*(las)", + "match": ".*(e57|las|laz|pts|ptx|pcd|json)", "options": { "load-plugins": "pdal", } diff --git a/plugins/pdal/configs/thumbnail.d/10_pdal.json b/plugins/pdal/configs/thumbnail.d/10_pdal.json index 89b406ecaa..810192fbb2 100644 --- a/plugins/pdal/configs/thumbnail.d/10_pdal.json +++ b/plugins/pdal/configs/thumbnail.d/10_pdal.json @@ -1,6 +1,6 @@ [ { - "match": ".*(las)", + "match": ".*(e57|las|laz|pts|ptx|pcd|json)", "options": { "load-plugins": "pdal", } diff --git a/plugins/pdal/f3d-pdal-formats.xml b/plugins/pdal/f3d-pdal-formats.xml index a77c3ea8e1..5511502f44 100644 --- a/plugins/pdal/f3d-pdal-formats.xml +++ b/plugins/pdal/f3d-pdal-formats.xml @@ -4,4 +4,28 @@ LAS file + + Compressed LAS file + + + + ASTM E57 3D Data Exchange + + + + Laser scan plain data format + + + + ptx plain text data format + + + + point cloud data + + + + Entwine Point Tile + + From 7048e05abf79133ea645cac8effabf1478f172a0 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Mon, 10 Mar 2025 13:40:47 +0200 Subject: [PATCH 06/29] remove ept and e57 --- plugins/pdal/CMakeLists.txt | 16 ---------------- plugins/pdal/configs/config.d/10_pdal.json | 2 +- plugins/pdal/configs/thumbnail.d/10_pdal.json | 2 +- plugins/pdal/f3d-pdal-formats.xml | 8 -------- 4 files changed, 2 insertions(+), 26 deletions(-) diff --git a/plugins/pdal/CMakeLists.txt b/plugins/pdal/CMakeLists.txt index d4b09a42b3..f624f52987 100644 --- a/plugins/pdal/CMakeLists.txt +++ b/plugins/pdal/CMakeLists.txt @@ -21,14 +21,6 @@ f3d_plugin_declare_reader( FORMAT_DESCRIPTION "Lidar Data Exchange Format" ) -f3d_plugin_declare_reader( - NAME E57 - EXTENSIONS e57 - MIMETYPES model/e57 - VTK_READER vtkPDALReader - FORMAT_DESCRIPTION "ASTM E57 3D Data Exchange" -) - f3d_plugin_declare_reader( NAME PTS EXTENSIONS pts @@ -53,14 +45,6 @@ f3d_plugin_declare_reader( FORMAT_DESCRIPTION "point cloud data" ) -f3d_plugin_declare_reader( - NAME EPT - EXTENSIONS json - MIMETYPES application/vnd.ept - VTK_READER vtkPDALReader - FORMAT_DESCRIPTION "Entwine Point Tile" -) - f3d_plugin_build( NAME pdal VERSION 1.0 diff --git a/plugins/pdal/configs/config.d/10_pdal.json b/plugins/pdal/configs/config.d/10_pdal.json index 810192fbb2..b86fe42c23 100644 --- a/plugins/pdal/configs/config.d/10_pdal.json +++ b/plugins/pdal/configs/config.d/10_pdal.json @@ -1,6 +1,6 @@ [ { - "match": ".*(e57|las|laz|pts|ptx|pcd|json)", + "match": ".*(las|laz|pts|ptx|pcd)", "options": { "load-plugins": "pdal", } diff --git a/plugins/pdal/configs/thumbnail.d/10_pdal.json b/plugins/pdal/configs/thumbnail.d/10_pdal.json index 810192fbb2..b86fe42c23 100644 --- a/plugins/pdal/configs/thumbnail.d/10_pdal.json +++ b/plugins/pdal/configs/thumbnail.d/10_pdal.json @@ -1,6 +1,6 @@ [ { - "match": ".*(e57|las|laz|pts|ptx|pcd|json)", + "match": ".*(las|laz|pts|ptx|pcd)", "options": { "load-plugins": "pdal", } diff --git a/plugins/pdal/f3d-pdal-formats.xml b/plugins/pdal/f3d-pdal-formats.xml index 5511502f44..6dd561dfaf 100644 --- a/plugins/pdal/f3d-pdal-formats.xml +++ b/plugins/pdal/f3d-pdal-formats.xml @@ -8,10 +8,6 @@ Compressed LAS file - - ASTM E57 3D Data Exchange - - Laser scan plain data format @@ -24,8 +20,4 @@ point cloud data - - Entwine Point Tile - - From 878d5ac14dbe1224203f92c121e4127a4d03cf98 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Fri, 14 Mar 2025 17:05:20 +0200 Subject: [PATCH 07/29] first patch of tests --- application/testing/CMakeLists.txt | 11 +++++++++++ testing/baselines/TestPDALReadLAS.png | 3 +++ testing/baselines/TestPDALReadLAZ1.png | 3 +++ testing/baselines/TestPDALReadLAZ2.png | 3 +++ testing/baselines/TestPDALReadPCD1.png | 3 +++ testing/baselines/TestPDALReadPCD2.png | 3 +++ testing/baselines/TestPDALReadPTS1.png | 3 +++ testing/baselines/TestPDALReadPTS2.png | 3 +++ testing/baselines/TestPDALReadPTX.png | 3 +++ testing/data/1.2-with-color.ptx | 3 +++ testing/data/autzen-utm.pcd | 3 +++ testing/data/autzen.pts | 3 +++ testing/data/autzen_trim.laz | 3 +++ testing/data/bunny_8.pts | 3 +++ testing/data/laszip-generated.laz | 3 +++ testing/data/thin-2.las | 3 +++ testing/data/utm17_space.pcd | 3 +++ 17 files changed, 59 insertions(+) create mode 100644 testing/baselines/TestPDALReadLAS.png create mode 100644 testing/baselines/TestPDALReadLAZ1.png create mode 100644 testing/baselines/TestPDALReadLAZ2.png create mode 100644 testing/baselines/TestPDALReadPCD1.png create mode 100644 testing/baselines/TestPDALReadPCD2.png create mode 100644 testing/baselines/TestPDALReadPTS1.png create mode 100644 testing/baselines/TestPDALReadPTS2.png create mode 100644 testing/baselines/TestPDALReadPTX.png create mode 100644 testing/data/1.2-with-color.ptx create mode 100644 testing/data/autzen-utm.pcd create mode 100644 testing/data/autzen.pts create mode 100644 testing/data/autzen_trim.laz create mode 100644 testing/data/bunny_8.pts create mode 100644 testing/data/laszip-generated.laz create mode 100644 testing/data/thin-2.las create mode 100644 testing/data/utm17_space.pcd diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index adaa5027d0..601433961e 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -816,6 +816,17 @@ if(F3D_PLUGIN_BUILD_VDB) endif() endif () +if(F3D_PLUGIN_BUILD_VDB) + f3d_test(NAME TestPDALReadLAS DATA thin-2.las ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadLAZ1 DATA autzen_trim.laz ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadLAZ2 DATA laszip-generated.laz ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPCD1 DATA autzen-utm.pcd ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPCD2 DATA utm17_space.pcd ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPTX DATA 1.2-with-color.ptx ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPTS1 DATA autzen.pts ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPTS2 DATA bunny_8.pts ARGS --load-plugins=pdal) +endif () + if(F3D_PLUGIN_BUILD_ALEMBIC AND F3D_PLUGIN_BUILD_ASSIMP) f3d_test(NAME TestMultiplePluginsLoad DATA cow.vtp ARGS --load-plugins=assimp,alembic NO_BASELINE REGEXP_FAIL "Plugin failed to load") endif() diff --git a/testing/baselines/TestPDALReadLAS.png b/testing/baselines/TestPDALReadLAS.png new file mode 100644 index 0000000000..80965fb9c8 --- /dev/null +++ b/testing/baselines/TestPDALReadLAS.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3aaa361d254c391e42e404db0c00de26078dc179397b6e5d00924e08ac10c18 +size 1622 diff --git a/testing/baselines/TestPDALReadLAZ1.png b/testing/baselines/TestPDALReadLAZ1.png new file mode 100644 index 0000000000..151dc4b797 --- /dev/null +++ b/testing/baselines/TestPDALReadLAZ1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:383719dc45105570c444a19d8326958851b494ffa3d8646ca50df6b109951904 +size 1489 diff --git a/testing/baselines/TestPDALReadLAZ2.png b/testing/baselines/TestPDALReadLAZ2.png new file mode 100644 index 0000000000..f3108ad368 --- /dev/null +++ b/testing/baselines/TestPDALReadLAZ2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19f4f9e57d07dd9267ccc98951c482da5a98cc9edc4525afd2c3afbb5cd4efd5 +size 3534 diff --git a/testing/baselines/TestPDALReadPCD1.png b/testing/baselines/TestPDALReadPCD1.png new file mode 100644 index 0000000000..a888ca684e --- /dev/null +++ b/testing/baselines/TestPDALReadPCD1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9ccec08c8f796ccafac8a2d9feb2dcf2477785c1d64cb7b11a4a8f38cb5366e +size 3526 diff --git a/testing/baselines/TestPDALReadPCD2.png b/testing/baselines/TestPDALReadPCD2.png new file mode 100644 index 0000000000..52d2a15575 --- /dev/null +++ b/testing/baselines/TestPDALReadPCD2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:418a985d20746abff04c56d33896877b419d3d88ccb7751ca4b9938c141b8757 +size 982 diff --git a/testing/baselines/TestPDALReadPTS1.png b/testing/baselines/TestPDALReadPTS1.png new file mode 100644 index 0000000000..8a78ab4d4d --- /dev/null +++ b/testing/baselines/TestPDALReadPTS1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e98a4129f7972462a16d8e950a1170851164f18bc9418f4407e01f9493b38be +size 994 diff --git a/testing/baselines/TestPDALReadPTS2.png b/testing/baselines/TestPDALReadPTS2.png new file mode 100644 index 0000000000..b1a9a4bd9a --- /dev/null +++ b/testing/baselines/TestPDALReadPTS2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f563ed73851182825bd0dab20e61378f520bd75fefc5e4de4918de1f542b8a8 +size 1001 diff --git a/testing/baselines/TestPDALReadPTX.png b/testing/baselines/TestPDALReadPTX.png new file mode 100644 index 0000000000..f3108ad368 --- /dev/null +++ b/testing/baselines/TestPDALReadPTX.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19f4f9e57d07dd9267ccc98951c482da5a98cc9edc4525afd2c3afbb5cd4efd5 +size 3534 diff --git a/testing/data/1.2-with-color.ptx b/testing/data/1.2-with-color.ptx new file mode 100644 index 0000000000..63575c3fcb --- /dev/null +++ b/testing/data/1.2-with-color.ptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0004b6280e08241721fecc26bd62b66d52c16e6048e1a2f4603953c92d604161 +size 62876 diff --git a/testing/data/autzen-utm.pcd b/testing/data/autzen-utm.pcd new file mode 100644 index 0000000000..2d58177e35 --- /dev/null +++ b/testing/data/autzen-utm.pcd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e65b94db472d887b1df7a6a06c26ad8bfd1f3b52575f89ccf7f80e293c4b28e +size 55748 diff --git a/testing/data/autzen.pts b/testing/data/autzen.pts new file mode 100644 index 0000000000..f7a08a0ef8 --- /dev/null +++ b/testing/data/autzen.pts @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49c28ced5b5f6471f801ad853ab48cff435bfb457a72bad3849ef6aa615df40b +size 557 diff --git a/testing/data/autzen_trim.laz b/testing/data/autzen_trim.laz new file mode 100644 index 0000000000..c5e69ae122 --- /dev/null +++ b/testing/data/autzen_trim.laz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75867b3e75cfc3c2e96da9f753c04c9fbaa6a59468dea13e2859f3109b38bd66 +size 603353 diff --git a/testing/data/bunny_8.pts b/testing/data/bunny_8.pts new file mode 100644 index 0000000000..c7767dd410 --- /dev/null +++ b/testing/data/bunny_8.pts @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aea57c14b5de927484f8a69517077389f71601329472d414e85ad76ab63e5851 +size 248 diff --git a/testing/data/laszip-generated.laz b/testing/data/laszip-generated.laz new file mode 100644 index 0000000000..8e6f25b6f7 --- /dev/null +++ b/testing/data/laszip-generated.laz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94ab6a86596f9cc71c9cbf162d1b595d8326b1f3ed5e7c4ac0f48e77167cb8a6 +size 18219 diff --git a/testing/data/thin-2.las b/testing/data/thin-2.las new file mode 100644 index 0000000000..2beace98ee --- /dev/null +++ b/testing/data/thin-2.las @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da7bb67353a47b9ce4763cf5e604c91e180f2d37ed86d0450017d490834edf97 +size 181836 diff --git a/testing/data/utm17_space.pcd b/testing/data/utm17_space.pcd new file mode 100644 index 0000000000..48954405af --- /dev/null +++ b/testing/data/utm17_space.pcd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:580ff7ef5314387755234c132f5b1176ca886705ef31711aa33cf98edf5435c7 +size 416 From d8330f1ee82b6a09eceadafc6d959daad2185030 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 15 Mar 2025 17:11:09 +0200 Subject: [PATCH 08/29] more tests --- application/testing/CMakeLists.txt | 21 +++++++++++++++++++-- testing/baselines/TestPDALReadLAS1.png | 3 +++ testing/baselines/TestPDALReadLAS2.png | 3 +++ testing/baselines/TestPDALReadLAS3.png | 3 +++ testing/baselines/TestPDALReadLASPoints.png | 3 +++ testing/baselines/TestPDALReadLASVolume.png | 3 +++ testing/baselines/TestPDALReadPCD3.png | 3 +++ testing/baselines/TestPDALReadPTS3.png | 3 +++ testing/baselines/TestPDALReadPTX1.png | 3 +++ testing/baselines/TestPDALReadPTX2.png | 3 +++ testing/data/0450.las | 3 +++ testing/data/bunnyData.pts | 3 +++ testing/data/image_0002.pcd | 3 +++ testing/data/pump.ptx | 3 +++ testing/data/tile135.las | 3 +++ 15 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 testing/baselines/TestPDALReadLAS1.png create mode 100644 testing/baselines/TestPDALReadLAS2.png create mode 100644 testing/baselines/TestPDALReadLAS3.png create mode 100644 testing/baselines/TestPDALReadLASPoints.png create mode 100644 testing/baselines/TestPDALReadLASVolume.png create mode 100644 testing/baselines/TestPDALReadPCD3.png create mode 100644 testing/baselines/TestPDALReadPTS3.png create mode 100644 testing/baselines/TestPDALReadPTX1.png create mode 100644 testing/baselines/TestPDALReadPTX2.png create mode 100644 testing/data/0450.las create mode 100644 testing/data/bunnyData.pts create mode 100644 testing/data/image_0002.pcd create mode 100644 testing/data/pump.ptx create mode 100644 testing/data/tile135.las diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index 601433961e..c746f36914 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -817,14 +817,31 @@ if(F3D_PLUGIN_BUILD_VDB) endif () if(F3D_PLUGIN_BUILD_VDB) - f3d_test(NAME TestPDALReadLAS DATA thin-2.las ARGS --load-plugins=pdal) + # .las files + f3d_test(NAME TestPDALReadLAS1 DATA thin-2.las ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadLAS2 DATA 0450.las ARGS --load-plugins=pdal LONG_TIMEOUT) + f3d_test(NAME TestPDALReadLAS3 DATA tile135.las ARGS --load-plugins=pdal LONG_TIMEOUT) + f3d_test(NAME TestPDALReadLASVolume DATA thin-2.las ARGS --load-plugins=vdb --volume --volume-inverse) + f3d_test(NAME TestPDALReadLASPoints DATA thin-2.las ARGS --load-plugins=vdb -o) + f3d_test(NAME TestPDALReadLASVerbose DATA thin-2.las ARGS --load-plugins=vdb REGEXP "PartitionedDataSet" NO_RENDER) + + # .laz files f3d_test(NAME TestPDALReadLAZ1 DATA autzen_trim.laz ARGS --load-plugins=pdal) f3d_test(NAME TestPDALReadLAZ2 DATA laszip-generated.laz ARGS --load-plugins=pdal) + + # .pcd files f3d_test(NAME TestPDALReadPCD1 DATA autzen-utm.pcd ARGS --load-plugins=pdal) f3d_test(NAME TestPDALReadPCD2 DATA utm17_space.pcd ARGS --load-plugins=pdal) - f3d_test(NAME TestPDALReadPTX DATA 1.2-with-color.ptx ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPCD3 DATA image_0002.pcd ARGS --load-plugins=pdal) + + # .ptx files + f3d_test(NAME TestPDALReadPTX1 DATA 1.2-with-color.ptx ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPTX2 DATA pump.ptx ARGS --load-plugins=pdal LONG_TIMEOUT) + + # .pts files f3d_test(NAME TestPDALReadPTS1 DATA autzen.pts ARGS --load-plugins=pdal) f3d_test(NAME TestPDALReadPTS2 DATA bunny_8.pts ARGS --load-plugins=pdal) + f3d_test(NAME TestPDALReadPTS3 DATA bunnyData.pts ARGS --load-plugins=pdal) endif () if(F3D_PLUGIN_BUILD_ALEMBIC AND F3D_PLUGIN_BUILD_ASSIMP) diff --git a/testing/baselines/TestPDALReadLAS1.png b/testing/baselines/TestPDALReadLAS1.png new file mode 100644 index 0000000000..80965fb9c8 --- /dev/null +++ b/testing/baselines/TestPDALReadLAS1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3aaa361d254c391e42e404db0c00de26078dc179397b6e5d00924e08ac10c18 +size 1622 diff --git a/testing/baselines/TestPDALReadLAS2.png b/testing/baselines/TestPDALReadLAS2.png new file mode 100644 index 0000000000..181394804e --- /dev/null +++ b/testing/baselines/TestPDALReadLAS2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12f33d99f61af99befb9e354755eded5f60ac74f03e898caa5cbe58a49df170e +size 1739 diff --git a/testing/baselines/TestPDALReadLAS3.png b/testing/baselines/TestPDALReadLAS3.png new file mode 100644 index 0000000000..7505aaa2d5 --- /dev/null +++ b/testing/baselines/TestPDALReadLAS3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c86cd8eda8c7c6e02430b10fdf5dc2d2f4c86eaf02652cdfcd531f9835d5e6f7 +size 1063 diff --git a/testing/baselines/TestPDALReadLASPoints.png b/testing/baselines/TestPDALReadLASPoints.png new file mode 100644 index 0000000000..8e76f53279 --- /dev/null +++ b/testing/baselines/TestPDALReadLASPoints.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bc2e171404566cd12d33660ef232a6c35d3ff8cd77dc074575ac44792d957ee +size 124052 diff --git a/testing/baselines/TestPDALReadLASVolume.png b/testing/baselines/TestPDALReadLASVolume.png new file mode 100644 index 0000000000..2aafe74a2a --- /dev/null +++ b/testing/baselines/TestPDALReadLASVolume.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2312f21b34932ca416a6697ed289dd62e4a8018aaac3717180b6e19d1e8bbeb1 +size 913 diff --git a/testing/baselines/TestPDALReadPCD3.png b/testing/baselines/TestPDALReadPCD3.png new file mode 100644 index 0000000000..1f147b5b89 --- /dev/null +++ b/testing/baselines/TestPDALReadPCD3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9d8e015aadc6e60534dc85ecb512c2c64a0533a8e5cd33dc05e27d5ca7507e7 +size 1659 diff --git a/testing/baselines/TestPDALReadPTS3.png b/testing/baselines/TestPDALReadPTS3.png new file mode 100644 index 0000000000..adc3c45cc5 --- /dev/null +++ b/testing/baselines/TestPDALReadPTS3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fbced265737d17cd46b8a318e56ebc7ff62890c6e854dc310c66f321b17760a +size 1997 diff --git a/testing/baselines/TestPDALReadPTX1.png b/testing/baselines/TestPDALReadPTX1.png new file mode 100644 index 0000000000..f3108ad368 --- /dev/null +++ b/testing/baselines/TestPDALReadPTX1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19f4f9e57d07dd9267ccc98951c482da5a98cc9edc4525afd2c3afbb5cd4efd5 +size 3534 diff --git a/testing/baselines/TestPDALReadPTX2.png b/testing/baselines/TestPDALReadPTX2.png new file mode 100644 index 0000000000..3fa342582b --- /dev/null +++ b/testing/baselines/TestPDALReadPTX2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:057aa089df0bb698e877037fe24266dc0bd3cbbdb86ffb1c8f076ad16f94e6f7 +size 2044 diff --git a/testing/data/0450.las b/testing/data/0450.las new file mode 100644 index 0000000000..0953ed3c74 --- /dev/null +++ b/testing/data/0450.las @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9bea8e6402725f714d05dfb014e571a68152e2196ee7cdd834517e8f7c858fa +size 91882377 diff --git a/testing/data/bunnyData.pts b/testing/data/bunnyData.pts new file mode 100644 index 0000000000..4b32034eaa --- /dev/null +++ b/testing/data/bunnyData.pts @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bc55437d6c3a6b3fbf6e63e9f909a6ab9e0bf73cc43628e243d720a6e04d40f +size 880566 diff --git a/testing/data/image_0002.pcd b/testing/data/image_0002.pcd new file mode 100644 index 0000000000..79e2babc4a --- /dev/null +++ b/testing/data/image_0002.pcd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9f59921279d99c61f7a75b495ca9c3110ccc704e453d3482a43213075c83f03 +size 388501 diff --git a/testing/data/pump.ptx b/testing/data/pump.ptx new file mode 100644 index 0000000000..9e78f5df98 --- /dev/null +++ b/testing/data/pump.ptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02fbb5f6d8978d068b6397a1a33bb18dda487f4ded7ee4ab06c7d595f6a538d4 +size 94464444 diff --git a/testing/data/tile135.las b/testing/data/tile135.las new file mode 100644 index 0000000000..a39d8a3b56 --- /dev/null +++ b/testing/data/tile135.las @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c849a09a636e0dc9dc57b8ac11897d7be3f11cbf978d188e44948f1a25e2664 +size 111597225 From 23d52c3162084cfb1d71adae9280feef993d6a4a Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 15 Mar 2025 17:16:44 +0200 Subject: [PATCH 09/29] remove one test --- application/testing/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index c746f36914..092c70f6eb 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -821,9 +821,8 @@ if(F3D_PLUGIN_BUILD_VDB) f3d_test(NAME TestPDALReadLAS1 DATA thin-2.las ARGS --load-plugins=pdal) f3d_test(NAME TestPDALReadLAS2 DATA 0450.las ARGS --load-plugins=pdal LONG_TIMEOUT) f3d_test(NAME TestPDALReadLAS3 DATA tile135.las ARGS --load-plugins=pdal LONG_TIMEOUT) - f3d_test(NAME TestPDALReadLASVolume DATA thin-2.las ARGS --load-plugins=vdb --volume --volume-inverse) - f3d_test(NAME TestPDALReadLASPoints DATA thin-2.las ARGS --load-plugins=vdb -o) - f3d_test(NAME TestPDALReadLASVerbose DATA thin-2.las ARGS --load-plugins=vdb REGEXP "PartitionedDataSet" NO_RENDER) + f3d_test(NAME TestPDALReadLASVolume DATA thin-2.las ARGS --load-plugins=pdal --volume --volume-inverse) + f3d_test(NAME TestPDALReadLASPoints DATA thin-2.las ARGS --load-plugins=pdal -o) # .laz files f3d_test(NAME TestPDALReadLAZ1 DATA autzen_trim.laz ARGS --load-plugins=pdal) From a90c481c9b1c768b9cd768e2467bf9cb7af8e66e Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 18 Mar 2025 10:46:35 +0200 Subject: [PATCH 10/29] Add CI logic --- .github/actions/coverage-ci/action.yml | 8 +- .github/actions/gdal-install-dep/action.yml | 80 +++++++++++++++++ .../actions/generic-dependencies/action.yml | 4 + .github/actions/pdal-install-dep/action.yml | 85 +++++++++++++++++++ .github/actions/static-analysis-ci/action.yml | 8 +- .github/actions/vtk-dependencies/action.yml | 15 ++++ .github/actions/vtk-install-dep/action.yml | 9 +- .github/actions/zlib-install-dep/action.yml | 2 +- .github/workflows/ci.yml | 18 ++++ .github/workflows/nightly_vtk_master.yml | 7 ++ .github/workflows/versions.json | 5 +- 11 files changed, 235 insertions(+), 6 deletions(-) create mode 100644 .github/actions/gdal-install-dep/action.yml create mode 100644 .github/actions/pdal-install-dep/action.yml diff --git a/.github/actions/coverage-ci/action.yml b/.github/actions/coverage-ci/action.yml index fd4fddd381..6d0ecd4d0e 100644 --- a/.github/actions/coverage-ci/action.yml +++ b/.github/actions/coverage-ci/action.yml @@ -26,6 +26,9 @@ inputs: openvdb_version: description: 'Version of openvdb to build' required: false + pdal_version: + description: 'Version of PDAL to build' + required: false usd_version: description: 'Version of usd to build' required: false @@ -60,6 +63,7 @@ runs: occt_version: ${{inputs.occt_version}} openexr_version: ${{inputs.openexr_version}} openvdb_version: ${{inputs.openvdb_version}} + pdal_version: ${{inputs.pdal_version}} usd_version: ${{inputs.usd_version}} - name: Install VTK dependency @@ -68,6 +72,7 @@ runs: vtk_version: ${{inputs.vtk_version}} raytracing_label: raytracing openvdb_version: ${{inputs.openvdb_version}} + pdal_version: ${{inputs.pdal_version}} # coverage build is done in source as it seems to be required for codecov # CMAKE_MODULE_PATH is required because of @@ -83,7 +88,7 @@ runs: -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON - -DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/ + -DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/:$(pwd)/../dependencies/install/lib/cmake/PDAL/ -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/ -DF3D_COVERAGE=ON -DF3D_MODULE_EXR=ON @@ -96,6 +101,7 @@ runs: -DF3D_PLUGIN_BUILD_OCCT=ON -DF3D_PLUGIN_BUILD_USD=ON -DF3D_PLUGIN_BUILD_VDB=ON + -DF3D_PLUGIN_BUILD_PDAL=ON -DF3D_STRICT_BUILD=ON -DF3D_TESTING_ENABLE_EGL_TESTS=ON -DF3D_TESTING_ENABLE_EXTERNAL_GLFW=ON diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml new file mode 100644 index 0000000000..1694c74b00 --- /dev/null +++ b/.github/actions/gdal-install-dep/action.yml @@ -0,0 +1,80 @@ +name: 'Install GDAL Dependency' +description: 'Install GDAL Dependency using cache when possible' +inputs: + cpu: + description: 'CPU architecture to build for' + required: false + default: 'x86_64' + +runs: + using: "composite" + steps: + + - name: Cache GDAL + id: cache-gdal + uses: actions/cache/restore@v4 + with: + path: dependencies/gdal_install + key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 + + # Dependents: pdal, proj + - name: Checkout GDAL + if: steps.cache-gdal.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + with: + repository: OSGeo/gdal + path: './dependencies/gdal' + ref: v3.8.0 + + - name: Setup GDAL + if: steps.cache-gdal.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies + shell: bash + run: | + mkdir gdal_build + mkdir gdal_install + + - name: Configure GDAL + if: steps.cache-gdal.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/gdal_build + shell: bash + run: > + cmake ../gdal + -DBUILD_SHARED_LIBS=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=../gdal_install + -DGDAL_USE_EXTERNAL_LIBS=ON + -DGDAL_ENABLE_DRIVER_GPKG=ON + -DGDAL_ENABLE_DRIVER_TIFF=ON + -DGDAL_ENABLE_DRIVER_NETCDF=OFF + -DGDAL_ENABLE_DRIVER_POSTGIS=OFF + -DGDAL_ENABLE_DRIVER_SHP=ON + -DGDAL_ENABLE_DRIVER_VRT=ON + -DGDAL_ENABLE_DRIVER_PDF=OFF + -DGDAL_ENABLE_DRIVER_OPENJPEG=OFF + -DGDAL_ENABLE_DRIVER_JPEG=ON + -DGDAL_ENABLE_DRIVER_PNG=ON + -DGDAL_USE_ZLIB=ON + -DGDAL_USE_LZMA=ON + -DGDAL_USE_ZSTD=ON + -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/ + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + + - name: Build GDAL + if: steps.cache-gdal.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/gdal_build + shell: bash + run: cmake --build . --parallel 2 --target install --config Release + + - name: Copy to install + working-directory: ${{github.workspace}}/dependencies/gdal_install + shell: bash + run: cp -r ./* ../install/ + + - name: Save cache + if: steps.cache-gdal.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: ${{ steps.cache-gdal.outputs.cache-primary-key }} + path: dependencies/gdal_install diff --git a/.github/actions/generic-dependencies/action.yml b/.github/actions/generic-dependencies/action.yml index 0e4a77670c..fff0bb855b 100644 --- a/.github/actions/generic-dependencies/action.yml +++ b/.github/actions/generic-dependencies/action.yml @@ -31,6 +31,9 @@ inputs: openvdb_version: description: 'Version of openvdb to build' required: false + pdal_version: + description: 'Version of PDAL to build' + required: false pybind11_version: description: 'Version of pybind11 to build' required: false @@ -55,6 +58,7 @@ runs: with: cpu: ${{inputs.cpu}} openvdb_version: ${{inputs.openvdb_version}} + pdal_version: ${{inputs.pdal_version}} - name: Install Raytracing Dependencies if: inputs.raytracing_label == 'raytracing' diff --git a/.github/actions/pdal-install-dep/action.yml b/.github/actions/pdal-install-dep/action.yml new file mode 100644 index 0000000000..167ee423fd --- /dev/null +++ b/.github/actions/pdal-install-dep/action.yml @@ -0,0 +1,85 @@ +name: 'Install PDAL Dependency' +description: 'Install PDAL Dependency using cache when possible' +inputs: + cpu: + description: 'CPU architecture to build for' + required: false + default: 'x86_64' + version: + description: 'Version of PDAL to build' + required: true + +runs: + using: "composite" + steps: + + - name: Check required inputs + shell: bash + run: | + [[ "${{ inputs.version }}" ]] || { echo "version input is empty" ; exit 1; } + + - name: Cache PDAL + id: cache-pdal + uses: actions/cache/restore@v4 + with: + path: dependencies/pdal_install + key: pdal-${{inputs.version}}-${{runner.os}}-${{inputs.cpu}}-0 + + # Dependents (not version): vtk + - name: Checkout PDAL + if: steps.cache-pdal.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + with: + repository: PDAL/PDAL + path: './dependencies/pdal' + ref: ${{inputs.version}} + + - name: Setup PDAL + if: steps.cache-pdal.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies + shell: bash + run: | + mkdir pdal_build + mkdir pdal_install + + - name: Configure PDAL + if: steps.cache-pdal.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/pdal_build + shell: bash + run: > + cmake ../pdal + -DBUILD_SHARED_LIBS=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_CXX_STANDARD_REQUIRED=ON + -DCMAKE_CXX_EXTENSIONS=OFF + -DCMAKE_INSTALL_LIBDIR:PATH=lib + -DCMAKE_INSTALL_PREFIX=../pdal_install + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/ + -DWITH_TESTS=OFF + -DWITH_COMPLETION=OFF + -DWITH_LASZIP=ON + -DWITH_ZSTD=ON + -DWITH_LZMA=ON + -DWITH_GDAL=ON + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + + - name: Build PDAL + if: steps.cache-pdal.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/pdal_build + shell: bash + run: cmake --build . --parallel 2 --target install --config Release + + - name: Copy to install + working-directory: ${{github.workspace}}/dependencies/pdal_install + shell: bash + run: cp -r ./* ../install/ + + - name: Save cache + if: steps.cache-pdal.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: ${{ steps.cache-pdal.outputs.cache-primary-key }} + path: dependencies/pdal_install diff --git a/.github/actions/static-analysis-ci/action.yml b/.github/actions/static-analysis-ci/action.yml index 4aa1be39f8..b0a64157d9 100644 --- a/.github/actions/static-analysis-ci/action.yml +++ b/.github/actions/static-analysis-ci/action.yml @@ -22,6 +22,9 @@ inputs: openvdb_version: description: 'Version of openvdb to build' required: true + pdal_version: + description: 'Version of PDAL to build' + required: true usd_version: description: 'Version of usd to build' required: true @@ -56,6 +59,7 @@ runs: occt_version: ${{inputs.occt_version}} openexr_version: ${{inputs.openexr_version}} openvdb_version: ${{inputs.openvdb_version}} + pdal_version: ${{inputs.pdal_version}} usd_version: ${{inputs.usd_version}} - name: Install VTK dependency @@ -63,6 +67,7 @@ runs: with: vtk_version: ${{inputs.vtk_version}} openvdb_version: ${{inputs.openvdb_version}} + pdal_version: ${{inputs.pdal_version}} - name: Setup Build Directory shell: bash @@ -81,7 +86,7 @@ runs: --warn-uninitialized -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release - -DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/ + -DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/:$(pwd)/../dependencies/install/lib/cmake/PDAL/ -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/ -DF3D_MODULE_EXR=ON -DF3D_MODULE_UI=ON @@ -91,6 +96,7 @@ runs: -DF3D_PLUGIN_BUILD_OCCT=ON -DF3D_PLUGIN_BUILD_USD=ON -DF3D_PLUGIN_BUILD_VDB=ON + -DF3D_PLUGIN_BUILD_PDAL=ON -DF3D_STRICT_BUILD=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON diff --git a/.github/actions/vtk-dependencies/action.yml b/.github/actions/vtk-dependencies/action.yml index 958fb57c15..865122a206 100644 --- a/.github/actions/vtk-dependencies/action.yml +++ b/.github/actions/vtk-dependencies/action.yml @@ -12,6 +12,9 @@ inputs: openvdb_version: description: 'Version of openvdb to build' required: false + pdal_version: + description: 'Version of PDAL to build' + required: false runs: using: "composite" @@ -39,9 +42,21 @@ runs: with: cpu: ${{inputs.cpu}} + - name: Install GDAL + uses: ./.actions/gdal-install-dep + with: + cpu: ${{inputs.cpu}} + - name: Install OpenVDB if: inputs.openvdb_version != '' uses: ./.actions/openvdb-install-dep with: cpu: ${{inputs.cpu}} version: ${{inputs.openvdb_version}} + + - name: Install PDAL + if: inputs.pdal_version != '' + uses: ./.actions/pdal-install-dep + with: + cpu: ${{inputs.cpu}} + version: ${{inputs.pdal_version}} diff --git a/.github/actions/vtk-install-dep/action.yml b/.github/actions/vtk-install-dep/action.yml index 1dbbd66da6..b9bc40bb95 100644 --- a/.github/actions/vtk-install-dep/action.yml +++ b/.github/actions/vtk-install-dep/action.yml @@ -13,7 +13,10 @@ inputs: required: false default: 'x86_64' openvdb_version: - description: 'Version of openvdb to build against' + description: 'Version of OpenVDB to build against' + required: false + pdal_version: + description: 'Version of PDAL to build against' required: false runs: @@ -30,7 +33,7 @@ runs: uses: actions/cache/restore@v4 with: path: dependencies/vtk_install - key: vtk-${{ inputs.vtk_version }}-openvdb-${{inputs.openvdb_version}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.cpu}}-8 + key: vtk-${{ inputs.vtk_version }}-openvdb-${{inputs.openvdb_version}}-pdal-${{inputs.pdal_version}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.cpu}}-9 - name: Setup VTK if: steps.cache-vtk.outputs.cache-hit != 'true' @@ -76,6 +79,7 @@ runs: -DCMAKE_INSTALL_PREFIX:PATH=../vtk_install -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/ -DOpenVDB_CMAKE_PATH=${{ inputs.openvdb_version != '' && '$(pwd)/../install/lib/cmake/OpenVDB/' || '' }} + -DPDAL_CMAKE_PATH=${{ inputs.pdal_version != '' && '$(pwd)/../install/lib/cmake/PDAL/' || '' }} -DVTKOSPRAY_ENABLE_DENOISER=ON -DVTK_BUILD_TESTING=OFF -DVTK_DEBUG_LEAKS=ON @@ -94,6 +98,7 @@ runs: -DVTK_MODULE_ENABLE_VTK_IOImage=YES -DVTK_MODULE_ENABLE_VTK_IOImport=YES -DVTK_MODULE_ENABLE_VTK_IOOpenVDB=${{ inputs.openvdb_version != '' && 'YES' || 'DEFAULT' }} + -DVTK_MODULE_ENABLE_VTK_IOPDAL=${{ inputs.pdal_version != '' && 'YES' || 'DEFAULT' }} -DVTK_MODULE_ENABLE_VTK_IOPLY=YES -DVTK_MODULE_ENABLE_VTK_IOParallel=YES -DVTK_MODULE_ENABLE_VTK_IOXML=YES diff --git a/.github/actions/zlib-install-dep/action.yml b/.github/actions/zlib-install-dep/action.yml index 4ed366a94a..b05c0226f7 100644 --- a/.github/actions/zlib-install-dep/action.yml +++ b/.github/actions/zlib-install-dep/action.yml @@ -17,7 +17,7 @@ runs: path: dependencies/zlib_install key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 - # Dependents: blosc openvdb vtk + # Dependents: blosc openvdb pdal vtk - name: Checkout zlib if: steps.cache-zlib.outputs.cache-hit != 'true' uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd6436ea73..38b476abb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,8 @@ jobs: openexr_min_version: ${{ steps.set_default_versions.outputs.openexr_min_version }} openvdb_version: ${{ steps.set_default_versions.outputs.openvdb_version }} openvdb_min_version: ${{ steps.set_default_versions.outputs.openvdb_min_version }} + pdal_version: ${{ steps.set_default_versions.outputs.pdal_version }} + pdal_min_version: ${{ steps.set_default_versions.outputs.pdal_min_version }} pybind11_version: ${{ steps.set_default_versions.outputs.pybind11_version }} pybind11_min_version: ${{ steps.set_default_versions.outputs.pybind11_min_version }} python_version: ${{ steps.set_default_versions.outputs.python_version }} @@ -105,6 +107,7 @@ jobs: - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - build_type: mindeps @@ -116,6 +119,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_min_version}} openexr_version: ${{needs.default_versions.outputs.openexr_min_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_min_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_min_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_min_version}} usd_version: ${{needs.default_versions.outputs.usd_min_version}} @@ -141,6 +145,7 @@ jobs: occt_version: ${{matrix.occt_version}} openexr_version: ${{matrix.openexr_version}} openvdb_version: ${{matrix.openvdb_version}} + pdal_version: ${{matrix.pdal_version}} pybind11_version: ${{matrix.pybind11_version}} usd_version: ${{matrix.usd_version}} @@ -183,6 +188,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -212,6 +218,7 @@ jobs: - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -229,6 +236,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -246,6 +254,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -263,6 +272,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -287,6 +297,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -304,6 +315,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_min_version}} openexr_version: ${{needs.default_versions.outputs.openexr_min_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_min_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_min_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_min_version}} python_version: ${{needs.default_versions.outputs.python_min_version}} usd_version: ${{needs.default_versions.outputs.usd_min_version}} @@ -340,6 +352,7 @@ jobs: occt_version: ${{matrix.occt_version}} openexr_version: ${{matrix.openexr_version}} openvdb_version: ${{matrix.openvdb_version}} + pdal_version: ${{matrix.pdal_version}} pybind11_version: ${{matrix.pybind11_version}} python_version: ${{matrix.python_version}} usd_version: ${{matrix.usd_version}} @@ -379,6 +392,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -429,6 +443,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -483,6 +498,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} @@ -522,6 +538,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} @@ -606,6 +623,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} diff --git a/.github/workflows/nightly_vtk_master.yml b/.github/workflows/nightly_vtk_master.yml index 77c73154cf..fb8cdf8c47 100644 --- a/.github/workflows/nightly_vtk_master.yml +++ b/.github/workflows/nightly_vtk_master.yml @@ -54,6 +54,8 @@ jobs: openexr_min_version: ${{ steps.set_default_versions.outputs.openexr_min_version }} openvdb_version: ${{ steps.set_default_versions.outputs.openvdb_version }} openvdb_min_version: ${{ steps.set_default_versions.outputs.openvdb_min_version }} + pdal_version: ${{ steps.set_default_versions.outputs.pdal_version }} + pdal_min_version: ${{ steps.set_default_versions.outputs.pdal_min_version }} pybind11_version: ${{ steps.set_default_versions.outputs.pybind11_version }} pybind11_min_version: ${{ steps.set_default_versions.outputs.pybind11_min_version }} python_version: ${{ steps.set_default_versions.outputs.python_version }} @@ -136,6 +138,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -185,6 +188,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -221,6 +225,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -257,6 +262,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} @@ -307,6 +313,7 @@ jobs: occt_version: ${{needs.default_versions.outputs.occt_version}} openexr_version: ${{needs.default_versions.outputs.openexr_version}} openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} python_version: ${{needs.default_versions.outputs.python_version}} usd_version: ${{needs.default_versions.outputs.usd_version}} diff --git a/.github/workflows/versions.json b/.github/workflows/versions.json index 6680671ed3..703f6749f8 100644 --- a/.github/workflows/versions.json +++ b/.github/workflows/versions.json @@ -4,7 +4,8 @@ "OpenEXR is part of VFX reference platform (CY2025: 3.3.x)", "OpenVDB is part of VFX reference platform (CY2025: 12.x)", "OpenVDB min version is not enforced by F3D code and missing from VTK code", - "Python is part of VFX reference platform (CY2025: 3.11)" + "Python is part of VFX reference platform (CY2025: 3.11)", + "PDAL is now used in VTK and should be included as a dependency." ], "versions": { "alembic": "1.8.8", @@ -13,6 +14,7 @@ "occt": "V7_8_1", "openexr": "v3.3.2", "openvdb": "v12.0.0", + "pdal": "2.8.4", "pybind11": "v2.13.6", "python": "3.11", "usd": "v24.11", @@ -25,6 +27,7 @@ "occt": "V7_6_3", "openexr": "v3.0.1", "openvdb": "v12.0.0", + "pdal": "2.6.0", "pybind11": "v2.9.2", "python": "3.9", "usd": "v24.08", From 70ccd01d8ad5c3a1343bb7f11710779993992be0 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Thu, 27 Mar 2025 14:13:27 +0200 Subject: [PATCH 11/29] syntax fix to configs jsons --- plugins/pdal/configs/config.d/10_pdal.json | 2 +- plugins/pdal/configs/thumbnail.d/10_pdal.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pdal/configs/config.d/10_pdal.json b/plugins/pdal/configs/config.d/10_pdal.json index b86fe42c23..273f57a4b5 100644 --- a/plugins/pdal/configs/config.d/10_pdal.json +++ b/plugins/pdal/configs/config.d/10_pdal.json @@ -2,7 +2,7 @@ { "match": ".*(las|laz|pts|ptx|pcd)", "options": { - "load-plugins": "pdal", + "load-plugins": "pdal" } } ] diff --git a/plugins/pdal/configs/thumbnail.d/10_pdal.json b/plugins/pdal/configs/thumbnail.d/10_pdal.json index b86fe42c23..273f57a4b5 100644 --- a/plugins/pdal/configs/thumbnail.d/10_pdal.json +++ b/plugins/pdal/configs/thumbnail.d/10_pdal.json @@ -2,7 +2,7 @@ { "match": ".*(las|laz|pts|ptx|pcd)", "options": { - "load-plugins": "pdal", + "load-plugins": "pdal" } } ] From 1b67c16ccbc7f852732db15295b971933bf03e8c Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Thu, 27 Mar 2025 14:34:09 +0200 Subject: [PATCH 12/29] fixes from CR --- .github/actions/static-analysis-ci/action.yml | 2 +- .github/workflows/versions.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/static-analysis-ci/action.yml b/.github/actions/static-analysis-ci/action.yml index b0a64157d9..87b1e0b8a1 100644 --- a/.github/actions/static-analysis-ci/action.yml +++ b/.github/actions/static-analysis-ci/action.yml @@ -86,7 +86,7 @@ runs: --warn-uninitialized -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release - -DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/:$(pwd)/../dependencies/install/lib/cmake/PDAL/ + -DCMAKE_MODULE_PATH=$(pwd)/../dependencies/install/lib/cmake/OpenVDB/ -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/ -DF3D_MODULE_EXR=ON -DF3D_MODULE_UI=ON diff --git a/.github/workflows/versions.json b/.github/workflows/versions.json index 703f6749f8..147b1c8e0e 100644 --- a/.github/workflows/versions.json +++ b/.github/workflows/versions.json @@ -4,8 +4,7 @@ "OpenEXR is part of VFX reference platform (CY2025: 3.3.x)", "OpenVDB is part of VFX reference platform (CY2025: 12.x)", "OpenVDB min version is not enforced by F3D code and missing from VTK code", - "Python is part of VFX reference platform (CY2025: 3.11)", - "PDAL is now used in VTK and should be included as a dependency." + "Python is part of VFX reference platform (CY2025: 3.11)" ], "versions": { "alembic": "1.8.8", From 71b1cac8bf5180642131a1aa2bc9ccb929dee679 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Thu, 27 Mar 2025 14:34:30 +0200 Subject: [PATCH 13/29] copy zlib install dep to proj install dep --- .github/actions/proj-install-dep/action.yml | 65 +++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/actions/proj-install-dep/action.yml diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml new file mode 100644 index 0000000000..b05c0226f7 --- /dev/null +++ b/.github/actions/proj-install-dep/action.yml @@ -0,0 +1,65 @@ +name: 'Install zlib Dependency' +description: 'Install zlib Dependency using cache when possible' +inputs: + cpu: + description: 'CPU architecture to build for' + required: false + default: 'x86_64' + +runs: + using: "composite" + steps: + + - name: Cache zlib + id: cache-zlib + uses: actions/cache/restore@v4 + with: + path: dependencies/zlib_install + key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 + + # Dependents: blosc openvdb pdal vtk + - name: Checkout zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + with: + repository: madler/zlib + path: './dependencies/zlib' + ref: v1.3.1 + + - name: Setup zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies + shell: bash + run: | + mkdir zlib_build + mkdir zlib_install + + - name: Configure zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build + shell: bash + run: > + cmake ../zlib + -DBUILD_SHARED_LIBS=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=../zlib_install + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + + - name: Build zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build + shell: bash + run: cmake --build . --parallel 2 --target install --config Release + + - name: Copy to install + working-directory: ${{github.workspace}}/dependencies/zlib_install + shell: bash + run: cp -r ./* ../install/ + + - name: Save cache + if: steps.cache-zlib.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: ${{ steps.cache-zlib.outputs.cache-primary-key }} + path: dependencies/zlib_install From ac3b28f5103789a35c8cc505d15d3978095f5798 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Thu, 27 Mar 2025 14:50:31 +0200 Subject: [PATCH 14/29] build proj, as gdal depend on it --- .github/actions/gdal-install-dep/action.yml | 6 +++ .github/actions/proj-install-dep/action.yml | 58 +++++++++++---------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 1694c74b00..2148e01d6b 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -18,6 +18,12 @@ runs: key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 # Dependents: pdal, proj + - name: Install PROJ Dependency + if: steps.cache-gdal.outputs.cache-hit != 'true' + uses: ./source/.github/actions/proj-install-dep + with: + cpu: ${{ inputs.cpu }} + - name: Checkout GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' uses: actions/checkout@v4 diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index b05c0226f7..4dda0f071e 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -1,5 +1,5 @@ -name: 'Install zlib Dependency' -description: 'Install zlib Dependency using cache when possible' +name: 'Install PROJ Dependency' +description: 'Install PROJ Dependency using cache when possible' inputs: cpu: description: 'CPU architecture to build for' @@ -10,56 +10,58 @@ runs: using: "composite" steps: - - name: Cache zlib - id: cache-zlib + - name: Cache PROJ + id: cache-proj uses: actions/cache/restore@v4 with: - path: dependencies/zlib_install - key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 + path: dependencies/proj_install + key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1 - # Dependents: blosc openvdb pdal vtk - - name: Checkout zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' + # Dependents: gdal + - name: Checkout PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: - repository: madler/zlib - path: './dependencies/zlib' - ref: v1.3.1 + repository: OSGeo/PROJ + path: './dependencies/proj' + ref: 9.4.0 - - name: Setup zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' + - name: Setup PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies shell: bash run: | - mkdir zlib_build - mkdir zlib_install + mkdir proj_build + mkdir proj_install - - name: Configure zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build + - name: Configure PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/proj_build shell: bash run: > - cmake ../zlib + cmake ../proj -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=../zlib_install + -DCMAKE_INSTALL_PREFIX=../proj_install + -DCMAKE_PREFIX_PATH=$(pwd)/../install + -DBUILD_TESTING=OFF ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} - - name: Build zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build + - name: Build PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/proj_build shell: bash run: cmake --build . --parallel 2 --target install --config Release - name: Copy to install - working-directory: ${{github.workspace}}/dependencies/zlib_install + working-directory: ${{github.workspace}}/dependencies/proj_install shell: bash run: cp -r ./* ../install/ - name: Save cache - if: steps.cache-zlib.outputs.cache-hit != 'true' + if: steps.cache-proj.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - key: ${{ steps.cache-zlib.outputs.cache-primary-key }} - path: dependencies/zlib_install + key: ${{ steps.cache-proj.outputs.cache-primary-key }} + path: dependencies/proj_install From 77b1eb6c64161233e5b44a1232f79460f0e21ac0 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Fri, 28 Mar 2025 21:40:32 +0300 Subject: [PATCH 15/29] install sqllite --- .github/actions/gdal-install-dep/action.yml | 12 ++++++++++++ .github/actions/proj-install-dep/action.yml | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 2148e01d6b..0a315851d8 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -18,6 +18,18 @@ runs: key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 # Dependents: pdal, proj + - name: Install SQLite3 dependencies + if: steps.cache-gdal.outputs.cache-hit != 'true' + shell: bash + run: | + if [[ "$RUNNER_OS" == "Linux" ]]; then + sudo apt-get update + sudo apt-get install -y sqlite3 libsqlite3-dev + elif [[ "$RUNNER_OS" == "macOS" ]]; then + brew install sqlite + elif [[ "$RUNNER_OS" == "Windows" ]]; then + choco install sqlite + - name: Install PROJ Dependency if: steps.cache-gdal.outputs.cache-hit != 'true' uses: ./source/.github/actions/proj-install-dep diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index 4dda0f071e..fb8e36ff38 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -17,6 +17,17 @@ runs: path: dependencies/proj_install key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1 + - name: Install SQLite3 dependencies + if: steps.cache-proj.outputs.cache-hit != 'true' + shell: bash + run: | + if [[ "$RUNNER_OS" == "Linux" ]]; then + sudo apt-get update + sudo apt-get install -y sqlite3 libsqlite3-dev + elif [[ "$RUNNER_OS" == "macOS" ]]; then + brew install sqlite + elif [[ "$RUNNER_OS" == "Windows" ]]; then + choco install sqlite # Dependents: gdal - name: Checkout PROJ if: steps.cache-proj.outputs.cache-hit != 'true' From e3191a52b737e40050fec8853d00c4b70a124944 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Fri, 28 Mar 2025 21:55:17 +0300 Subject: [PATCH 16/29] fix to install sqllite --- .github/actions/gdal-install-dep/action.yml | 12 +++++++----- .github/actions/proj-install-dep/action.yml | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 0a315851d8..5dc1587a7e 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -1,5 +1,6 @@ name: 'Install GDAL Dependency' description: 'Install GDAL Dependency using cache when possible' + inputs: cpu: description: 'CPU architecture to build for' @@ -22,13 +23,14 @@ runs: if: steps.cache-gdal.outputs.cache-hit != 'true' shell: bash run: | - if [[ "$RUNNER_OS" == "Linux" ]]; then + if [[ "${{runner.os}}" == "Linux" ]]; then sudo apt-get update sudo apt-get install -y sqlite3 libsqlite3-dev - elif [[ "$RUNNER_OS" == "macOS" ]]; then + elif [[ "${{runner.os}}" == "macOS" ]]; then brew install sqlite - elif [[ "$RUNNER_OS" == "Windows" ]]; then + elif [[ "${{runner.os}}" == "Windows" ]]; then choco install sqlite + fi - name: Install PROJ Dependency if: steps.cache-gdal.outputs.cache-hit != 'true' @@ -76,8 +78,8 @@ runs: -DGDAL_USE_LZMA=ON -DGDAL_USE_ZSTD=ON -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/ - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }} - name: Build GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index fb8e36ff38..8a009c09b2 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -21,13 +21,15 @@ runs: if: steps.cache-proj.outputs.cache-hit != 'true' shell: bash run: | - if [[ "$RUNNER_OS" == "Linux" ]]; then + if [[ "${{runner.os}}" == "Linux" ]]; then sudo apt-get update sudo apt-get install -y sqlite3 libsqlite3-dev - elif [[ "$RUNNER_OS" == "macOS" ]]; then + elif [[ "${{runner.os}}" == "macOS" ]]; then brew install sqlite - elif [[ "$RUNNER_OS" == "Windows" ]]; then + elif [[ "${{runner.os}}" == "Windows" ]]; then choco install sqlite + fi + # Dependents: gdal - name: Checkout PROJ if: steps.cache-proj.outputs.cache-hit != 'true' @@ -56,8 +58,8 @@ runs: -DCMAKE_INSTALL_PREFIX=../proj_install -DCMAKE_PREFIX_PATH=$(pwd)/../install -DBUILD_TESTING=OFF - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }} - name: Build PROJ if: steps.cache-proj.outputs.cache-hit != 'true' From d517c7d6bb7115e3ecd1bedd8d4a748c9dfdf048 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 10:41:03 +0300 Subject: [PATCH 17/29] Revert "fix to install sqllite" This reverts commit e3191a52b737e40050fec8853d00c4b70a124944. --- .github/actions/gdal-install-dep/action.yml | 12 +++++------- .github/actions/proj-install-dep/action.yml | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 5dc1587a7e..0a315851d8 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -1,6 +1,5 @@ name: 'Install GDAL Dependency' description: 'Install GDAL Dependency using cache when possible' - inputs: cpu: description: 'CPU architecture to build for' @@ -23,14 +22,13 @@ runs: if: steps.cache-gdal.outputs.cache-hit != 'true' shell: bash run: | - if [[ "${{runner.os}}" == "Linux" ]]; then + if [[ "$RUNNER_OS" == "Linux" ]]; then sudo apt-get update sudo apt-get install -y sqlite3 libsqlite3-dev - elif [[ "${{runner.os}}" == "macOS" ]]; then + elif [[ "$RUNNER_OS" == "macOS" ]]; then brew install sqlite - elif [[ "${{runner.os}}" == "Windows" ]]; then + elif [[ "$RUNNER_OS" == "Windows" ]]; then choco install sqlite - fi - name: Install PROJ Dependency if: steps.cache-gdal.outputs.cache-hit != 'true' @@ -78,8 +76,8 @@ runs: -DGDAL_USE_LZMA=ON -DGDAL_USE_ZSTD=ON -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../install/ - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }} + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} - name: Build GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index 8a009c09b2..fb8e36ff38 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -21,15 +21,13 @@ runs: if: steps.cache-proj.outputs.cache-hit != 'true' shell: bash run: | - if [[ "${{runner.os}}" == "Linux" ]]; then + if [[ "$RUNNER_OS" == "Linux" ]]; then sudo apt-get update sudo apt-get install -y sqlite3 libsqlite3-dev - elif [[ "${{runner.os}}" == "macOS" ]]; then + elif [[ "$RUNNER_OS" == "macOS" ]]; then brew install sqlite - elif [[ "${{runner.os}}" == "Windows" ]]; then + elif [[ "$RUNNER_OS" == "Windows" ]]; then choco install sqlite - fi - # Dependents: gdal - name: Checkout PROJ if: steps.cache-proj.outputs.cache-hit != 'true' @@ -58,8 +56,8 @@ runs: -DCMAKE_INSTALL_PREFIX=../proj_install -DCMAKE_PREFIX_PATH=$(pwd)/../install -DBUILD_TESTING=OFF - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }} + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} - name: Build PROJ if: steps.cache-proj.outputs.cache-hit != 'true' From 5b39c7c1a9a353d375cbb3c936f4607a471fdc38 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 10:41:35 +0300 Subject: [PATCH 18/29] Revert "install sqllite" This reverts commit 77b1eb6c64161233e5b44a1232f79460f0e21ac0. --- .github/actions/gdal-install-dep/action.yml | 12 ------------ .github/actions/proj-install-dep/action.yml | 11 ----------- 2 files changed, 23 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 0a315851d8..2148e01d6b 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -18,18 +18,6 @@ runs: key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 # Dependents: pdal, proj - - name: Install SQLite3 dependencies - if: steps.cache-gdal.outputs.cache-hit != 'true' - shell: bash - run: | - if [[ "$RUNNER_OS" == "Linux" ]]; then - sudo apt-get update - sudo apt-get install -y sqlite3 libsqlite3-dev - elif [[ "$RUNNER_OS" == "macOS" ]]; then - brew install sqlite - elif [[ "$RUNNER_OS" == "Windows" ]]; then - choco install sqlite - - name: Install PROJ Dependency if: steps.cache-gdal.outputs.cache-hit != 'true' uses: ./source/.github/actions/proj-install-dep diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index fb8e36ff38..4dda0f071e 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -17,17 +17,6 @@ runs: path: dependencies/proj_install key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1 - - name: Install SQLite3 dependencies - if: steps.cache-proj.outputs.cache-hit != 'true' - shell: bash - run: | - if [[ "$RUNNER_OS" == "Linux" ]]; then - sudo apt-get update - sudo apt-get install -y sqlite3 libsqlite3-dev - elif [[ "$RUNNER_OS" == "macOS" ]]; then - brew install sqlite - elif [[ "$RUNNER_OS" == "Windows" ]]; then - choco install sqlite # Dependents: gdal - name: Checkout PROJ if: steps.cache-proj.outputs.cache-hit != 'true' From 3878a9977d7c230f69e100c0116ca4c7cc2605a4 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 10:41:53 +0300 Subject: [PATCH 19/29] Revert "build proj, as gdal depend on it" This reverts commit ac3b28f5103789a35c8cc505d15d3978095f5798. --- .github/actions/gdal-install-dep/action.yml | 6 --- .github/actions/proj-install-dep/action.yml | 58 ++++++++++----------- 2 files changed, 28 insertions(+), 36 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 2148e01d6b..1694c74b00 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -18,12 +18,6 @@ runs: key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 # Dependents: pdal, proj - - name: Install PROJ Dependency - if: steps.cache-gdal.outputs.cache-hit != 'true' - uses: ./source/.github/actions/proj-install-dep - with: - cpu: ${{ inputs.cpu }} - - name: Checkout GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' uses: actions/checkout@v4 diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index 4dda0f071e..b05c0226f7 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -1,5 +1,5 @@ -name: 'Install PROJ Dependency' -description: 'Install PROJ Dependency using cache when possible' +name: 'Install zlib Dependency' +description: 'Install zlib Dependency using cache when possible' inputs: cpu: description: 'CPU architecture to build for' @@ -10,58 +10,56 @@ runs: using: "composite" steps: - - name: Cache PROJ - id: cache-proj + - name: Cache zlib + id: cache-zlib uses: actions/cache/restore@v4 with: - path: dependencies/proj_install - key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1 + path: dependencies/zlib_install + key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 - # Dependents: gdal - - name: Checkout PROJ - if: steps.cache-proj.outputs.cache-hit != 'true' + # Dependents: blosc openvdb pdal vtk + - name: Checkout zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: - repository: OSGeo/PROJ - path: './dependencies/proj' - ref: 9.4.0 + repository: madler/zlib + path: './dependencies/zlib' + ref: v1.3.1 - - name: Setup PROJ - if: steps.cache-proj.outputs.cache-hit != 'true' + - name: Setup zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies shell: bash run: | - mkdir proj_build - mkdir proj_install + mkdir zlib_build + mkdir zlib_install - - name: Configure PROJ - if: steps.cache-proj.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/proj_build + - name: Configure zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build shell: bash run: > - cmake ../proj + cmake ../zlib -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=../proj_install - -DCMAKE_PREFIX_PATH=$(pwd)/../install - -DBUILD_TESTING=OFF + -DCMAKE_INSTALL_PREFIX=../zlib_install ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} - - name: Build PROJ - if: steps.cache-proj.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/proj_build + - name: Build zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build shell: bash run: cmake --build . --parallel 2 --target install --config Release - name: Copy to install - working-directory: ${{github.workspace}}/dependencies/proj_install + working-directory: ${{github.workspace}}/dependencies/zlib_install shell: bash run: cp -r ./* ../install/ - name: Save cache - if: steps.cache-proj.outputs.cache-hit != 'true' + if: steps.cache-zlib.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - key: ${{ steps.cache-proj.outputs.cache-primary-key }} - path: dependencies/proj_install + key: ${{ steps.cache-zlib.outputs.cache-primary-key }} + path: dependencies/zlib_install From f626723fc390f32e37337aff3fc66b522b09d0b5 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 10:42:05 +0300 Subject: [PATCH 20/29] Revert "copy zlib install dep to proj install dep" This reverts commit 71b1cac8bf5180642131a1aa2bc9ccb929dee679. --- .github/actions/proj-install-dep/action.yml | 65 --------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/actions/proj-install-dep/action.yml diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml deleted file mode 100644 index b05c0226f7..0000000000 --- a/.github/actions/proj-install-dep/action.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: 'Install zlib Dependency' -description: 'Install zlib Dependency using cache when possible' -inputs: - cpu: - description: 'CPU architecture to build for' - required: false - default: 'x86_64' - -runs: - using: "composite" - steps: - - - name: Cache zlib - id: cache-zlib - uses: actions/cache/restore@v4 - with: - path: dependencies/zlib_install - key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 - - # Dependents: blosc openvdb pdal vtk - - name: Checkout zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - uses: actions/checkout@v4 - with: - repository: madler/zlib - path: './dependencies/zlib' - ref: v1.3.1 - - - name: Setup zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies - shell: bash - run: | - mkdir zlib_build - mkdir zlib_install - - - name: Configure zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build - shell: bash - run: > - cmake ../zlib - -DBUILD_SHARED_LIBS=ON - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=../zlib_install - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} - - - name: Build zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build - shell: bash - run: cmake --build . --parallel 2 --target install --config Release - - - name: Copy to install - working-directory: ${{github.workspace}}/dependencies/zlib_install - shell: bash - run: cp -r ./* ../install/ - - - name: Save cache - if: steps.cache-zlib.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - key: ${{ steps.cache-zlib.outputs.cache-primary-key }} - path: dependencies/zlib_install From 1ab0ccdbcbf73a7b03b4a41af00ff72282036a86 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 11:32:19 +0300 Subject: [PATCH 21/29] disable proj in gdal build --- .github/actions/gdal-install-dep/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 1694c74b00..02ebcc7fde 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -1,5 +1,6 @@ name: 'Install GDAL Dependency' description: 'Install GDAL Dependency using cache when possible' + inputs: cpu: description: 'CPU architecture to build for' @@ -15,9 +16,9 @@ runs: uses: actions/cache/restore@v4 with: path: dependencies/gdal_install - key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 + key: gdal-v3.8.0-noproj-${{runner.os}}-${{inputs.cpu}}-0 - # Dependents: pdal, proj + # Dependents: pdal - name: Checkout GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' uses: actions/checkout@v4 @@ -34,7 +35,7 @@ runs: mkdir gdal_build mkdir gdal_install - - name: Configure GDAL + - name: Configure GDAL (without PROJ) if: steps.cache-gdal.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies/gdal_build shell: bash @@ -44,7 +45,7 @@ runs: -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../gdal_install -DGDAL_USE_EXTERNAL_LIBS=ON - -DGDAL_ENABLE_DRIVER_GPKG=ON + -DGDAL_USE_PROJ=OFF -DGDAL_ENABLE_DRIVER_TIFF=ON -DGDAL_ENABLE_DRIVER_NETCDF=OFF -DGDAL_ENABLE_DRIVER_POSTGIS=OFF From ad06471495f91bbd2c567311b0793c4479657a08 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 13:16:27 +0300 Subject: [PATCH 22/29] Revert "disable proj in gdal build" This reverts commit 1ab0ccdbcbf73a7b03b4a41af00ff72282036a86. --- .github/actions/gdal-install-dep/action.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 02ebcc7fde..1694c74b00 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -1,6 +1,5 @@ name: 'Install GDAL Dependency' description: 'Install GDAL Dependency using cache when possible' - inputs: cpu: description: 'CPU architecture to build for' @@ -16,9 +15,9 @@ runs: uses: actions/cache/restore@v4 with: path: dependencies/gdal_install - key: gdal-v3.8.0-noproj-${{runner.os}}-${{inputs.cpu}}-0 + key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 - # Dependents: pdal + # Dependents: pdal, proj - name: Checkout GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' uses: actions/checkout@v4 @@ -35,7 +34,7 @@ runs: mkdir gdal_build mkdir gdal_install - - name: Configure GDAL (without PROJ) + - name: Configure GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies/gdal_build shell: bash @@ -45,7 +44,7 @@ runs: -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../gdal_install -DGDAL_USE_EXTERNAL_LIBS=ON - -DGDAL_USE_PROJ=OFF + -DGDAL_ENABLE_DRIVER_GPKG=ON -DGDAL_ENABLE_DRIVER_TIFF=ON -DGDAL_ENABLE_DRIVER_NETCDF=OFF -DGDAL_ENABLE_DRIVER_POSTGIS=OFF From ccfb48b0a64d3ac02799b7bb82deba8c3567dbb7 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 13:16:40 +0300 Subject: [PATCH 23/29] Reapply "copy zlib install dep to proj install dep" This reverts commit f626723fc390f32e37337aff3fc66b522b09d0b5. --- .github/actions/proj-install-dep/action.yml | 65 +++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/actions/proj-install-dep/action.yml diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml new file mode 100644 index 0000000000..b05c0226f7 --- /dev/null +++ b/.github/actions/proj-install-dep/action.yml @@ -0,0 +1,65 @@ +name: 'Install zlib Dependency' +description: 'Install zlib Dependency using cache when possible' +inputs: + cpu: + description: 'CPU architecture to build for' + required: false + default: 'x86_64' + +runs: + using: "composite" + steps: + + - name: Cache zlib + id: cache-zlib + uses: actions/cache/restore@v4 + with: + path: dependencies/zlib_install + key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 + + # Dependents: blosc openvdb pdal vtk + - name: Checkout zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + with: + repository: madler/zlib + path: './dependencies/zlib' + ref: v1.3.1 + + - name: Setup zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies + shell: bash + run: | + mkdir zlib_build + mkdir zlib_install + + - name: Configure zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build + shell: bash + run: > + cmake ../zlib + -DBUILD_SHARED_LIBS=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=../zlib_install + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + + - name: Build zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build + shell: bash + run: cmake --build . --parallel 2 --target install --config Release + + - name: Copy to install + working-directory: ${{github.workspace}}/dependencies/zlib_install + shell: bash + run: cp -r ./* ../install/ + + - name: Save cache + if: steps.cache-zlib.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: ${{ steps.cache-zlib.outputs.cache-primary-key }} + path: dependencies/zlib_install From 982d1a5420f25aa8050299585487a74c2859431f Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 13:16:51 +0300 Subject: [PATCH 24/29] Reapply "build proj, as gdal depend on it" This reverts commit 3878a9977d7c230f69e100c0116ca4c7cc2605a4. --- .github/actions/gdal-install-dep/action.yml | 6 +++ .github/actions/proj-install-dep/action.yml | 58 +++++++++++---------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/actions/gdal-install-dep/action.yml b/.github/actions/gdal-install-dep/action.yml index 1694c74b00..2148e01d6b 100644 --- a/.github/actions/gdal-install-dep/action.yml +++ b/.github/actions/gdal-install-dep/action.yml @@ -18,6 +18,12 @@ runs: key: gdal-v3.8.0-${{runner.os}}-${{inputs.cpu}}-0 # Dependents: pdal, proj + - name: Install PROJ Dependency + if: steps.cache-gdal.outputs.cache-hit != 'true' + uses: ./source/.github/actions/proj-install-dep + with: + cpu: ${{ inputs.cpu }} + - name: Checkout GDAL if: steps.cache-gdal.outputs.cache-hit != 'true' uses: actions/checkout@v4 diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index b05c0226f7..4dda0f071e 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -1,5 +1,5 @@ -name: 'Install zlib Dependency' -description: 'Install zlib Dependency using cache when possible' +name: 'Install PROJ Dependency' +description: 'Install PROJ Dependency using cache when possible' inputs: cpu: description: 'CPU architecture to build for' @@ -10,56 +10,58 @@ runs: using: "composite" steps: - - name: Cache zlib - id: cache-zlib + - name: Cache PROJ + id: cache-proj uses: actions/cache/restore@v4 with: - path: dependencies/zlib_install - key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 + path: dependencies/proj_install + key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1 - # Dependents: blosc openvdb pdal vtk - - name: Checkout zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' + # Dependents: gdal + - name: Checkout PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: - repository: madler/zlib - path: './dependencies/zlib' - ref: v1.3.1 + repository: OSGeo/PROJ + path: './dependencies/proj' + ref: 9.4.0 - - name: Setup zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' + - name: Setup PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies shell: bash run: | - mkdir zlib_build - mkdir zlib_install + mkdir proj_build + mkdir proj_install - - name: Configure zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build + - name: Configure PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/proj_build shell: bash run: > - cmake ../zlib + cmake ../proj -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=../zlib_install + -DCMAKE_INSTALL_PREFIX=../proj_install + -DCMAKE_PREFIX_PATH=$(pwd)/../install + -DBUILD_TESTING=OFF ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} - - name: Build zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build + - name: Build PROJ + if: steps.cache-proj.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/proj_build shell: bash run: cmake --build . --parallel 2 --target install --config Release - name: Copy to install - working-directory: ${{github.workspace}}/dependencies/zlib_install + working-directory: ${{github.workspace}}/dependencies/proj_install shell: bash run: cp -r ./* ../install/ - name: Save cache - if: steps.cache-zlib.outputs.cache-hit != 'true' + if: steps.cache-proj.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - key: ${{ steps.cache-zlib.outputs.cache-primary-key }} - path: dependencies/zlib_install + key: ${{ steps.cache-proj.outputs.cache-primary-key }} + path: dependencies/proj_install From caf5e626e9e90af791735540a3945a60eae7af88 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 14:02:17 +0300 Subject: [PATCH 25/29] copy zlib to sqlite --- .github/actions/sqlite-install-dep/action.yml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/actions/sqlite-install-dep/action.yml diff --git a/.github/actions/sqlite-install-dep/action.yml b/.github/actions/sqlite-install-dep/action.yml new file mode 100644 index 0000000000..b05c0226f7 --- /dev/null +++ b/.github/actions/sqlite-install-dep/action.yml @@ -0,0 +1,65 @@ +name: 'Install zlib Dependency' +description: 'Install zlib Dependency using cache when possible' +inputs: + cpu: + description: 'CPU architecture to build for' + required: false + default: 'x86_64' + +runs: + using: "composite" + steps: + + - name: Cache zlib + id: cache-zlib + uses: actions/cache/restore@v4 + with: + path: dependencies/zlib_install + key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 + + # Dependents: blosc openvdb pdal vtk + - name: Checkout zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + with: + repository: madler/zlib + path: './dependencies/zlib' + ref: v1.3.1 + + - name: Setup zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies + shell: bash + run: | + mkdir zlib_build + mkdir zlib_install + + - name: Configure zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build + shell: bash + run: > + cmake ../zlib + -DBUILD_SHARED_LIBS=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=../zlib_install + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + + - name: Build zlib + if: steps.cache-zlib.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/zlib_build + shell: bash + run: cmake --build . --parallel 2 --target install --config Release + + - name: Copy to install + working-directory: ${{github.workspace}}/dependencies/zlib_install + shell: bash + run: cp -r ./* ../install/ + + - name: Save cache + if: steps.cache-zlib.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: ${{ steps.cache-zlib.outputs.cache-primary-key }} + path: dependencies/zlib_install From 41a7901df2a186cee7e4f0cac9937d3673502434 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Sat, 29 Mar 2025 14:14:28 +0300 Subject: [PATCH 26/29] clone and install sqlite --- .github/actions/proj-install-dep/action.yml | 7 ++ .github/actions/sqlite-install-dep/action.yml | 79 +++++++++++-------- 2 files changed, 52 insertions(+), 34 deletions(-) diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index 4dda0f071e..cb70051395 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -26,6 +26,13 @@ runs: path: './dependencies/proj' ref: 9.4.0 + # Install SQLite first (only if PROJ is not cached) + - name: Install SQLite Dependency + if: steps.cache-proj.outputs.cache-hit != 'true' + uses: ./source/.github/actions/sqlite-install-dep + with: + cpu: ${{ inputs.cpu }} + - name: Setup PROJ if: steps.cache-proj.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies diff --git a/.github/actions/sqlite-install-dep/action.yml b/.github/actions/sqlite-install-dep/action.yml index b05c0226f7..7ca44e9e52 100644 --- a/.github/actions/sqlite-install-dep/action.yml +++ b/.github/actions/sqlite-install-dep/action.yml @@ -1,5 +1,5 @@ -name: 'Install zlib Dependency' -description: 'Install zlib Dependency using cache when possible' +name: 'Install SQLite Dependency' +description: 'Install SQLite Dependency using cache when possible' inputs: cpu: description: 'CPU architecture to build for' @@ -10,56 +10,67 @@ runs: using: "composite" steps: - - name: Cache zlib - id: cache-zlib + - name: Cache SQLite + id: cache-sqlite uses: actions/cache/restore@v4 with: - path: dependencies/zlib_install - key: zlib-v1.3.1-${{runner.os}}-${{inputs.cpu}}-4 + path: dependencies/sqlite_install + key: sqlite-v3.39.2-${{runner.os}}-${{inputs.cpu}}-1 - # Dependents: blosc openvdb pdal vtk - - name: Checkout zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' + - name: Checkout SQLite + if: steps.cache-sqlite.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: - repository: madler/zlib - path: './dependencies/zlib' - ref: v1.3.1 + repository: sqlite/sqlite + path: './dependencies/sqlite' + ref: version-3.39.2 - - name: Setup zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' + - name: Setup SQLite + if: steps.cache-sqlite.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies shell: bash run: | - mkdir zlib_build - mkdir zlib_install + mkdir sqlite_install - - name: Configure zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build + - name: Configure SQLite on Unix + if: steps.cache-sqlite.outputs.cache-hit != 'true' && runner.os != 'Windows' + working-directory: ${{github.workspace}}/dependencies/sqlite shell: bash - run: > - cmake ../zlib - -DBUILD_SHARED_LIBS=ON - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=../zlib_install - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + run: | + ./configure --prefix=${{github.workspace}}/dependencies/sqlite_install + + - name: Build and Install SQLite on Unix + if: steps.cache-sqlite.outputs.cache-hit != 'true' && runner.os != 'Windows' + working-directory: ${{github.workspace}}/dependencies/sqlite + shell: bash + run: | + make + make install - - name: Build zlib - if: steps.cache-zlib.outputs.cache-hit != 'true' - working-directory: ${{github.workspace}}/dependencies/zlib_build + - name: Configure SQLite on Windows + if: steps.cache-sqlite.outputs.cache-hit != 'true' && runner.os == 'Windows' + working-directory: ${{github.workspace}}/dependencies/sqlite shell: bash - run: cmake --build . --parallel 2 --target install --config Release + run: | + mkdir -p sqlite_install + cd sqlite_install + cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX=../sqlite_install .. + + - name: Build and Install SQLite on Windows + if: steps.cache-sqlite.outputs.cache-hit != 'true' && runner.os == 'Windows' + working-directory: ${{github.workspace}}/dependencies/sqlite/sqlite_install + shell: bash + run: | + cmake --build . --config Release --target INSTALL - name: Copy to install - working-directory: ${{github.workspace}}/dependencies/zlib_install + working-directory: ${{github.workspace}}/dependencies/sqlite_install shell: bash run: cp -r ./* ../install/ - name: Save cache - if: steps.cache-zlib.outputs.cache-hit != 'true' + if: steps.cache-sqlite.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - key: ${{ steps.cache-zlib.outputs.cache-primary-key }} - path: dependencies/zlib_install + key: ${{ steps.cache-sqlite.outputs.cache-primary-key }} + path: dependencies/sqlite_install \ No newline at end of file From 8a22ad8fe93ee6025a36f1c34c1e2e16f8daad3c Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 1 Apr 2025 12:37:58 +0300 Subject: [PATCH 27/29] try simplefied action --- .github/workflows/ci.yml | 751 ----------------------- .github/workflows/clean-caches.yml | 12 - .github/workflows/nightly_vtk_master.yml | 320 ---------- .github/workflows/public-api-warn.yml | 19 - .github/workflows/style-checks.yml | 58 -- .github/workflows/test.yml | 17 + .github/workflows/versions.json | 37 -- 7 files changed, 17 insertions(+), 1197 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/clean-caches.yml delete mode 100644 .github/workflows/nightly_vtk_master.yml delete mode 100644 .github/workflows/public-api-warn.yml delete mode 100644 .github/workflows/style-checks.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/versions.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 38b476abb6..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,751 +0,0 @@ -name: CI - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - 'doc/**' - push: - branches: - - master - -concurrency: - group: '${{ github.workflow }}-${{ github.ref_name }}' - cancel-in-progress: true - -jobs: - -#---------------------------------------------------------------------------- -# Default versions: Set default version for all dependencies -#---------------------------------------------------------------------------- - default_versions: - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - name: Set default versions - outputs: - alembic_version: ${{ steps.set_default_versions.outputs.alembic_version }} - alembic_min_version: ${{ steps.set_default_versions.outputs.alembic_min_version }} - assimp_version: ${{ steps.set_default_versions.outputs.assimp_version }} - assimp_min_version: ${{ steps.set_default_versions.outputs.assimp_min_version }} - draco_version: ${{ steps.set_default_versions.outputs.draco_version }} - draco_min_version: ${{ steps.set_default_versions.outputs.draco_min_version }} - occt_version: ${{ steps.set_default_versions.outputs.occt_version }} - occt_min_version: ${{ steps.set_default_versions.outputs.occt_min_version }} - openexr_version: ${{ steps.set_default_versions.outputs.openexr_version }} - openexr_min_version: ${{ steps.set_default_versions.outputs.openexr_min_version }} - openvdb_version: ${{ steps.set_default_versions.outputs.openvdb_version }} - openvdb_min_version: ${{ steps.set_default_versions.outputs.openvdb_min_version }} - pdal_version: ${{ steps.set_default_versions.outputs.pdal_version }} - pdal_min_version: ${{ steps.set_default_versions.outputs.pdal_min_version }} - pybind11_version: ${{ steps.set_default_versions.outputs.pybind11_version }} - pybind11_min_version: ${{ steps.set_default_versions.outputs.pybind11_min_version }} - python_version: ${{ steps.set_default_versions.outputs.python_version }} - python_min_version: ${{ steps.set_default_versions.outputs.python_min_version }} - usd_version: ${{ steps.set_default_versions.outputs.usd_version }} - usd_min_version: ${{ steps.set_default_versions.outputs.usd_min_version }} - java_version: ${{ steps.set_default_versions.outputs.java_version }} - java_min_version: ${{ steps.set_default_versions.outputs.java_min_version }} - vtk_commit_sha: ${{ steps.set_default_versions.outputs.vtk_commit_sha }} - timestamp: ${{ steps.set_default_versions.outputs.timestamp }} - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 1 - lfs: false - - - name: Set default versions - id: set_default_versions - uses: f3d-app/default-versions-action@main - with: - file: ./source/.github/workflows/versions.json - -#---------------------------------------------------------------------------- -# Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth -#---------------------------------------------------------------------------- - cache_lfs: - runs-on: ubuntu-22.04 - name: Update LFS data cache - outputs: - lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }} - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 1 - lfs: false - - - name: Cache LFS Data - id: lfs_sha_recover - uses: f3d-app/lfs-data-cache-action@v1 - with: - cache_postfix: cache-0 - -#---------------------------------------------------------------------------- -# Cache Dependencies: Checkout and compile all dependencies but VTK if not cached -#---------------------------------------------------------------------------- - cache_dependencies: - name: Cache dependencies - needs: default_versions - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, windows-latest, macos-13, macos-14] - build_type: [standard] - include: - - cpu: x86_64 - - os: macos-14 - cpu: arm64 - - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - - draco_version: ${{needs.default_versions.outputs.draco_version}} - - occt_version: ${{needs.default_versions.outputs.occt_version}} - - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - - usd_version: ${{needs.default_versions.outputs.usd_version}} - - build_type: mindeps - os: ubuntu-22.04 - cpu: x86_64 - alembic_version: ${{needs.default_versions.outputs.alembic_min_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_min_version}} - draco_version: ${{needs.default_versions.outputs.draco_min_version}} - occt_version: ${{needs.default_versions.outputs.occt_min_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_min_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_min_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_min_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_min_version}} - usd_version: ${{needs.default_versions.outputs.usd_min_version}} - - runs-on: ${{matrix.os}} - container: ${{ matrix.os == 'ubuntu-22.04' && 'ghcr.io/f3d-app/f3d-ci' || null }} - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 1 - lfs: false - - - name: Generic Dependencies - uses: ./source/.github/actions/generic-dependencies - with: - raytracing_label: raytracing - cpu: ${{matrix.cpu}} - alembic_version: ${{matrix.alembic_version}} - assimp_version: ${{matrix.assimp_version}} - draco_version: ${{matrix.draco_version}} - occt_version: ${{matrix.occt_version}} - openexr_version: ${{matrix.openexr_version}} - openvdb_version: ${{matrix.openvdb_version}} - pdal_version: ${{matrix.pdal_version}} - pybind11_version: ${{matrix.pybind11_version}} - usd_version: ${{matrix.usd_version}} - -#---------------------------------------------------------------------------- -# Windows CI: Build and test, cross-vtk build matrix -#---------------------------------------------------------------------------- - windows: - if: github.event.pull_request.draft == false - needs: [cache_lfs, cache_dependencies, default_versions] - - strategy: - fail-fast: false - matrix: - vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1, v9.2.6] - static_label: [no-static] - include: - - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - static_label: static - - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - vtk_version: ${{matrix.vtk_version}} - raytracing_label: raytracing - static_label: ${{matrix.static_label}} - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - -#---------------------------------------------------------------------------- -# Linux CI: Build and test, cross-vtk build matrix -#---------------------------------------------------------------------------- - linux: - if: github.event.pull_request.draft == false - needs: [cache_lfs, cache_dependencies, default_versions] - - strategy: - fail-fast: false - matrix: - vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1, v9.2.6] - build_type: [standard] - include: - - raytracing_label: raytracing - - exclude_deprecated_label: no-exclude-deprecated - - optional_deps_label: optional-deps - - rendering_backend: auto - - static_label: no-static - - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - - draco_version: ${{needs.default_versions.outputs.draco_version}} - - occt_version: ${{needs.default_versions.outputs.occt_version}} - - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - - python_version: ${{needs.default_versions.outputs.python_version}} - - usd_version: ${{needs.default_versions.outputs.usd_version}} - - java_version: ${{needs.default_versions.outputs.java_version}} - - build_type: egl - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - raytracing_label: raytracing - optional_deps_label: optional-deps - exclude_deprecated_label: no-exclude-deprecated - rendering_backend: egl - static_label: no-static - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - - build_type: osmesa - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - raytracing_label: raytracing - optional_deps_label: optional-deps - exclude_deprecated_label: no-exclude-deprecated - rendering_backend: osmesa - static_label: no-static - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - - build_type: exclude_deprecated - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - raytracing_label: raytracing - optional_deps_label: optional-deps - exclude_deprecated_label: exclude-deprecated - rendering_backend: auto - static_label: no-static - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - - build_type: no_optional_deps - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - raytracing_label: no-raytracing - optional_deps_label: no-optional-deps - exclude_deprecated_label: no-exclude-deprecated - rendering_backend: auto - static_label: no-static - - build_type: static_libs - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - raytracing_label: no-raytracing - optional_deps_label: optional-deps - exclude_deprecated_label: no-exclude-deprecated - rendering_backend: auto - static_label: static - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - - build_type: mindeps - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - raytracing_label: raytracing - optional_deps_label: optional-deps - exclude_deprecated_label: no-exclude-deprecated - rendering_backend: auto - static_label: no-static - alembic_version: ${{needs.default_versions.outputs.alembic_min_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_min_version}} - draco_version: ${{needs.default_versions.outputs.draco_min_version}} - occt_version: ${{needs.default_versions.outputs.occt_min_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_min_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_min_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_min_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_min_version}} - python_version: ${{needs.default_versions.outputs.python_min_version}} - usd_version: ${{needs.default_versions.outputs.usd_min_version}} - java_version: ${{needs.default_versions.outputs.java_min_version}} - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - env: - DISPLAY: :0 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - build_type: ${{matrix.build_type}} - vtk_version: ${{matrix.vtk_version}} - raytracing_label: ${{matrix.raytracing_label}} - rendering_backend: ${{matrix.rendering_backend}} - optional_deps_label: ${{matrix.optional_deps_label}} - exclude_deprecated_label: ${{matrix.exclude_deprecated_label}} - static_label: ${{matrix.static_label}} - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{matrix.alembic_version}} - assimp_version: ${{matrix.assimp_version}} - draco_version: ${{matrix.draco_version}} - occt_version: ${{matrix.occt_version}} - openexr_version: ${{matrix.openexr_version}} - openvdb_version: ${{matrix.openvdb_version}} - pdal_version: ${{matrix.pdal_version}} - pybind11_version: ${{matrix.pybind11_version}} - python_version: ${{matrix.python_version}} - usd_version: ${{matrix.usd_version}} - java_version: ${{matrix.java_version}} - -#---------------------------------------------------------------------------- -# MacOS CI: Build and test, cross-vtk build matrix -#---------------------------------------------------------------------------- - macos: - if: github.event.pull_request.draft == false - needs: [cache_lfs, cache_dependencies, default_versions] - strategy: - fail-fast: false - matrix: - vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1, v9.2.6] - - runs-on: macos-13 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - vtk_version: ${{matrix.vtk_version}} - raytracing_label: raytracing - cpu: x86_64 - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - -#---------------------------------------------------------------------------- -# MacOS ARM CI: Build and test, cross-vtk build matrix with a few optional builds -#---------------------------------------------------------------------------- - macos_arm: - if: github.event.pull_request.draft == false - needs: [cache_lfs, cache_dependencies, default_versions] - - strategy: - fail-fast: false - matrix: - vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1] # VTK 9.2.6 not compatible with recent clang version on macOS - bundle_label: [no-bundle] - static_label: [no-static] - include: - - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - bundle_label: bundle - static_label: no-static - - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - bundle_label: no-bundle - static_label: static - - runs-on: macos-14 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - vtk_version: ${{matrix.vtk_version}} - raytracing_label: raytracing - bundle_label: ${{matrix.bundle_label}} - static_label: ${{matrix.static_label}} - cpu: arm64 - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - -#---------------------------------------------------------------------------- -# Python packaging: Build and test the Python wheel -#---------------------------------------------------------------------------- - python-packaging: - if: github.event.pull_request.draft == false - needs: [cache_lfs, cache_dependencies, default_versions] - - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, windows-latest, macos-13] - python_version: ['3.11'] - include: - - os: ubuntu-22.04 - python_version: '3.9' - - os: ubuntu-22.04 - python_version: '3.10' - - os: ubuntu-22.04 - python_version: '3.11' - - os: ubuntu-22.04 - python_version: '3.12' - - os: ubuntu-22.04 - python_version: '3.13' - - runs-on: ${{matrix.os}} - container: ${{ matrix.os == 'ubuntu-22.04' && 'ghcr.io/f3d-app/f3d-ci' || null }} - - env: - DISPLAY: :0 - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Python CI - uses: ./source/.github/actions/python-ci - with: - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - python_version: ${{matrix.python_version}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - -#---------------------------------------------------------------------------- -# Coverage: Build and test on linux with last VTK with coverage option -#---------------------------------------------------------------------------- - coverage: - needs: [cache_lfs, cache_dependencies, default_versions] - if: github.event.pull_request.draft == false - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - # Add dummy F3D_PLUGINS_PATH for coverage - env: - DISPLAY: :0 - F3D_PLUGINS_PATH: /dummy1:/dummy2 - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Coverage CI - uses: ./source/.github/actions/coverage-ci - with: - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - codecov_token: ${{secrets.CODECOV_TOKEN}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - -#---------------------------------------------------------------------------- -# Sanitizer: Build and test on linux with last VTK with sanitizer options -#---------------------------------------------------------------------------- -# "leak" is run by default with "address" so we do not need to run it in CI -# "memory" returns false positives in VTK: -# https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio - sanitizer: - needs: [cache_lfs, cache_dependencies, default_versions] - if: github.event.pull_request.draft == false - - strategy: - fail-fast: false - matrix: - sanitizer_type: [address, thread, undefined] - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - env: - DISPLAY: :0 - CC: clang - CXX: clang++ - VTK_SMP_BACKEND_IN_USE: Sequential - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Sanitizer CI - uses: ./source/.github/actions/sanitizer-ci - with: - sanitizer_type: ${{matrix.sanitizer_type}} - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - -#---------------------------------------------------------------------------- -# static-analysis: Run static analysis on linux -#---------------------------------------------------------------------------- - static-analysis: - needs: [cache_lfs, cache_dependencies, default_versions] - if: github.event.pull_request.draft == false - - strategy: - fail-fast: false - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - env: - CC: clang - CXX: clang++ - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Static analysis CI - uses: ./source/.github/actions/static-analysis-ci - with: - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - -#---------------------------------------------------------------------------- -# external-build: Check build of F3D as sub-project -#---------------------------------------------------------------------------- - external-build: - needs: [cache_dependencies, default_versions] - if: github.event.pull_request.draft == false - - strategy: - fail-fast: false - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source/f3d' - fetch-depth: 0 - lfs: false - - - name: External build CI - uses: ./source/f3d/.github/actions/external-build-ci - with: - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} - -#---------------------------------------------------------------------------- -# android: Check build of F3D for android -#---------------------------------------------------------------------------- - android: - if: github.event.pull_request.draft == false - needs: default_versions - - strategy: - fail-fast: false - matrix: - arch: [armeabi-v7a, arm64-v8a, x86, x86_64] - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-android-${{ matrix.arch }}:${{needs.default_versions.outputs.timestamp}} - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Android CI - uses: ./source/.github/actions/android-ci - with: - arch: ${{matrix.arch}} - -#---------------------------------------------------------------------------- -# webassembly: Build webassembly artifacts -#---------------------------------------------------------------------------- - webassembly: - if: github.event.pull_request.draft == false - needs: default_versions - - strategy: - fail-fast: false - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-wasm:${{needs.default_versions.outputs.timestamp}} - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: 'true' - - - name: WebAssembly CI - uses: ./source/.github/actions/wasm-ci - -#---------------------------------------------------------------------------- -# generate website -#---------------------------------------------------------------------------- - generate-website: - needs: webassembly - name: Generate Website - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Build Jekyll - uses: actions/jekyll-build-pages@v1 - - - name: Install doxygen and build doxygen doc - working-directory: ${{github.workspace}} - run: | - pip install "sphinx==5.3.0" "pydata-sphinx-theme==0.13.1" sphinx-book-theme exhale - sudo apt install doxygen - sphinx-build -M html ./library/doxygen ./library/doxygen/build/ - sudo mv library/doxygen/build/html _site/doc/libf3d/doxygen - sphinx-build -M html ./vtkext/public/doxygen ./vtkext/public/doxygen/build/ - sudo mv vtkext/public/doxygen/build/html _site/doc/libf3d/vtkext_doxygen - - - name: Retrieve web assembly binaries - uses: actions/download-artifact@v4 - with: - name: f3d-wasm - path: ./web - - - name: Copy web assembly binaries - run: sudo mv web _site/ - - - name: Deploy - if: github.ref == 'refs/heads/master' - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: _site - token: ${{ secrets.GITHUB_TOKEN }} - clean: true diff --git a/.github/workflows/clean-caches.yml b/.github/workflows/clean-caches.yml deleted file mode 100644 index 4d6cf61fad..0000000000 --- a/.github/workflows/clean-caches.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Clear all Github actions caches -on: - workflow_dispatch: - -jobs: - my-job: - name: Delete all caches - runs-on: ubuntu-latest - - steps: - - name: Clear caches - uses: easimon/wipe-cache@v2 diff --git a/.github/workflows/nightly_vtk_master.yml b/.github/workflows/nightly_vtk_master.yml deleted file mode 100644 index fb8cdf8c47..0000000000 --- a/.github/workflows/nightly_vtk_master.yml +++ /dev/null @@ -1,320 +0,0 @@ -name: Nightly VTK master - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - -#---------------------------------------------------------------------------- -# Check nightly: Checkout VTK and check if the last merged commit is less than 24 hours old -#---------------------------------------------------------------------------- - check_nightly: - if: github.repository == 'f3d-app/f3d' - runs-on: ubuntu-22.04 - name: Check nightly - outputs: - should_run: ${{ steps.should_run.outputs.should_run }} - vtk_sha: ${{ steps.vtk_sha_recover.outputs.vtk_sha }} - steps: - - - name: Checkout VTK - uses: actions/checkout@v4 - with: - repository: Kitware/VTK - submodules: false - fetch-depth: 0 - ref: master - - - name: Check latest commit age is less than 24 hours - id: should_run - run: test -n "$(git rev-list --no-merges HEAD --not $(git rev-list -n1 --before=24hours --first-parent HEAD))" && echo "should_run=true" >> $GITHUB_OUTPUT || echo "should_run=false" >> $GITHUB_OUTPUT - - - name: Set VTK sha env var - id: vtk_sha_recover - shell: bash - run: echo "vtk_sha=$(git log -n 1 --pretty=format:%H)" >> $GITHUB_OUTPUT - -#---------------------------------------------------------------------------- -# Default versions: Set default version for all dependencies -#---------------------------------------------------------------------------- - default_versions: - runs-on: ubuntu-22.04 - name: Set default versions - outputs: - alembic_version: ${{ steps.set_default_versions.outputs.alembic_version }} - alembic_min_version: ${{ steps.set_default_versions.outputs.alembic_min_version }} - assimp_version: ${{ steps.set_default_versions.outputs.assimp_version }} - assimp_min_version: ${{ steps.set_default_versions.outputs.assimp_min_version }} - draco_version: ${{ steps.set_default_versions.outputs.draco_version }} - draco_min_version: ${{ steps.set_default_versions.outputs.draco_min_version }} - occt_version: ${{ steps.set_default_versions.outputs.occt_version }} - occt_min_version: ${{ steps.set_default_versions.outputs.occt_min_version }} - openexr_version: ${{ steps.set_default_versions.outputs.openexr_version }} - openexr_min_version: ${{ steps.set_default_versions.outputs.openexr_min_version }} - openvdb_version: ${{ steps.set_default_versions.outputs.openvdb_version }} - openvdb_min_version: ${{ steps.set_default_versions.outputs.openvdb_min_version }} - pdal_version: ${{ steps.set_default_versions.outputs.pdal_version }} - pdal_min_version: ${{ steps.set_default_versions.outputs.pdal_min_version }} - pybind11_version: ${{ steps.set_default_versions.outputs.pybind11_version }} - pybind11_min_version: ${{ steps.set_default_versions.outputs.pybind11_min_version }} - python_version: ${{ steps.set_default_versions.outputs.python_version }} - python_min_version: ${{ steps.set_default_versions.outputs.python_min_version }} - usd_version: ${{ steps.set_default_versions.outputs.usd_version }} - usd_min_version: ${{ steps.set_default_versions.outputs.usd_min_version }} - java_version: ${{ steps.set_default_versions.outputs.java_version }} - java_min_version: ${{ steps.set_default_versions.outputs.java_min_version }} - timestamp: ${{ steps.set_default_versions.outputs.timestamp }} - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 1 - lfs: false - - - name: Set default versions - id: set_default_versions - uses: f3d-app/default-versions-action@main - with: - file: ./source/.github/workflows/versions.json - -#---------------------------------------------------------------------------- -# Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth -#---------------------------------------------------------------------------- - - cache_lfs: - needs: check_nightly - if: ${{ needs.check_nightly.outputs.should_run == 'true' }} - runs-on: ubuntu-22.04 - name: Update LFS data cache - outputs: - lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }} - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 1 - lfs: false - - - name: Cache LFS Data - id: lfs_sha_recover - uses: f3d-app/lfs-data-cache-action@v1 - with: - cache_postfix: cache-0 - -#---------------------------------------------------------------------------- -# Windows CI: Build and test -#---------------------------------------------------------------------------- - windows: - needs: [cache_lfs, check_nightly, default_versions] - if: ${{ needs.check_nightly.outputs.should_run == 'true' }} - strategy: - fail-fast: false - runs-on: windows-latest - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} - raytracing_label: raytracing - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - -#---------------------------------------------------------------------------- -# Linux CI: Build and test -#---------------------------------------------------------------------------- - linux: - needs: [cache_lfs, check_nightly, default_versions] - if: ${{ needs.check_nightly.outputs.should_run == 'true' }} - strategy: - fail-fast: false - matrix: - build_type: [standard] - include: - - rendering_backend: auto - - build_type: egl - rendering_backend: egl - - build_type: osmesa - rendering_backend: osmesa - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - env: - DISPLAY: :0 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - build_type: ${{matrix.build_type}} - vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} - raytracing_label: 'raytracing' - rendering_backend: ${{matrix.rendering_backend}} - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - -#---------------------------------------------------------------------------- -# MacOS CI: Build and test -#---------------------------------------------------------------------------- - macos: - needs: [cache_lfs, check_nightly, default_versions] - if: ${{ needs.check_nightly.outputs.should_run == 'true' }} - strategy: - fail-fast: false - - runs-on: macos-13 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} - cpu: x86_64 - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - -#---------------------------------------------------------------------------- -# MacOS arm64 CI: Build and test -#---------------------------------------------------------------------------- - macos_arm: - needs: [cache_lfs, check_nightly, default_versions] - if: ${{ needs.check_nightly.outputs.should_run == 'true' }} - strategy: - fail-fast: false - - runs-on: macos-14 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Generic CI - uses: ./source/.github/actions/generic-ci - with: - vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} - cpu: arm64 - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} - -#---------------------------------------------------------------------------- -# Sanitizer: Build and test on linux with last VTK with sanitizer options -#---------------------------------------------------------------------------- -# "leak" is run by default with "address" so we do not need to run it in CI -# "memory" returns false positives in VTK: -# https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio - sanitizer: - needs: [cache_lfs, check_nightly, default_versions] - if: ${{ needs.check_nightly.outputs.should_run == 'true' }} - - strategy: - fail-fast: false - matrix: - sanitizer_type: [address, thread, undefined] - - runs-on: ubuntu-22.04 - container: ghcr.io/f3d-app/f3d-ci - - env: - DISPLAY: :0 - CC: clang - CXX: clang++ - VTK_SMP_BACKEND_IN_USE: Sequential - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - path: 'source' - fetch-depth: 0 - lfs: false - - - name: Sanitizer CI - uses: ./source/.github/actions/sanitizer-ci - with: - vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} - sanitizer_type: ${{matrix.sanitizer_type}} - lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} - alembic_version: ${{needs.default_versions.outputs.alembic_version}} - assimp_version: ${{needs.default_versions.outputs.assimp_version}} - draco_version: ${{needs.default_versions.outputs.draco_version}} - occt_version: ${{needs.default_versions.outputs.occt_version}} - openexr_version: ${{needs.default_versions.outputs.openexr_version}} - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} - pdal_version: ${{needs.default_versions.outputs.pdal_version}} - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} - python_version: ${{needs.default_versions.outputs.python_version}} - usd_version: ${{needs.default_versions.outputs.usd_version}} - java_version: ${{needs.default_versions.outputs.java_version}} diff --git a/.github/workflows/public-api-warn.yml b/.github/workflows/public-api-warn.yml deleted file mode 100644 index d03a6a6c06..0000000000 --- a/.github/workflows/public-api-warn.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Public API Warning -on: - pull_request_target: - paths: - - 'library/public/*.h' - - 'library/public/*.h.in' - -jobs: - public-api-warn: - name: Public API Warning - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: marocchino/sticky-pull-request-comment@v2 - with: - message: | - You are modifying libf3d public API! :warning:Please update bindings accordingly:warning:! - You can find them in their respective directories: `python`, `java`, `webassembly`. diff --git a/.github/workflows/style-checks.yml b/.github/workflows/style-checks.yml deleted file mode 100644 index 6fd7aa3da3..0000000000 --- a/.github/workflows/style-checks.yml +++ /dev/null @@ -1,58 +0,0 @@ -on: - pull_request_target: - types: [assigned, opened, synchronize, reopened] - branches: - - master -name: Style Checks -jobs: - - style-checks: - name: Formatting Check - runs-on: ubuntu-latest - - env: - ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - steps: - - - uses: actions/checkout@v4 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - - name: C++ Formatting - uses: DoozyX/clang-format-lint-action@v0.16 - with: - source: '.' - extensions: 'h,cxx,in' - exclude: './cmake **/*.py.in **/*.log.in **/*.json.in **/*.thumbnailer.in **/*.cmake.in **/*.desktop.in' - clangFormatVersion: 18 - inplace: True - - - name: Python Formatting - uses: psf/black@stable - with: - options: "--include '(\\.py|\\.py\\.in)'" - - - name: Prettier Formatting - continue-on-error: true - uses: creyD/prettier_action@v4.3 - with: - dry: True - prettier_options: '-w **/*.{js,json,md,html}' - - - name: Codespell in place - shell: bash - run: | - pip install codespell - codespell -fHw . - - - uses: googleapis/code-suggester@v5 - with: - command: review - pull_number: ${{ github.event.pull_request.number }} - git_dir: '.' - - - name: Diff output - shell: bash - run: git diff --color=always --exit-code diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..e6b8d183e3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Test +on: push + +jobs: + hello: + runs-on: ubuntu-latest + steps: + - name: Start echo + run: echo "Start!!" + + - name: Install zlib + uses: ./source/.github/actions/zlib-install-dep + with: + cpu: ${{inputs.cpu}} + + - name: End echo + run: echo "End!!" diff --git a/.github/workflows/versions.json b/.github/workflows/versions.json deleted file mode 100644 index 147b1c8e0e..0000000000 --- a/.github/workflows/versions.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$comments": [ - "Alembic is part of VFX reference platform (CY2025: 1.8.x)", - "OpenEXR is part of VFX reference platform (CY2025: 3.3.x)", - "OpenVDB is part of VFX reference platform (CY2025: 12.x)", - "OpenVDB min version is not enforced by F3D code and missing from VTK code", - "Python is part of VFX reference platform (CY2025: 3.11)" - ], - "versions": { - "alembic": "1.8.8", - "assimp": "v5.4.3", - "draco": "1.5.7", - "occt": "V7_8_1", - "openexr": "v3.3.2", - "openvdb": "v12.0.0", - "pdal": "2.8.4", - "pybind11": "v2.13.6", - "python": "3.11", - "usd": "v24.11", - "java": "21" - }, - "min_versions": { - "alembic": "1.8.5", - "assimp": "v5.4.0", - "draco": "1.5.6", - "occt": "V7_6_3", - "openexr": "v3.0.1", - "openvdb": "v12.0.0", - "pdal": "2.6.0", - "pybind11": "v2.9.2", - "python": "3.9", - "usd": "v24.08", - "java": "17" - }, - "vtk_commit_sha": "b2944839c08cb0e3cfa58b9a4667e061e0faecea", - "timestamp": "20250314_0" -} From 2f783aca69135532e143a697fb875222278fa157 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 1 Apr 2025 12:43:22 +0300 Subject: [PATCH 28/29] Revert "try simplefied action" This reverts commit 8a22ad8fe93ee6025a36f1c34c1e2e16f8daad3c. --- .github/workflows/ci.yml | 751 +++++++++++++++++++++++ .github/workflows/clean-caches.yml | 12 + .github/workflows/nightly_vtk_master.yml | 320 ++++++++++ .github/workflows/public-api-warn.yml | 19 + .github/workflows/style-checks.yml | 58 ++ .github/workflows/test.yml | 17 - .github/workflows/versions.json | 37 ++ 7 files changed, 1197 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/clean-caches.yml create mode 100644 .github/workflows/nightly_vtk_master.yml create mode 100644 .github/workflows/public-api-warn.yml create mode 100644 .github/workflows/style-checks.yml delete mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/versions.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..38b476abb6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,751 @@ +name: CI + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - 'doc/**' + push: + branches: + - master + +concurrency: + group: '${{ github.workflow }}-${{ github.ref_name }}' + cancel-in-progress: true + +jobs: + +#---------------------------------------------------------------------------- +# Default versions: Set default version for all dependencies +#---------------------------------------------------------------------------- + default_versions: + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + name: Set default versions + outputs: + alembic_version: ${{ steps.set_default_versions.outputs.alembic_version }} + alembic_min_version: ${{ steps.set_default_versions.outputs.alembic_min_version }} + assimp_version: ${{ steps.set_default_versions.outputs.assimp_version }} + assimp_min_version: ${{ steps.set_default_versions.outputs.assimp_min_version }} + draco_version: ${{ steps.set_default_versions.outputs.draco_version }} + draco_min_version: ${{ steps.set_default_versions.outputs.draco_min_version }} + occt_version: ${{ steps.set_default_versions.outputs.occt_version }} + occt_min_version: ${{ steps.set_default_versions.outputs.occt_min_version }} + openexr_version: ${{ steps.set_default_versions.outputs.openexr_version }} + openexr_min_version: ${{ steps.set_default_versions.outputs.openexr_min_version }} + openvdb_version: ${{ steps.set_default_versions.outputs.openvdb_version }} + openvdb_min_version: ${{ steps.set_default_versions.outputs.openvdb_min_version }} + pdal_version: ${{ steps.set_default_versions.outputs.pdal_version }} + pdal_min_version: ${{ steps.set_default_versions.outputs.pdal_min_version }} + pybind11_version: ${{ steps.set_default_versions.outputs.pybind11_version }} + pybind11_min_version: ${{ steps.set_default_versions.outputs.pybind11_min_version }} + python_version: ${{ steps.set_default_versions.outputs.python_version }} + python_min_version: ${{ steps.set_default_versions.outputs.python_min_version }} + usd_version: ${{ steps.set_default_versions.outputs.usd_version }} + usd_min_version: ${{ steps.set_default_versions.outputs.usd_min_version }} + java_version: ${{ steps.set_default_versions.outputs.java_version }} + java_min_version: ${{ steps.set_default_versions.outputs.java_min_version }} + vtk_commit_sha: ${{ steps.set_default_versions.outputs.vtk_commit_sha }} + timestamp: ${{ steps.set_default_versions.outputs.timestamp }} + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 1 + lfs: false + + - name: Set default versions + id: set_default_versions + uses: f3d-app/default-versions-action@main + with: + file: ./source/.github/workflows/versions.json + +#---------------------------------------------------------------------------- +# Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth +#---------------------------------------------------------------------------- + cache_lfs: + runs-on: ubuntu-22.04 + name: Update LFS data cache + outputs: + lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }} + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 1 + lfs: false + + - name: Cache LFS Data + id: lfs_sha_recover + uses: f3d-app/lfs-data-cache-action@v1 + with: + cache_postfix: cache-0 + +#---------------------------------------------------------------------------- +# Cache Dependencies: Checkout and compile all dependencies but VTK if not cached +#---------------------------------------------------------------------------- + cache_dependencies: + name: Cache dependencies + needs: default_versions + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, windows-latest, macos-13, macos-14] + build_type: [standard] + include: + - cpu: x86_64 + - os: macos-14 + cpu: arm64 + - alembic_version: ${{needs.default_versions.outputs.alembic_version}} + - assimp_version: ${{needs.default_versions.outputs.assimp_version}} + - draco_version: ${{needs.default_versions.outputs.draco_version}} + - occt_version: ${{needs.default_versions.outputs.occt_version}} + - openexr_version: ${{needs.default_versions.outputs.openexr_version}} + - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + - pdal_version: ${{needs.default_versions.outputs.pdal_version}} + - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + - usd_version: ${{needs.default_versions.outputs.usd_version}} + - build_type: mindeps + os: ubuntu-22.04 + cpu: x86_64 + alembic_version: ${{needs.default_versions.outputs.alembic_min_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_min_version}} + draco_version: ${{needs.default_versions.outputs.draco_min_version}} + occt_version: ${{needs.default_versions.outputs.occt_min_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_min_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_min_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_min_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_min_version}} + usd_version: ${{needs.default_versions.outputs.usd_min_version}} + + runs-on: ${{matrix.os}} + container: ${{ matrix.os == 'ubuntu-22.04' && 'ghcr.io/f3d-app/f3d-ci' || null }} + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 1 + lfs: false + + - name: Generic Dependencies + uses: ./source/.github/actions/generic-dependencies + with: + raytracing_label: raytracing + cpu: ${{matrix.cpu}} + alembic_version: ${{matrix.alembic_version}} + assimp_version: ${{matrix.assimp_version}} + draco_version: ${{matrix.draco_version}} + occt_version: ${{matrix.occt_version}} + openexr_version: ${{matrix.openexr_version}} + openvdb_version: ${{matrix.openvdb_version}} + pdal_version: ${{matrix.pdal_version}} + pybind11_version: ${{matrix.pybind11_version}} + usd_version: ${{matrix.usd_version}} + +#---------------------------------------------------------------------------- +# Windows CI: Build and test, cross-vtk build matrix +#---------------------------------------------------------------------------- + windows: + if: github.event.pull_request.draft == false + needs: [cache_lfs, cache_dependencies, default_versions] + + strategy: + fail-fast: false + matrix: + vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1, v9.2.6] + static_label: [no-static] + include: + - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + static_label: static + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + vtk_version: ${{matrix.vtk_version}} + raytracing_label: raytracing + static_label: ${{matrix.static_label}} + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + +#---------------------------------------------------------------------------- +# Linux CI: Build and test, cross-vtk build matrix +#---------------------------------------------------------------------------- + linux: + if: github.event.pull_request.draft == false + needs: [cache_lfs, cache_dependencies, default_versions] + + strategy: + fail-fast: false + matrix: + vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1, v9.2.6] + build_type: [standard] + include: + - raytracing_label: raytracing + - exclude_deprecated_label: no-exclude-deprecated + - optional_deps_label: optional-deps + - rendering_backend: auto + - static_label: no-static + - alembic_version: ${{needs.default_versions.outputs.alembic_version}} + - assimp_version: ${{needs.default_versions.outputs.assimp_version}} + - draco_version: ${{needs.default_versions.outputs.draco_version}} + - occt_version: ${{needs.default_versions.outputs.occt_version}} + - openexr_version: ${{needs.default_versions.outputs.openexr_version}} + - openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + - pdal_version: ${{needs.default_versions.outputs.pdal_version}} + - pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + - python_version: ${{needs.default_versions.outputs.python_version}} + - usd_version: ${{needs.default_versions.outputs.usd_version}} + - java_version: ${{needs.default_versions.outputs.java_version}} + - build_type: egl + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + raytracing_label: raytracing + optional_deps_label: optional-deps + exclude_deprecated_label: no-exclude-deprecated + rendering_backend: egl + static_label: no-static + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + - build_type: osmesa + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + raytracing_label: raytracing + optional_deps_label: optional-deps + exclude_deprecated_label: no-exclude-deprecated + rendering_backend: osmesa + static_label: no-static + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + - build_type: exclude_deprecated + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + raytracing_label: raytracing + optional_deps_label: optional-deps + exclude_deprecated_label: exclude-deprecated + rendering_backend: auto + static_label: no-static + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + - build_type: no_optional_deps + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + raytracing_label: no-raytracing + optional_deps_label: no-optional-deps + exclude_deprecated_label: no-exclude-deprecated + rendering_backend: auto + static_label: no-static + - build_type: static_libs + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + raytracing_label: no-raytracing + optional_deps_label: optional-deps + exclude_deprecated_label: no-exclude-deprecated + rendering_backend: auto + static_label: static + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + - build_type: mindeps + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + raytracing_label: raytracing + optional_deps_label: optional-deps + exclude_deprecated_label: no-exclude-deprecated + rendering_backend: auto + static_label: no-static + alembic_version: ${{needs.default_versions.outputs.alembic_min_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_min_version}} + draco_version: ${{needs.default_versions.outputs.draco_min_version}} + occt_version: ${{needs.default_versions.outputs.occt_min_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_min_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_min_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_min_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_min_version}} + python_version: ${{needs.default_versions.outputs.python_min_version}} + usd_version: ${{needs.default_versions.outputs.usd_min_version}} + java_version: ${{needs.default_versions.outputs.java_min_version}} + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + env: + DISPLAY: :0 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + build_type: ${{matrix.build_type}} + vtk_version: ${{matrix.vtk_version}} + raytracing_label: ${{matrix.raytracing_label}} + rendering_backend: ${{matrix.rendering_backend}} + optional_deps_label: ${{matrix.optional_deps_label}} + exclude_deprecated_label: ${{matrix.exclude_deprecated_label}} + static_label: ${{matrix.static_label}} + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{matrix.alembic_version}} + assimp_version: ${{matrix.assimp_version}} + draco_version: ${{matrix.draco_version}} + occt_version: ${{matrix.occt_version}} + openexr_version: ${{matrix.openexr_version}} + openvdb_version: ${{matrix.openvdb_version}} + pdal_version: ${{matrix.pdal_version}} + pybind11_version: ${{matrix.pybind11_version}} + python_version: ${{matrix.python_version}} + usd_version: ${{matrix.usd_version}} + java_version: ${{matrix.java_version}} + +#---------------------------------------------------------------------------- +# MacOS CI: Build and test, cross-vtk build matrix +#---------------------------------------------------------------------------- + macos: + if: github.event.pull_request.draft == false + needs: [cache_lfs, cache_dependencies, default_versions] + strategy: + fail-fast: false + matrix: + vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1, v9.2.6] + + runs-on: macos-13 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + vtk_version: ${{matrix.vtk_version}} + raytracing_label: raytracing + cpu: x86_64 + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + +#---------------------------------------------------------------------------- +# MacOS ARM CI: Build and test, cross-vtk build matrix with a few optional builds +#---------------------------------------------------------------------------- + macos_arm: + if: github.event.pull_request.draft == false + needs: [cache_lfs, cache_dependencies, default_versions] + + strategy: + fail-fast: false + matrix: + vtk_version: ["${{needs.default_versions.outputs.vtk_commit_sha}}", v9.4.1, v9.3.1] # VTK 9.2.6 not compatible with recent clang version on macOS + bundle_label: [no-bundle] + static_label: [no-static] + include: + - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + bundle_label: bundle + static_label: no-static + - vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + bundle_label: no-bundle + static_label: static + + runs-on: macos-14 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + vtk_version: ${{matrix.vtk_version}} + raytracing_label: raytracing + bundle_label: ${{matrix.bundle_label}} + static_label: ${{matrix.static_label}} + cpu: arm64 + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + +#---------------------------------------------------------------------------- +# Python packaging: Build and test the Python wheel +#---------------------------------------------------------------------------- + python-packaging: + if: github.event.pull_request.draft == false + needs: [cache_lfs, cache_dependencies, default_versions] + + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, windows-latest, macos-13] + python_version: ['3.11'] + include: + - os: ubuntu-22.04 + python_version: '3.9' + - os: ubuntu-22.04 + python_version: '3.10' + - os: ubuntu-22.04 + python_version: '3.11' + - os: ubuntu-22.04 + python_version: '3.12' + - os: ubuntu-22.04 + python_version: '3.13' + + runs-on: ${{matrix.os}} + container: ${{ matrix.os == 'ubuntu-22.04' && 'ghcr.io/f3d-app/f3d-ci' || null }} + + env: + DISPLAY: :0 + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Python CI + uses: ./source/.github/actions/python-ci + with: + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + python_version: ${{matrix.python_version}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + +#---------------------------------------------------------------------------- +# Coverage: Build and test on linux with last VTK with coverage option +#---------------------------------------------------------------------------- + coverage: + needs: [cache_lfs, cache_dependencies, default_versions] + if: github.event.pull_request.draft == false + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + # Add dummy F3D_PLUGINS_PATH for coverage + env: + DISPLAY: :0 + F3D_PLUGINS_PATH: /dummy1:/dummy2 + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Coverage CI + uses: ./source/.github/actions/coverage-ci + with: + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + codecov_token: ${{secrets.CODECOV_TOKEN}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + +#---------------------------------------------------------------------------- +# Sanitizer: Build and test on linux with last VTK with sanitizer options +#---------------------------------------------------------------------------- +# "leak" is run by default with "address" so we do not need to run it in CI +# "memory" returns false positives in VTK: +# https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio + sanitizer: + needs: [cache_lfs, cache_dependencies, default_versions] + if: github.event.pull_request.draft == false + + strategy: + fail-fast: false + matrix: + sanitizer_type: [address, thread, undefined] + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + env: + DISPLAY: :0 + CC: clang + CXX: clang++ + VTK_SMP_BACKEND_IN_USE: Sequential + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Sanitizer CI + uses: ./source/.github/actions/sanitizer-ci + with: + sanitizer_type: ${{matrix.sanitizer_type}} + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + +#---------------------------------------------------------------------------- +# static-analysis: Run static analysis on linux +#---------------------------------------------------------------------------- + static-analysis: + needs: [cache_lfs, cache_dependencies, default_versions] + if: github.event.pull_request.draft == false + + strategy: + fail-fast: false + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + env: + CC: clang + CXX: clang++ + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Static analysis CI + uses: ./source/.github/actions/static-analysis-ci + with: + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + +#---------------------------------------------------------------------------- +# external-build: Check build of F3D as sub-project +#---------------------------------------------------------------------------- + external-build: + needs: [cache_dependencies, default_versions] + if: github.event.pull_request.draft == false + + strategy: + fail-fast: false + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source/f3d' + fetch-depth: 0 + lfs: false + + - name: External build CI + uses: ./source/f3d/.github/actions/external-build-ci + with: + vtk_version: ${{needs.default_versions.outputs.vtk_commit_sha}} + +#---------------------------------------------------------------------------- +# android: Check build of F3D for android +#---------------------------------------------------------------------------- + android: + if: github.event.pull_request.draft == false + needs: default_versions + + strategy: + fail-fast: false + matrix: + arch: [armeabi-v7a, arm64-v8a, x86, x86_64] + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-android-${{ matrix.arch }}:${{needs.default_versions.outputs.timestamp}} + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Android CI + uses: ./source/.github/actions/android-ci + with: + arch: ${{matrix.arch}} + +#---------------------------------------------------------------------------- +# webassembly: Build webassembly artifacts +#---------------------------------------------------------------------------- + webassembly: + if: github.event.pull_request.draft == false + needs: default_versions + + strategy: + fail-fast: false + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-wasm:${{needs.default_versions.outputs.timestamp}} + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: 'true' + + - name: WebAssembly CI + uses: ./source/.github/actions/wasm-ci + +#---------------------------------------------------------------------------- +# generate website +#---------------------------------------------------------------------------- + generate-website: + needs: webassembly + name: Generate Website + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: Build Jekyll + uses: actions/jekyll-build-pages@v1 + + - name: Install doxygen and build doxygen doc + working-directory: ${{github.workspace}} + run: | + pip install "sphinx==5.3.0" "pydata-sphinx-theme==0.13.1" sphinx-book-theme exhale + sudo apt install doxygen + sphinx-build -M html ./library/doxygen ./library/doxygen/build/ + sudo mv library/doxygen/build/html _site/doc/libf3d/doxygen + sphinx-build -M html ./vtkext/public/doxygen ./vtkext/public/doxygen/build/ + sudo mv vtkext/public/doxygen/build/html _site/doc/libf3d/vtkext_doxygen + + - name: Retrieve web assembly binaries + uses: actions/download-artifact@v4 + with: + name: f3d-wasm + path: ./web + + - name: Copy web assembly binaries + run: sudo mv web _site/ + + - name: Deploy + if: github.ref == 'refs/heads/master' + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: _site + token: ${{ secrets.GITHUB_TOKEN }} + clean: true diff --git a/.github/workflows/clean-caches.yml b/.github/workflows/clean-caches.yml new file mode 100644 index 0000000000..4d6cf61fad --- /dev/null +++ b/.github/workflows/clean-caches.yml @@ -0,0 +1,12 @@ +name: Clear all Github actions caches +on: + workflow_dispatch: + +jobs: + my-job: + name: Delete all caches + runs-on: ubuntu-latest + + steps: + - name: Clear caches + uses: easimon/wipe-cache@v2 diff --git a/.github/workflows/nightly_vtk_master.yml b/.github/workflows/nightly_vtk_master.yml new file mode 100644 index 0000000000..fb8cdf8c47 --- /dev/null +++ b/.github/workflows/nightly_vtk_master.yml @@ -0,0 +1,320 @@ +name: Nightly VTK master + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + +#---------------------------------------------------------------------------- +# Check nightly: Checkout VTK and check if the last merged commit is less than 24 hours old +#---------------------------------------------------------------------------- + check_nightly: + if: github.repository == 'f3d-app/f3d' + runs-on: ubuntu-22.04 + name: Check nightly + outputs: + should_run: ${{ steps.should_run.outputs.should_run }} + vtk_sha: ${{ steps.vtk_sha_recover.outputs.vtk_sha }} + steps: + + - name: Checkout VTK + uses: actions/checkout@v4 + with: + repository: Kitware/VTK + submodules: false + fetch-depth: 0 + ref: master + + - name: Check latest commit age is less than 24 hours + id: should_run + run: test -n "$(git rev-list --no-merges HEAD --not $(git rev-list -n1 --before=24hours --first-parent HEAD))" && echo "should_run=true" >> $GITHUB_OUTPUT || echo "should_run=false" >> $GITHUB_OUTPUT + + - name: Set VTK sha env var + id: vtk_sha_recover + shell: bash + run: echo "vtk_sha=$(git log -n 1 --pretty=format:%H)" >> $GITHUB_OUTPUT + +#---------------------------------------------------------------------------- +# Default versions: Set default version for all dependencies +#---------------------------------------------------------------------------- + default_versions: + runs-on: ubuntu-22.04 + name: Set default versions + outputs: + alembic_version: ${{ steps.set_default_versions.outputs.alembic_version }} + alembic_min_version: ${{ steps.set_default_versions.outputs.alembic_min_version }} + assimp_version: ${{ steps.set_default_versions.outputs.assimp_version }} + assimp_min_version: ${{ steps.set_default_versions.outputs.assimp_min_version }} + draco_version: ${{ steps.set_default_versions.outputs.draco_version }} + draco_min_version: ${{ steps.set_default_versions.outputs.draco_min_version }} + occt_version: ${{ steps.set_default_versions.outputs.occt_version }} + occt_min_version: ${{ steps.set_default_versions.outputs.occt_min_version }} + openexr_version: ${{ steps.set_default_versions.outputs.openexr_version }} + openexr_min_version: ${{ steps.set_default_versions.outputs.openexr_min_version }} + openvdb_version: ${{ steps.set_default_versions.outputs.openvdb_version }} + openvdb_min_version: ${{ steps.set_default_versions.outputs.openvdb_min_version }} + pdal_version: ${{ steps.set_default_versions.outputs.pdal_version }} + pdal_min_version: ${{ steps.set_default_versions.outputs.pdal_min_version }} + pybind11_version: ${{ steps.set_default_versions.outputs.pybind11_version }} + pybind11_min_version: ${{ steps.set_default_versions.outputs.pybind11_min_version }} + python_version: ${{ steps.set_default_versions.outputs.python_version }} + python_min_version: ${{ steps.set_default_versions.outputs.python_min_version }} + usd_version: ${{ steps.set_default_versions.outputs.usd_version }} + usd_min_version: ${{ steps.set_default_versions.outputs.usd_min_version }} + java_version: ${{ steps.set_default_versions.outputs.java_version }} + java_min_version: ${{ steps.set_default_versions.outputs.java_min_version }} + timestamp: ${{ steps.set_default_versions.outputs.timestamp }} + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 1 + lfs: false + + - name: Set default versions + id: set_default_versions + uses: f3d-app/default-versions-action@main + with: + file: ./source/.github/workflows/versions.json + +#---------------------------------------------------------------------------- +# Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth +#---------------------------------------------------------------------------- + + cache_lfs: + needs: check_nightly + if: ${{ needs.check_nightly.outputs.should_run == 'true' }} + runs-on: ubuntu-22.04 + name: Update LFS data cache + outputs: + lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }} + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 1 + lfs: false + + - name: Cache LFS Data + id: lfs_sha_recover + uses: f3d-app/lfs-data-cache-action@v1 + with: + cache_postfix: cache-0 + +#---------------------------------------------------------------------------- +# Windows CI: Build and test +#---------------------------------------------------------------------------- + windows: + needs: [cache_lfs, check_nightly, default_versions] + if: ${{ needs.check_nightly.outputs.should_run == 'true' }} + strategy: + fail-fast: false + runs-on: windows-latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} + raytracing_label: raytracing + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + +#---------------------------------------------------------------------------- +# Linux CI: Build and test +#---------------------------------------------------------------------------- + linux: + needs: [cache_lfs, check_nightly, default_versions] + if: ${{ needs.check_nightly.outputs.should_run == 'true' }} + strategy: + fail-fast: false + matrix: + build_type: [standard] + include: + - rendering_backend: auto + - build_type: egl + rendering_backend: egl + - build_type: osmesa + rendering_backend: osmesa + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + env: + DISPLAY: :0 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + build_type: ${{matrix.build_type}} + vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} + raytracing_label: 'raytracing' + rendering_backend: ${{matrix.rendering_backend}} + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + +#---------------------------------------------------------------------------- +# MacOS CI: Build and test +#---------------------------------------------------------------------------- + macos: + needs: [cache_lfs, check_nightly, default_versions] + if: ${{ needs.check_nightly.outputs.should_run == 'true' }} + strategy: + fail-fast: false + + runs-on: macos-13 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} + cpu: x86_64 + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + +#---------------------------------------------------------------------------- +# MacOS arm64 CI: Build and test +#---------------------------------------------------------------------------- + macos_arm: + needs: [cache_lfs, check_nightly, default_versions] + if: ${{ needs.check_nightly.outputs.should_run == 'true' }} + strategy: + fail-fast: false + + runs-on: macos-14 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Generic CI + uses: ./source/.github/actions/generic-ci + with: + vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} + cpu: arm64 + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} + +#---------------------------------------------------------------------------- +# Sanitizer: Build and test on linux with last VTK with sanitizer options +#---------------------------------------------------------------------------- +# "leak" is run by default with "address" so we do not need to run it in CI +# "memory" returns false positives in VTK: +# https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio + sanitizer: + needs: [cache_lfs, check_nightly, default_versions] + if: ${{ needs.check_nightly.outputs.should_run == 'true' }} + + strategy: + fail-fast: false + matrix: + sanitizer_type: [address, thread, undefined] + + runs-on: ubuntu-22.04 + container: ghcr.io/f3d-app/f3d-ci + + env: + DISPLAY: :0 + CC: clang + CXX: clang++ + VTK_SMP_BACKEND_IN_USE: Sequential + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + lfs: false + + - name: Sanitizer CI + uses: ./source/.github/actions/sanitizer-ci + with: + vtk_version: ${{needs.check_nightly.outputs.vtk_sha}} + sanitizer_type: ${{matrix.sanitizer_type}} + lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}} + alembic_version: ${{needs.default_versions.outputs.alembic_version}} + assimp_version: ${{needs.default_versions.outputs.assimp_version}} + draco_version: ${{needs.default_versions.outputs.draco_version}} + occt_version: ${{needs.default_versions.outputs.occt_version}} + openexr_version: ${{needs.default_versions.outputs.openexr_version}} + openvdb_version: ${{needs.default_versions.outputs.openvdb_version}} + pdal_version: ${{needs.default_versions.outputs.pdal_version}} + pybind11_version: ${{needs.default_versions.outputs.pybind11_version}} + python_version: ${{needs.default_versions.outputs.python_version}} + usd_version: ${{needs.default_versions.outputs.usd_version}} + java_version: ${{needs.default_versions.outputs.java_version}} diff --git a/.github/workflows/public-api-warn.yml b/.github/workflows/public-api-warn.yml new file mode 100644 index 0000000000..d03a6a6c06 --- /dev/null +++ b/.github/workflows/public-api-warn.yml @@ -0,0 +1,19 @@ +name: Public API Warning +on: + pull_request_target: + paths: + - 'library/public/*.h' + - 'library/public/*.h.in' + +jobs: + public-api-warn: + name: Public API Warning + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: marocchino/sticky-pull-request-comment@v2 + with: + message: | + You are modifying libf3d public API! :warning:Please update bindings accordingly:warning:! + You can find them in their respective directories: `python`, `java`, `webassembly`. diff --git a/.github/workflows/style-checks.yml b/.github/workflows/style-checks.yml new file mode 100644 index 0000000000..6fd7aa3da3 --- /dev/null +++ b/.github/workflows/style-checks.yml @@ -0,0 +1,58 @@ +on: + pull_request_target: + types: [assigned, opened, synchronize, reopened] + branches: + - master +name: Style Checks +jobs: + + style-checks: + name: Formatting Check + runs-on: ubuntu-latest + + env: + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + + - uses: actions/checkout@v4 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + + - name: C++ Formatting + uses: DoozyX/clang-format-lint-action@v0.16 + with: + source: '.' + extensions: 'h,cxx,in' + exclude: './cmake **/*.py.in **/*.log.in **/*.json.in **/*.thumbnailer.in **/*.cmake.in **/*.desktop.in' + clangFormatVersion: 18 + inplace: True + + - name: Python Formatting + uses: psf/black@stable + with: + options: "--include '(\\.py|\\.py\\.in)'" + + - name: Prettier Formatting + continue-on-error: true + uses: creyD/prettier_action@v4.3 + with: + dry: True + prettier_options: '-w **/*.{js,json,md,html}' + + - name: Codespell in place + shell: bash + run: | + pip install codespell + codespell -fHw . + + - uses: googleapis/code-suggester@v5 + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.' + + - name: Diff output + shell: bash + run: git diff --color=always --exit-code diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index e6b8d183e3..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Test -on: push - -jobs: - hello: - runs-on: ubuntu-latest - steps: - - name: Start echo - run: echo "Start!!" - - - name: Install zlib - uses: ./source/.github/actions/zlib-install-dep - with: - cpu: ${{inputs.cpu}} - - - name: End echo - run: echo "End!!" diff --git a/.github/workflows/versions.json b/.github/workflows/versions.json new file mode 100644 index 0000000000..147b1c8e0e --- /dev/null +++ b/.github/workflows/versions.json @@ -0,0 +1,37 @@ +{ + "$comments": [ + "Alembic is part of VFX reference platform (CY2025: 1.8.x)", + "OpenEXR is part of VFX reference platform (CY2025: 3.3.x)", + "OpenVDB is part of VFX reference platform (CY2025: 12.x)", + "OpenVDB min version is not enforced by F3D code and missing from VTK code", + "Python is part of VFX reference platform (CY2025: 3.11)" + ], + "versions": { + "alembic": "1.8.8", + "assimp": "v5.4.3", + "draco": "1.5.7", + "occt": "V7_8_1", + "openexr": "v3.3.2", + "openvdb": "v12.0.0", + "pdal": "2.8.4", + "pybind11": "v2.13.6", + "python": "3.11", + "usd": "v24.11", + "java": "21" + }, + "min_versions": { + "alembic": "1.8.5", + "assimp": "v5.4.0", + "draco": "1.5.6", + "occt": "V7_6_3", + "openexr": "v3.0.1", + "openvdb": "v12.0.0", + "pdal": "2.6.0", + "pybind11": "v2.9.2", + "python": "3.9", + "usd": "v24.08", + "java": "17" + }, + "vtk_commit_sha": "b2944839c08cb0e3cfa58b9a4667e061e0faecea", + "timestamp": "20250314_0" +} From 168ca0340a7ed19bee2ccd6ac977e8194926ed75 Mon Sep 17 00:00:00 2001 From: Husam Massalha Date: Tue, 1 Apr 2025 13:16:02 +0300 Subject: [PATCH 29/29] update proj install --- .github/actions/proj-install-dep/action.yml | 32 +++++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/actions/proj-install-dep/action.yml b/.github/actions/proj-install-dep/action.yml index cb70051395..cbf6223421 100644 --- a/.github/actions/proj-install-dep/action.yml +++ b/.github/actions/proj-install-dep/action.yml @@ -17,6 +17,27 @@ runs: path: dependencies/proj_install key: proj-9.4.0-${{runner.os}}-${{inputs.cpu}}-1 + - name: Install SQLite3 dependencies + if: steps.cache-proj.outputs.cache-hit != 'true' + shell: bash + run: | + if [[ "${{runner.os}}" == "Linux" ]]; then + echo "==> Starting installation of SQLite3 and related dependencies on Linux" + sudo apt-get update + sudo apt-get install -y ccache cmake g++ sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev + echo "==> Finished installing SQLite3 dependencies on Linux" + elif [[ "${{runner.os}}" == "macOS" ]]; then + echo "==> Starting installation of SQLite3 and related dependencies on macOS" + brew update + brew install cmake ccache sqlite3 libtiff libcurl + echo "==> Finished installing SQLite3 dependencies on macOS" + elif [[ "${{runner.os}}" == "Windows" ]]; then + echo "==> Starting installation of SQLite3 and related dependencies on Windows" + vcpkg install sqlite3[core,tool] tiff curl --triplet=${{ env.ARCH }}-windows + echo "==> Finished installing SQLite3 dependencies on Windows" + fi + + # Dependents: gdal - name: Checkout PROJ if: steps.cache-proj.outputs.cache-hit != 'true' @@ -26,13 +47,6 @@ runs: path: './dependencies/proj' ref: 9.4.0 - # Install SQLite first (only if PROJ is not cached) - - name: Install SQLite Dependency - if: steps.cache-proj.outputs.cache-hit != 'true' - uses: ./source/.github/actions/sqlite-install-dep - with: - cpu: ${{ inputs.cpu }} - - name: Setup PROJ if: steps.cache-proj.outputs.cache-hit != 'true' working-directory: ${{github.workspace}}/dependencies @@ -52,8 +66,8 @@ runs: -DCMAKE_INSTALL_PREFIX=../proj_install -DCMAKE_PREFIX_PATH=$(pwd)/../install -DBUILD_TESTING=OFF - ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || null }} - ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} + ${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0' || '' }} + ${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || '' }} - name: Build PROJ if: steps.cache-proj.outputs.cache-hit != 'true'