Skip to content

Commit

Permalink
Merge pull request #2 from kerautret/FixCIFrechetFix
Browse files Browse the repository at this point in the history
Fix ci frechet fix
  • Loading branch information
dcoeurjo authored Jun 10, 2024
2 parents 81227e3 + 95a2b7d commit 7c78290
Show file tree
Hide file tree
Showing 36 changed files with 8,274 additions and 220 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10 -DWITH_EIGEN=true
CONFIG_LINUX: -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_FFTW3=true -DWITH_CGAL=true -DWITH_LIBIGL=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true -DWITH_CGAL=true -DWITH_LIBIGL=true
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true
CONFIG_WINDOWS: -DWITH_OPENMP=true #-DWITH_GMP=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true

jobs:
build:
Expand Down Expand Up @@ -44,17 +44,18 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0
version: 2.4.0

- name: Create conan default profile
if: matrix.os == 'windows-latest'
run: conan profile new default --detect

run: |
conan profile detect --force
- uses: actions/cache@v4
if: matrix.os == 'windows-latest'
with:
path: ~/.conan
key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }}
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }}

- name: Get white list of tests
run: |
Expand All @@ -80,7 +81,9 @@ jobs:
if: matrix.os == 'windows-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"
run: |
conan install $GITHUB_WORKSPACE --build=missing
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"
- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/buildAndDocumentation-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ on:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10 -DWITH_EIGEN=true
CONFIG_LINUX: -DUSE_CCACHE=NO -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_CGAL=true -DWITH_LIBIGL=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DUSE_CCACHE=NO -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true -DWITH_CGAL=true -DWITH_LIBIGL=true
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true
CONFIG_WINDOWS: -DWITH_OPENMP=true #-DWITH_GMP=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true

jobs:
build:
Expand Down Expand Up @@ -45,17 +44,19 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0
version: 2.4.0

- name: Create conan default profile
if: matrix.os == 'windows-latest'
run: conan profile new default --detect
run: |
conan profile detect --force
- uses: actions/cache@v4
if: matrix.os == 'windows-latest'
with:
path: ~/.conan
key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }}
path: ~/.conan2
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }}

- name: Get white list of tests
run: |
Expand All @@ -81,7 +82,9 @@ jobs:
if: matrix.os == 'windows-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"
run: |
conan install $GITHUB_WORKSPACE --build=missing
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"
- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/pythonBindings-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0
version: 2.4.0

- name: Install dependancies (conan - Windows 2/2)
if: matrix.os == 'windows-latest'
run: conan profile new default --detect

run: |
conan profile detect --force
- uses: actions/cache@v3
if: matrix.os == 'windows-latest'
with:
path: ~/.conan
key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }}
path: ~/.conan2
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }}


- name: Create Build Environment
Expand All @@ -80,7 +81,9 @@ jobs:
if: matrix.os == 'windows-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS
run: |
conan install $GITHUB_WORKSPACE --build=missing
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS
- name: Build
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/pythonBindings-Pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,19 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0
version: 2.4.0

- name: Install dependancies (conan - Windows 2/2)
if: matrix.os == 'windows-latest'
run: conan profile new default --detect
run: |
conan profile new default --detect
conan install . --output-folder=build --build=missing
- uses: actions/cache@v3
if: matrix.os == 'windows-latest'
with:
path: ~/.conan
key: ${{ runner.os }}-conan-${{ matrix.BUILD_TYPE }}
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }}

