Skip to content

Commit

Permalink
Merge pull request #1689 from DGtal-team/conan
Browse files Browse the repository at this point in the history
Removing appeveyor and windows integration tests with GitHub Actions, many warning fixes
  • Loading branch information
dcoeurjo authored Mar 9, 2023
2 parents fa353ad + 3391a96 commit 77bd363
Show file tree
Hide file tree
Showing 158 changed files with 801 additions and 847 deletions.
84 changes: 69 additions & 15 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ on:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
TESTBLACKLIST: "(testCompressedVolWriter|testLongvol|testLinearStructure)"
CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=100
CONFIG_LINUX: -DWITH_MAGICK=true -DWITH_GMP=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=false -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true
CONFIG_MAC: -DWITH_EIGEN=true -DWITH_GMP=true

BUILD_TYPE: Debug
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter)"
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 -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
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest, macOS-latest, windows-latest]
BUILD_TYPE: [Debug,Release]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,11 +31,28 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev ninja-build libhdf5-serial-dev libcairo2-dev libgmp-dev libgraphicsmagick++1-dev libfftw3-dev libinsighttoolkit4-dev
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
- name: Install macOS deps
if: matrix.os == 'macOS-latest'
run: brew install boost ninja gmp
run: brew install boost ninja gmp libomp

- name: Install conan
if: matrix.os == 'windows-latest'
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0

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

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

- name: Get white list of tests
run: |
Expand All @@ -48,26 +66,34 @@ jobs:
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL $CONFIG_LINUX -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" -G Ninja
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_LINUX -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" -G Ninja

- name: Configure CMake (macOS)
if: matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL $CONFIG_MAC -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" -G Ninja
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_MAC -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Configure CMake (windows)
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 }}"

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
run: cmake --build . --config ${{ matrix.BUILD_TYPE }} --parallel 3

- name: Test
working-directory: ${{runner.workspace}}/build
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash
run: |
echo ctest -C $BUILD_TYPE --output-on-failure -E $TESTBLACKLIST
ctest -C $BUILD_TYPE --output-on-failure -E $TESTBLACKLIST
echo ctest -C ${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST
ctest -C $${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST
- name: DGtalTools (linux only, we check this PR against DGtalTools master)
if: matrix.os == 'ubuntu-latest'
Expand All @@ -81,3 +107,31 @@ jobs:
echo cmake .. -DDGTAL_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
cmake .. -DDGtal_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
ninja
# Documentatin (build, check and deploy)
Documentation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up
run: |
sudo apt-get update
sudo apt-get install libboost-dev graphviz texlive doxygen
- name: Building pages
run: |
mkdir build
cd build
cmake ..
wget --no-check-certificate -O "${{runner.workspace}}/DGtal/build/DGtalTools-tagfile" http://dgtal.org/doc/tags/DGtalTools-tagfile;
make doc > buildDoc.log
- name: Checking doc
run: |
pwd
export BUILD_DIR=${{runner.workspace}}/DGtal/build
export SRC_DIR=${{runner.workspace}}/DGtal/
.github/workflows/checkDoxygenDocumentation.sh
#&& .github/workflows/check_src_file_tag.sh
54 changes: 39 additions & 15 deletions .github/workflows/buildAndDocumentation-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ on:

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

BUILD_TYPE: Debug
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter)"
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 -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
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest, macOS-latest, windows-latest]
BUILD_TYPE: [Debug,Release]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,12 +31,28 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
- name: Install macOS deps
if: matrix.os == 'macOS-latest'
run: brew install boost ninja gmp libomp

- name: Install conan
if: matrix.os == 'windows-latest'
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0

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

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

- name: Get white list of tests
run: |
Expand All @@ -49,26 +66,33 @@ jobs:
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL $CONFIG_LINUX -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" -G Ninja
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_LINUX -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" -G Ninja

- name: Configure CMake (macOS)
if: matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL $CONFIG_MAC -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_MAC -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Configure CMake (windows)
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 }}"

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
run: cmake --build . --config ${{ matrix.BUILD_TYPE }} --parallel 3

- name: Test
working-directory: ${{runner.workspace}}/build
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash
run: |
echo ctest -C $BUILD_TYPE --output-on-failure -E $TESTBLACKLIST
ctest -C $BUILD_TYPE --output-on-failure -E $TESTBLACKLIST
echo ctest -C ${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST
ctest -C $${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST
- name: DGtalTools (linux only, we check this PR against DGtalTools master)
Expand All @@ -89,7 +113,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up
run: |
Expand Down
File renamed without changes.
11 changes: 5 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Project definition
# -----------------------------------------------------------------------------
cmake_minimum_required (VERSION 3.11)
cmake_policy(SET CMP0048 OLD) # project() doesn't have VERSION
cmake_policy(SET CMP0057 NEW) # the new interpretation of IN_LIST is by default not set (at least until 3.21.1).
project (DGtal)

Expand All @@ -16,8 +15,13 @@ endif()
# -----------------------------------------------------------------------------
# Define variables and cmake parameters, and display some information
# -----------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/deps)



set(DGtal_VERSION_MAJOR 1)
set(DGtal_VERSION_MINOR 4)
set(DGtal_VERSION_PATCH beta)
Expand Down Expand Up @@ -125,11 +129,6 @@ endif()
message(STATUS "-------------------------------------------------------------------------------")
endif()

# -----------------------------------------------------------------------------
# Code coverage
# -----------------------------------------------------------------------------
include(CheckCoverage)

# -----------------------------------------------------------------------------
# Custom command/targets depending on the cmake generator
# -----------------------------------------------------------------------------
Expand Down
18 changes: 15 additions & 3 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# DGtal 1.4beta

## New features / critical changes

- *General*
- Major update: C++17 is now required for DGtal. (David Coeurjolly,
- 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
option to activate this. (David Coeurjolly,
[#1689](https://github.com/DGtal-team/DGtal/pull/1689))


## Changes
- *IO*
Expand All @@ -16,6 +21,9 @@
- *Github*
- New `/builddoc` and `/fullbuild` commands on PR comments (David Coeurjolly,
[#1683](https://github.com/DGtal-team/DGtal/pull/1683))
- Continuous integration on windows is now performed by Github
Action instead of Appeveyor (David Coeurjolly,
[#1689](https://github.com/DGtal-team/DGtal/pull/1689))

## Bug fixes

Expand All @@ -27,7 +35,11 @@
- Removing unnecessary includes to speed-up compilation (David Coeurjolly,
[#1680](https://github.com/DGtal-team/DGtal/pull/1680))
- Upgrading pybind11 to v2.9 or python binding (David Coeurjolly,
[#1685](https://github.com/DGtal-team/DGtal/pull/1685))
[#1685](https://github.com/DGtal-team/DGtal/pull/1685))
- Many warning fixed (due to c++17 upgrade. (David Coeurjolly,
[#1691](https://github.com/DGtal-team/DGtal/pull/1691))
- WITH_COVERAGE option removed. (David Coeurjolly,
[#1691](https://github.com/DGtal-team/DGtal/pull/1691))

- *Topology package*
- Fix KhalimskySpaceND to get it work with BigInteger (Tristan Roussillon,
Expand Down
Loading

0 comments on commit 77bd363

Please sign in to comment.