From aae0ff8e09136f0fb299534d6690cf9e9f56da99 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Mon, 15 Jul 2024 14:57:50 +0200 Subject: [PATCH] Remove appveyor and introduce github ci for msvc --- .github/workflows/windows-msvc.yaml | 91 +++++++++++++++++++++++++++++ appveyor.yml | 83 -------------------------- 2 files changed, 91 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/windows-msvc.yaml delete mode 100644 appveyor.yml diff --git a/.github/workflows/windows-msvc.yaml b/.github/workflows/windows-msvc.yaml new file mode 100644 index 00000000..f10c61ed --- /dev/null +++ b/.github/workflows/windows-msvc.yaml @@ -0,0 +1,91 @@ +name: Windows - Visual 2019 +on: + pull_request: + types: [opened, reopened, synchronize] + +# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre#comment133398800_72408109 +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + runs-on: ${{ matrix.os }} + defaults: + run: + shell: cmd + strategy: + fail-fast: false + matrix: + name: [windows-latest] + + include: + - name: windows-latest + os: windows-2022 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Display the workspace path + working-directory: ${{ github.workspace }} + run: pwd + + - name: Clone visp + shell: bash + run: | + git clone --depth 1 https://github.com/lagadic/visp ${HOME}/visp + + - name: Clone visp-images + shell: bash + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + + - name: Clone ustk-dataset + shell: bash + run: | + git clone --depth 1 https://github.com/lagadic/ustk-dataset ${HOME}/ustk-dataset + echo "USTK_DATASET_PATH=$HOME/ustk-dataset" >> $GITHUB_ENV + echo ${USTK_DATASET_PATH} + + - name: Configure ViSP + working-directory: ${{ github.workspace }} + run: | + set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }} + set USTK_DATASET_PATH=${{ env.USTK_DATASET_PATH }} + echo "VISP_INPUT_IMAGE_PATH: " + echo %VISP_INPUT_IMAGE_PATH% + echo "USTK_DATASET_PATH: " + echo %USTK_DATASET_PATH% + mkdir build + cd build + cmake ${HOME}/visp -G "Visual Studio 17 2022" -A "x64" -DVISP_CONTRIB_MODULES_PATH=.. -DBUILD_MODULE_visp_ar=OFF -DBUILD_MODULE_visp_blob=OFF -DBUILD_MODULE_visp_detection=OFF -DBUILD_MODULE_visp_klt=OFF -DBUILD_MODULE_visp_mbt=OFF -DBUILD_MODULE_visp_me=OFF -DBUILD_MODULE_visp_tt=OFF -DBUILD_MODULE_visp_tt_mi=OFF -DBUILD_MODULE_visp_vision=OFF -DBUILD_MODULE_visp_visual_features=OFF -DBUILD_MODULE_visp_vs=OFF + type ViSP-third-party.txt + + - name: Build UsTK + working-directory: ${{ github.workspace }}\build + run: | + cmake --build . --config Release + + - name: Install UsTK + working-directory: ${{ github.workspace }}\build + run: | + cmake --build . --config Release --target install + + - name: Check installation folder + working-directory: ${{ github.workspace }}\build + run: | + dir ${{ github.workspace }}\build\install\x64\vc17\bin + + - name: Test ViSP + working-directory: ${{ github.workspace }}\build + run: | + set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }} + echo "VISP_INPUT_IMAGE_PATH: " + echo %VISP_INPUT_IMAGE_PATH% + set PATH=%PATH%;${{ github.workspace }}\build\install\x64\vc17\bin + echo "PATH: " + echo %PATH% + ctest --output-on-failure -C Release -V diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ee76a62e..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,83 +0,0 @@ -# Specify version format -version: "3.4.1-{build}" - -os: Visual Studio 2015 - -# to add several platforms to build matrix -platform: - - x64 - -configuration: - - Release - -environment: - - matrix: - - CMAKE_GENERATOR: MinGW Makefiles - BUILD_NAME: mingw - - - CMAKE_GENERATOR: Visual Studio 14 2015 Win64 - BUILD_NAME: vs2015 - - -# Scripts that are called at very beginning, before repo cloning -init: - - cmake --version - - msbuild /version - -install: - # Create temp dir to collect test outputs - - md C:\temp - - # All external dependencies are installed in C:\projects\deps - - mkdir C:\projects\deps - - cd C:\projects\deps - - # visp-images - - git clone --depth 1 https://github.com/lagadic/ViSP-images C:\projects\deps\ViSP-images - - set VISP_INPUT_IMAGE_PATH=C:\projects\deps - - # ustk-dataset - - git clone --depth 1 https://github.com/lagadic/ustk-dataset C:\projects\deps\ustk-dataset - - set USTK_DATASET_PATH=C:\projects\deps\ustk-dataset - - # visp - #- git clone https://github.com/lagadic/visp C:\projects\visp\visp - - git clone --branch feat_update_various https://github.com/fspindle/visp C:\projects\visp\visp - - set VISP_SRC_DIR=C:\projects\visp\visp - -# ustk clone directory -clone_folder: C:\projects\ustk\ustk - -before_build: - # Setup path for mingw - # Use MinGW-w64 in C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set MINGW_DIR=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64 - # Workaround for CMake not wanting sh.exe on PATH for MinGW - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set PATH=%PATH:C:\Program Files\Git\usr\bin;=% - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set PATH=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH% - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" dir C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" mingw32-make --version - - # Setup ViSP - - if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc14\bin - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\mingw\bin - - set PATH=%VISP_DLL_DIR%;%PATH% - # Issue with pthreads threading on MinGW AppVeyor - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set APPVEYOR_THREADING=false - -build_script: - - echo %PATH% - - echo %APPVEYOR_PROJECT_ID% - - dir C:\projects\deps - - dir C:\tools - - md C:\projects\visp\build - - cd C:\projects\visp\build - - cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%configuration% -DVISP_CONTRIB_MODULES_PATH=..\..\ustk\ustk -DBUILD_MODULE_visp_ar=OFF -DBUILD_MODULE_visp_blob=OFF -DBUILD_MODULE_visp_detection=OFF -DBUILD_MODULE_visp_klt=OFF -DBUILD_MODULE_visp_mbt=OFF -DBUILD_MODULE_visp_me=OFF -DBUILD_MODULE_visp_tt=OFF -DBUILD_MODULE_visp_tt_mi=OFF -DBUILD_MODULE_visp_vision=OFF -DBUILD_MODULE_visp_visual_features=OFF -DBUILD_MODULE_visp_vs=OFF ..\visp - - if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" cmake --build . --config %configuration% --target install -- /m:2 - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" cmake --build . --config %configuration% --target install -- -j2 - - dir C:\projects\visp\build\install - - dir %VISP_DLL_DIR% - - if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" ctest - # Issue with exception on MinGW AppVeyor - - if "%CMAKE_GENERATOR%"=="MinGW Makefiles" ctest -E testMatrixException