diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6511a6..2e14f13 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 + 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: @@ -37,6 +39,25 @@ 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 @@ -65,6 +86,28 @@ 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 (windows) + if: matrix.os == 'windows-latest' + shell: bash + working-directory: "${{runner.workspace}}/build" + 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 + + - name: Configure CMake (linux) if: matrix.os == 'ubuntu-latest' @@ -82,6 +125,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 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