Merge pull request #1743 from DGtal-team/upPolyscope #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI (linux/macOS/windows), master | |
on: | |
push: | |
branches: [ master ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)" | |
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 #-DWITH_GMP=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
BUILD_TYPE: [Debug,Release] | |
exclude: | |
- os: windows-latest | |
BUILD_TYPE: Debug | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 10 | |
- name: Install linux deps | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-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 cgal | |
- name: Install conan | |
if: matrix.os == 'windows-latest' | |
id: conan | |
uses: turtlebrowser/get-conan@main | |
with: | |
version: 2.4.0 | |
- name: Create conan default profile | |
if: matrix.os == 'windows-latest' | |
run: | | |
conan profile detect --force | |
- uses: actions/cache@v4 | |
if: matrix.os == 'windows-latest' | |
with: | |
path: ~/.conan2 | |
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }} | |
- name: Get white list of tests | |
run: | | |
echo "::set-output name=WHITELIST::$(${{runner.workspace}}/DGtal/.github/workflows/create_whitelist.sh)" | |
id: whitelist | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake (linux) | |
if: matrix.os == 'ubuntu-latest' | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
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=${{ 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: | | |
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 | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
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 ${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST | |
ctest -C $${{ matrix.BUILD_TYPE }} --output-on-failure -E $TESTBLACKLIST | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
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' | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
git clone --depth 1 https://github.com/DGtal-team/DGtalTools.git | |
cd DGtalTools | |
mkdir buildDGtalTools | |
cd buildDGtalTools | |
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@v4 | |
- name: Set up | |
run: | | |
sudo apt-get update | |
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-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 graphviz texlive doxygen | |
- name: Building pages | |
run: | | |
mkdir build | |
cd build | |
cmake .. $CONFIG_GLOBAL $CONFIG_LINUX -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=1000 | |
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 |