From 0bba18535487767b699841ee3a95b90e1b079da1 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 11 Jun 2024 22:26:25 +0200 Subject: [PATCH] [ci] test win no cuda --- .github/workflows/continuous-integration.yml | 95 ++++++++++++++++++-- 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 5ccc5ca2..b2162498 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -2,14 +2,14 @@ name: Continuous Integration on: push: - branches: - - master - - develop +# branches: +# - master +# - develop # Skip jobs when only documentation files are changed - paths-ignore: - - '**.md' - - '**.rst' - - 'docs/**' +# paths-ignore: +# - '**.md' +# - '**.rst' +# - 'docs/**' pull_request: paths-ignore: - '**.md' @@ -17,7 +17,7 @@ on: - 'docs/**' jobs: - build: + build-linux: runs-on: ubuntu-latest strategy: matrix: @@ -68,3 +68,82 @@ jobs: -DBUILD_SHARED_LIBS:BOOL=ON \ -DCMAKE_PREFIX_PATH:PATH="$PWD/../../cctag_install;${DEPS_INSTALL_DIR}" make -j8 + + build_windows: + runs-on: windows-latest + strategy: + matrix: + config: [ Debug, Release ] + env: + buildDir: '${{ github.workspace }}\build\' + vcpkgDir: '${{ github.workspace }}\e\vcpkg' + # commit for version 2023.11.20 + COMMIT_ID: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + + - name: Install latest CMake. + uses: lukka/get-cmake@latest + + # Restore from cache the previously built ports. If a "cache miss" occurs, then vcpkg is bootstrapped. Since a the vcpkg.json is being used later on to install the packages when run-cmake runs, no packages are installed at this time and the input 'setupOnly:true' is mandatory. + - name: vcpkg - Setup dependencies + uses: lukka/run-vcpkg@v7 + with: + # Just install vcpkg for now, do not install any ports in this step yet. + setupOnly: false + # Location of the vcpkg submodule in the Git repository. + vcpkgDirectory: ${{ env.vcpkgDir }} + vcpkgGitCommitId: ${{ env.COMMIT_ID }} + vcpkgArguments: > + boost-accumulators + boost-algorithm boost-container + boost-date-time + boost-exception + boost-filesystem + boost-iterator + boost-lexical-cast + boost-math + boost-mpl + boost-multi-array + boost-ptr-container + boost-program-options + boost-serialization + boost-spirit + boost-static-assert + boost-stacktrace + boost-test + boost-thread + boost-throw-exception + boost-timer + boost-type-traits + boost-unordered + opencv + tbb + eigen3 + vcpkgTriplet: x64-windows + # doNotCache: true + # This is used to unbreak cached artifacts if for some reason dependencies fail to build, + # the action does not notice it and saves broken artifacts. + appendedCacheKey: cache005 + + - name: vcpkg - Display installed packages + run: + ${{ env.vcpkgDir }}\vcpkg.exe list + + - name: Build + uses: lukka/run-cmake@v3 + with: + cmakeListsOrSettingsJson: CMakeListsTxtAdvanced + cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' + buildDirectory: ${{ env.buildDir }} +# cmakeGenerator: VS16Win64 + cmakeAppendedArgs: -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DVCPKG_TARGET_TRIPLET=x64-windows -A x64 -T host=x64 -DCCTAG_WITH_CUDA:BOOL=ON + # This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg. + cmakeBuildType: ${{ matrix.config }} + useVcpkgToolchainFile: true + buildWithCMake: true + buildWithCMakeArgs: -j1 --config ${{ matrix.config }} \ No newline at end of file