- name: Install python dependancies
shell: bash
Expand Down
42 changes: 34 additions & 8 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
- Major update: C++17 is now required for DGtal. (David Coeurjolly,
[#1682](https://github.com/DGtal-team/DGtal/pull/1682))
- Mandatory dependencies and some optional ones can be setup by
conan.io, especially on windows, new `ENABLE_CONAN` cmake
conan.io, especially on Windows, new `ENABLE_CONAN` cmake
option to activate this. (David Coeurjolly,
[#1689](https://github.com/DGtal-team/DGtal/pull/1689))
- Faster build using CPM for dependency download and ccache with the cmake `USE_CCACHE=YES`option
(ccache must be installed). (David Coeurjolly, [#1696](https://github.com/DGtal-team/DGtal/pull/1696))
- Better documentation style using doxygen-awesome.css. (David Coeurjolly,
[#1697](https://github.com/DGtal-team/DGtal/pull/1697))
[#1697](https://github.com/DGtal-team/DGtal/pull/1697))

- *Geometry*
- New implicit shape from point cloud using LibIGL Winding Numbers. (David Coeurjolly,
Expand All @@ -23,24 +23,41 @@
[#1699](https://github.com/DGtal-team/DGtal/pull/1699))
- Python bindings and Pypi deploy are now handled by Github-Actions (Bastien Doignies,
[#1721](https://github.com/DGtal-team/DGtal/pull/1721))
- Add CMake option DGTAL_WRAP_PYTHON (Pablo Hernandez-Cerdan,
[#1700](https://github.com/DGtal-team/DGtal/pull/1700))
- Upgrade of the conan scripts (for windows build) to conan 2, removing the ENABLE_CONAN option
(documentation update instead) (David Coeurjolly,
[#1729](https://github.com/DGtal-team/DGtal/pull/1729))

- *IO*
- New method to change the mode of the light position in Viewer3D (fixed to
camera or the scene) (Bertrand Kerautret, [#1683](https://github.com/DGtal-team/DGtal/pull/1683))
- Add a new method to store material information in obj file in MeshReader and MeshWriter.
(Bertrand Kerautret, [#1686](https://github.com/DGtal-team/DGtal/pull/1686))
- Fix duplicate symbols on Windows due to stb_image, see issue #1714 (David Coeurjolly,
[#1715](https://github.com/DGtal-team/DGtal/pull/1715)
[#1715](https://github.com/DGtal-team/DGtal/pull/1715))

- *Shapes*
- Add flips to SurfaceMesh data structure
(Jacques-Olivier Lachaud, [#1702](https://github.com/DGtal-team/DGtal/pull/1702))
- Add flips to SurfaceMesh data structure (Jacques-Olivier Lachaud,
[#1702](https://github.com/DGtal-team/DGtal/pull/1702))
- Add method to remove isolated vertices in Mesh, improve obj
material reading from potential obsolete path. (Bertrand Kerautret,
[#1709](https://github.com/DGtal-team/DGtal/issues/1709))
- Update of the WindingNumber constructor to allow external computation of point areas
- Update of the WindingNumberShape constructor to allow external computation of point areas
(David Coeurjolly,[#1719](https://github.com/DGtal-team/DGtal/issues/1719))
- The WindingNumberShape class can output the raw winding number values
(David Coeurjolly,[#1719](https://github.com/DGtal-team/DGtal/issues/1719))

- *DEC*
- New helper functor to construct an embedder to correct the PolygonalCalculs
(projection onto estimated tangent planes) (David Coeurjolly,
[#1730](https://github.com/DGtal-team/DGtal/issues/17309))

- *Geometry package*
- Add creation of polytopes from segments and triangles in
ConvexityHelper and 3-5xfaster full subconvexity tests for triangles
in DigitalConvexity (Jacques-Olivier Lachaud,
[#1717](https://github.com/DGtal-team/DGtal/pull/1717))

- *Project*
- Add CMake option DGTAL_WRAP_PYTHON (Pablo Hernandez-Cerdan,
Expand Down Expand Up @@ -84,16 +101,25 @@
[#1711](https://github.com/DGtal-team/DGtal/pull/1711))
- Fixing install path of CPM in the DGtalConfig.cmake.in (David Coeurjolly,
[#1713](https://github.com/DGtal-team/DGtal/pull/1713))
- DGTAL_LIBRARIES cmake flag now contains the Deps (David Coeurjolly,
[#1728](https://github.com/DGtal-team/DGtal/pull/1728))

- *Topology package*
- Fix KhalimskySpaceND to get it work with BigInteger (Tristan Roussillon,
[#1681](https://github.com/DGtal-team/DGtal/pull/1681)
[#1681](https://github.com/DGtal-team/DGtal/pull/1681))

- *Geometry package*
- Fix Issue #1676 in testStabbingCircleComputer (Tristan Roussillon,
[#1688](https://github.com/DGtal-team/DGtal/pull/1688)
- Fix BoundedLatticePolytopeCounter::countInterior method (Jacques-Olivier Lachaud,
[#1717](https://github.com/DGtal-team/DGtal/pull/1717))
- Fix const attribute that shouldn't be in FreemanChain (Colin Weill--Duflos,
[#1723](https://github.com/DGtal-team/DGtal/pull/1723))
[#1723](https://github.com/DGtal-team/DGtal/pull/1723))
- Fix seg fault due to recent compilers in FrechetShortcut (Bertrand Kerautret,
Isabelle Sivignon [#1726](https://github.com/DGtal-team/DGtal/pull/1726))
- Fix FrechetShortcut to enable the parameter error to be equal to 0 and add new
tests in testFrechetShortcut (Isabelle Sivignon, [#1726](https://github.com/DGtal-team/DGtal/pull/1726))


- *IO*
- Fix of the `getHSV` method in the `Color` class. (David Coeurjolly,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and to construct a federative project. Another objective of DGtal is
to simplify the construction of demonstration tools to share new
results and potential efficiency of the proposed work.

DGtal received the [Symposium on Geometry Processing Software Award in 2016](http://awards.geometryprocessing.org/).

Quick Install
=============
Expand Down
64 changes: 0 additions & 64 deletions cmake/CheckDGtalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,6 @@ message(STATUS "----------------------------------------------------------------
message(STATUS "DGtal required dependencies: ")


# -----------------------------------------------------------------------------
# Mandatory and optional deps via conan
# -----------------------------------------------------------------------------
option(ENABLE_CONAN "Enable conan for deps discovery (used for windows CI for instance) features." OFF)


if (ENABLE_CONAN)
message(STATUS "Conan enabled for deps")

if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake"
STATUS DOWNLOAD_STATUS
TLS_VERIFY ON)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
# Check if download was successful.
if(${STATUS_CODE} EQUAL 0)
message(STATUS "Download completed successfully!")
else()
message(STATUS "Error occurred during download: ${ERROR_MESSAGE}")
message(STATUS "Trying turning TLS_VERIFY OFF")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake"
STATUS DOWNLOAD_STATUS
TLS_VERIFY OFF)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
if(${STATUS_CODE} EQUAL 0)
message(STATUS "Download completed successfully!")
else()
message(FATAL_ERROR "Error occurred during download: ${ERROR_MESSAGE}")
endif()
endif()
endif()

include("${CMAKE_BINARY_DIR}/conan.cmake")

conan_cmake_configure(REQUIRES zlib/1.2.13
boost/1.81.0
gmp/6.2.1
fftw/3.3.9
#cairo/1.17.6
#libpng/1.6.39 #Explicit fix deps (compat issues)
#expat/2.5.0
#openssl/1.1.1s
#libiconv/1.17
OPTIONS boost:header_only=True
gmp:enable_cxx=True
GENERATORS cmake_find_package)

conan_cmake_autodetect(settings)
conan_cmake_install(PATH_OR_REFERENCE .
BUILD missing
REMOTE conancenter
SETTINGS ${settings})

set(FFTW3_DIR ${CONAN_FFTW_ROOT})
message(STATUS "Setting FFTW3_DIR to ${CONAN_FFTW_ROOT}")
else()
message(STATUS "Conan disabled")
endif()

# -----------------------------------------------------------------------------
# Looking for boost
# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cmake/DGtalConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,5 @@ if(NOT TARGET DGtal)
include ("${DGTAL_CMAKE_DIR}/DGtalLibraryDepends.cmake")
endif()

set(DGTAL_LIBRARIES DGtal Eigen3::Eigen)
set(DGTAL_LIBRARIES DGtal ${DGtalLibDependencies})
get_target_property(DGTAL_INCLUDE_DIRS DGtal INTERFACE_INCLUDE_DIRECTORIES)
14 changes: 14 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[requires]
fmt/9.1.0
zlib/1.2.13
boost/1.81.0
gmp/6.3.0
fftw/3.3.9

[generators]
CMakeDeps
CMakeToolchain

[options]
boost*:header_only=True
gmp*:enable_cxx=True
1 change: 1 addition & 0 deletions examples/polyscope-examples/dgtalCalculus-bunny.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Laboratoire d'InfoRmatique en Image et Systemes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
*
* @date 2021/09/02
* @ingroup Examples
*
* This file is part of the DGtal library.
*/
Expand Down
21 changes: 4 additions & 17 deletions examples/polyscope-examples/dgtalCalculus-geodesic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @file
* @author David Coeurjolly (\c david.coeurjolly@liris.cnrs.fr )
* Laboratoire d'InfoRmatique en Image et Systemes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
* @ingroup Examples
*
* @date 2021/09/02
*
Expand Down Expand Up @@ -92,25 +93,11 @@ void precompute()
auto surfels = SH3::getSurfelRange( surface, params2 );
iinormals = SHG3::getIINormalVectors(binary_image, surfels,params2);
trace.info()<<iinormals.size()<<std::endl;
auto myProjEmbedder = [&](Face f, Vertex v)
{
const auto nn = iinormals[f];
RealPoint centroid(0.0,0.0,0.0); //centroid of the original face
auto cpt=0;
for(auto v: surfmesh.incidentVertices(f))
{
cpt++;
centroid += surfmesh.position(v);
}
centroid = centroid / (double)cpt;
RealPoint p = surfmesh.position(v);
auto cp = p-centroid;
RealPoint q = p - nn.dot(cp)*nn;
return q;
};
psMesh->addFaceVectorQuantity("II normals", iinormals);

calculus = new PolyCalculus(surfmesh);
calculus->setEmbedder( myProjEmbedder );
functors::EmbedderFromNormalVectors<Z3i::RealPoint, Z3i::RealVector> embedderFromNormals(iinormals,surfmesh);
calculus->setEmbedder( embedderFromNormals );
}

heat = new GeodesicsInHeat<PolyCalculus>(calculus);
Expand Down
1 change: 1 addition & 0 deletions examples/polyscope-examples/dgtalCalculus-halfsphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France
*
* @date 2022/04/10
* @ingroup Examples
*
* This file is part of the DGtal library.
*/
Expand Down
Loading

0 comments on commit 7c78290

Please sign in to comment.