From ab81b36929793c3ca4d89c1349423a7954569997 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Sat, 21 Oct 2023 12:02:59 +0200 Subject: [PATCH 1/8] github action windows --- .github/workflows/build.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6511a6..91228ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ env: BUILD_TYPE: Release CONFIG_GLOBAL: CONFIG_LINUX: + CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true + jobs: build: @@ -18,7 +20,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest,windows-latest] steps: @@ -36,6 +38,23 @@ jobs: - name: Install macOS deps 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 @@ -65,7 +84,11 @@ 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: 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/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/DGtalTools/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=Release -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" - name: Configure CMake (linux) if: matrix.os == 'ubuntu-latest' shell: bash @@ -82,6 +105,6 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash # Execute the build. You can specify a specific target with "--target " - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config Release From 8b9d4951d0e435f97d1f2f73acfbbea58564d5f0 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Sat, 21 Oct 2023 12:04:55 +0200 Subject: [PATCH 2/8] path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91228ae..10b7210 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,7 +88,7 @@ jobs: if: matrix.os == 'windows-latest' shell: bash working-directory: "${{runner.workspace}}/build" - run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/DGtalTools/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/DGtalTools/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=Release -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}" + run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/CDVAM/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/CDVAM/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=Release - name: Configure CMake (linux) if: matrix.os == 'ubuntu-latest' shell: bash From 5960292a9d16540fe30dc23968101ab8f4f1bf9c Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Sat, 21 Oct 2023 12:55:33 +0200 Subject: [PATCH 3/8] build DGtal --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10b7210..a7f7cca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,6 +84,19 @@ 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=Release $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false + cmake .. -DCMAKE_BUILD_TYPE=Release $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false + cmake --build . --config Release --parallel 3 + - name: Configure CMake (windows) if: matrix.os == 'windows-latest' shell: bash From 284d2929b89e2f844b425afc4d56945c02115402 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Fri, 24 Nov 2023 11:48:16 +0100 Subject: [PATCH 4/8] reload githubaction --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7f7cca..3d27271 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,12 +38,14 @@ jobs: - name: Install macOS deps 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 From aa7ddfc90574c48292dd41b20854e3d20ab2c1b5 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Fri, 24 Nov 2023 12:17:08 +0100 Subject: [PATCH 5/8] try fix githubaction --- .github/workflows/build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d27271..aeae252 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ env: BUILD_TYPE: Release CONFIG_GLOBAL: CONFIG_LINUX: - 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 -DENABLE_CONAN=true jobs: @@ -95,15 +95,18 @@ jobs: cd DGtal mkdir buildDGtal cd buildDGtal - echo cmake .. -DCMAKE_BUILD_TYPE=Release $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false - cmake .. -DCMAKE_BUILD_TYPE=Release $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false + 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 (windows) if: matrix.os == 'windows-latest' shell: bash working-directory: "${{runner.workspace}}/build" - run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/CDVAM/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/CDVAM/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=Release + run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/CDVAM/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/CDVAM/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + + - name: Configure CMake (linux) if: matrix.os == 'ubuntu-latest' shell: bash From ecad6d7eabb828f5af4c86da3370a904be55e1e5 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Fri, 24 Nov 2023 13:29:27 +0100 Subject: [PATCH 6/8] try fix githubaction --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aeae252..0b086c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: if: matrix.os == 'windows-latest' shell: bash working-directory: "${{runner.workspace}}/build" - run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/CDVAM/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/CDVAM/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:\a\CDCVAM\build\DGtal\buildDGtal" -DDGtal_DIR="D:\a\CDCVAM\build\DGtal\buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE From 1497c228eb98a06f410d7c05f340ca253cf04971 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Fri, 24 Nov 2023 13:43:32 +0100 Subject: [PATCH 7/8] try fix githubaction --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b086c9..2e14f13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,9 @@ jobs: if: matrix.os == 'windows-latest' shell: bash working-directory: "${{runner.workspace}}/build" - run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:\a\CDCVAM\build\DGtal\buildDGtal" -DDGtal_DIR="D:\a\CDCVAM\build\DGtal\buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: | + ls -la D:/a/CDCVAM/build/DGtal/buildDGtal + cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/CDCVAM/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/CDCVAM/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE From 2333d66b7563cf8bc06ea9a0224ad3aa07c641a9 Mon Sep 17 00:00:00 2001 From: Bertrand Kerautret Date: Fri, 24 Nov 2023 14:26:21 +0100 Subject: [PATCH 8/8] changelog and readme --- Changelog.md | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 87f00d6..8ea9d4a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,7 @@ # Version 1.2 + - Add windows compilation in github action + (Bertrand Kerautret [#33](https://github.com/kerautret/CDCVAM/pull/33)) - Add confidence score extraction from origins. (Bertrand Kerautret [#31](https://github.com/kerautret/CDCVAM/pull/31)) - New tools ExtractAccoOrigins and fix duplicated accumulations values diff --git a/README.md b/README.md index 79f3259..da7645d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Bertrand Kerautret, Adrien Krähenbühl, Isabelle Debled-Rennesson and Jacques-O Presented at ICPR 2016. -Linux/MacOs build: [![CI (linux/macOS)](https://github.com/kerautret/CDCVAM/actions/workflows/build.yml/badge.svg)](https://github.com/kerautret/CDCVAM/actions/workflows/build.yml) +Linux/MacOs/Windows build: [![CI (linux/macOS)](https://github.com/kerautret/CDCVAM/actions/workflows/build.yml/badge.svg)](https://github.com/kerautret/CDCVAM/actions/workflows/build.yml) ## Dependencies