diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba8e8e7..1add0a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ env: CONFIG_GLOBAL: 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_EIGEN=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true CONFIG_MAC: -DWITH_EIGEN=true -DWITH_GMP=tue - + CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true jobs: build: @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest,windows-latest] steps: - uses: actions/checkout@v2 @@ -35,6 +35,24 @@ jobs: if: matrix.os == 'macOS-latest' run: brew install boost ninja eigen gmp + - 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-Release + + - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build @@ -64,6 +82,18 @@ jobs: echo cmake .. $CONFIG_MAC -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja cmake .. $CONFIG_MAC -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja ninja + - name: DGtalBuild (windows) + if: matrix.os == 'windows-latest' + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + git clone --depth 1 https://github.com/DGtal-team/DGtal.git + cd DGtal + mkdir buildDGtal + cd buildDGtal + echo cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false + cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false + cmake --build . --config Release --parallel 3 - name: Configure CMake (linux) if: matrix.os == 'ubuntu-latest' @@ -76,6 +106,11 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build run: cmake $GITHUB_WORKSPACE -DDGtal_DIR=${{runner.workspace}}/build/DGtal/buildDGtal -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL $CONFIG_MAC -G Ninja + - name: Configure CMake (windows) + if: matrix.os == 'windows-latest' + shell: bash + working-directory: "${{runner.workspace}}/build" + run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/DGtalTools-contrib/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/DGtalTools-contrib/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" - name: Build working-directory: ${{runner.workspace}}/build diff --git a/ChangeLog.md b/ChangeLog.md index f9a510d..0e185e1 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,7 @@ # DGtalTools-contrib 1.4 (beta) +- *global* + - Continuous integration on windows does not use Appveyopr anymore but Github Actions. + (Bertrand Kerautret [#77](https://github.com/DGtal-team/DGtalTools-contrib/pull/77)) - *Geometry2d* - rotNmap: new tools to apply a rotation in the input normal map (it diff --git a/README.md b/README.md index 0b88dd4..ce9b6ae 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ More Information * Release 0.9.3 DOI [![DOI](https://zenodo.org/badge/43562168.svg)](https://zenodo.org/badge/latestdoi/43562168) * Release 0.9.2 DOI [![DOI](https://zenodo.org/badge/4888/DGtal-team/DGtalTools-contrib.svg)](https://zenodo.org/badge/latestdoi/4888/DGtal-team/DGtalTools-contrib) * Release 0.9.1 DOI [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.45131.svg)](http://dx.doi.org/10.5281/zenodo.45131) -* Continuous Integration (Linux/MacOS) ![Build status](https://github.com/DGtal-team/DGtalTools-contrib/actions/workflows/build.yml/badge.svg) -* Continuous Integration (Windows): [![Build status](https://ci.appveyor.com/api/projects/status/sq9w7r1xs8078g7j?svg=true)](https://ci.appveyor.com/project/kerautret/dgtaltools-contrib) +* Continuous Integration (Linux/MacOS/Windows) ![Build status](https://github.com/DGtal-team/DGtalTools-contrib/actions/workflows/build.yml/badge.svg) + Organisation ============ diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 79dc128..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,84 +0,0 @@ -version: 1.0.{build} - -environment: - BOOST_ROOT: "C:\\Libraries\\boost_1_63_0" - matrix: - - VS_GEN: Visual Studio 14 2015 - CONFIG: RelWithDebInfo - B_NAME: Win32 - BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_63_0\\lib32-msvc-14.0" - CONFIGQGL: Release - QTDIR: "C:\\Qt\\5.6.3\\msvc2015" -# - VS_GEN: Visual Studio 14 2015 Win64 -# CONFIG: Release -# B_NAME: Win64 -# BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_59_0\\lib64-msvc-14.0" - - -matrix: - fast_finish: true - -# Operating system (build VM template) -os: Visual Studio 2015 -branches: - except: - - coverity_scan -skip_tags: true -#platform: ARM -# - x86 -# - x64 -# - ARM - -# scripts that are called at very beginning, before repo cloning -init: - # Print environment info - - set - - msbuild /version - - cmake --version - - set PATH=%QTDIR%\bin;%PATH% - -# check nmake ? -#- call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 -#- cl - - - -# scripts that run after cloning repository -install: - -before_build: - # install zlib - - cmd: mkdir c:\zlib - - appveyor DownloadFile "https://github.com/madler/zlib/archive/v1.2.9.zip" -FileName zlib.zip - - 7z x zlib.zip -oC:\zlib - - cmd: cd C:\zlib - - cmd: mkdir C:\zlib-install - - cmd: mkdir C:\zlib-build - - cmd: cd C:\zlib-build - - cmd: dir C:\zlib - - cmake -G"%VS_GEN%" -DCMAKE_BUILD_TYPE=%CONFIG% -DCMAKE_INSTALL_PREFIX:PATH=c:\zlib-install C:\zlib\zlib-1.2.9 - - msbuild zlib.sln /m - - cmd: msbuild INSTALL.vcxproj - - - git clone https://github.com/kerautret/libQGLViewer.git C:\projects\libqglviewer - - cd C:\projects\libqglviewer\QGLViewer - - qmake -t vclib QGLViewer.pro -spec win32-msvc2013 -o qglviewer.vcxproj - - msbuild /m /p:Configuration=%CONFIGQGL% /p:Platform=%B_NAME% qglviewer.vcxproj - - git clone -q --branch=master https://github.com/DGtal-team/DGtal.git C:\projects\dgtal - - cd C:\projects\dgtal - - cmake -Wno-dev -G"%VS_GEN%" -DCMAKE_BUILD_TYPE=%CONFIG% -DWITH_QGLVIEWER:BOOL=ON -DWITH_QT5:BOOL=ON -DQGLVIEWER_INCLUDE_DIR=C:\projects\libqglviewer -DQGLVIEWER_LIBRARIES=C:\projects\libqglviewer\QGLViewer\QGLViewer2.lib -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=FALSE -DZLIB_LIBRARY=c:/zlib-install/lib/zlibd.lib -DZLIB_INCLUDE_DIR=c:/zlib-install/include/ -DBOOST_ROOT=%BOOST_ROOT% . - - msbuild /m /p:Configuration=%CONFIG% /p:Platform=%B_NAME% DGtal.sln - - cd %APPVEYOR_BUILD_FOLDER% - - cmake -Wno-dev -G"%VS_GEN%" -DCMAKE_BUILD_TYPE=%CONFIG% -DCMAKE_INSTALL_PREFIX:PATH=c:\zlib-install C:\zlib\zlib-1.2.9 -DDGtal_DIR=C:\projects\dgtal . - - -build_script: - - echo %CONFIG% - - msbuild /m /p:Configuration=%CONFIG% /p:Platform=%B_NAME% DGtalTools-contrib.sln - -# - ctest -D ExperimentalStart -C %CONFIG% -# - ctest -D ExperimentalBuild -j2 -C %CONFIG% -# - ctest -D ExperimentalTest -j2 -C %CONFIG% - -test: off -deploy: off \ No newline at end of file diff --git a/visualisation/displaySet2dPts.cpp b/visualisation/displaySet2dPts.cpp index 2122e62..cde69d7 100644 --- a/visualisation/displaySet2dPts.cpp +++ b/visualisation/displaySet2dPts.cpp @@ -159,7 +159,7 @@ int main( int argc, char** argv ) // use max limit of 512 to avoid xfig bug display if (extension == "fig") { - aBoard.setPenColor(hueMap(rand()%(min(setOfPoints.size(),512)))); + aBoard.setPenColor(hueMap(rand()%(min(setOfPoints.size(),512)))); } else {