From 14589a6009b76c4ea08e05a7c2a4ec3aaf2c93c7 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 12 Apr 2024 15:16:23 +0200 Subject: [PATCH 1/3] Fix ci coverage --- .github/workflows/coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 677761b0fa..f88b6dec4a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -76,8 +76,9 @@ jobs: --output-file visp-coverage.cleaned - name: Upload report to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./build/visp-coverage.cleaned fail_ci_if_error: true verbose: true From b53652ed4fe6dc653ecde81f07b3bffcf1e1c415 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 12 Apr 2024 16:43:00 +0200 Subject: [PATCH 2/3] Upgrade appveyor ci with Visual Studio 2022 image --- appveyor.yml | 76 +++++++++------------------------------------------- 1 file changed, 13 insertions(+), 63 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 715925da71..414e713f88 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ version: "3.6.1-{build}" image: - - Visual Studio 2017 + - Visual Studio 2022 # to add several platforms to build matrix platform: @@ -12,13 +12,6 @@ configuration: - Release environment: - VISP_OPENCV_MINGW_FILE: opencv-4.1.0-MinGW-build-package.7z - VISP_OPENCV_MINGW_DIR: opencv-4.1.0-MinGW-build-package - VISP_OPENCV_MINGW_PKG: https://github.com/lagadic/visp-dependencies/blob/master/opencv-4.1.0-MinGW-x86_64-7.3.0-release-posix-seh-rt_v5-rev0-build-package.7z?raw=true - VISP_OPENCV_VS2015_2017_FILE: opencv-4.1.0-vc14_vc15.exe - VISP_OPENCV_VS2015_2017_DIR: opencv-4.1.0-vc14_vc15 - VISP_OPENCV_VS2015_2017_PKG: https://github.com/opencv/opencv/releases/download/4.1.0/opencv-4.1.0-vc14_vc15.exe - matrix: - TARGET: mingw # - TARGET: msvc @@ -45,67 +38,27 @@ install: # visp_sample - git clone --depth 1 https://github.com/lagadic/visp_sample - # opencv - - ps: >- - if ((${env:TARGET} -imatch "msvc" -or ${env:TARGET} -imatch "visp_sample") -and !(Test-Path ${env:VISP_OPENCV_VS2015_2017_FILE})) { - echo "Downloading OpenCV Visual Studio from ${env:VISP_OPENCV_VS2015_2017_PKG} ..." - appveyor DownloadFile "${env:VISP_OPENCV_VS2015_2017_PKG}" -FileName ${env:VISP_OPENCV_VS2015_2017_FILE} -Timeout 1200000 - } - - - ps: >- - if (${env:TARGET} -imatch "msvc" -or ${env:TARGET} -imatch "visp_sample") { - echo "Extracting OpenCV Visual Studio to C:\projects\deps ..." - 7z x ${env:VISP_OPENCV_VS2015_2017_FILE} -y "-o${env:VISP_OPENCV_VS2015_2017_DIR}" - } - - - ps: >- - if (${env:TARGET} -imatch "mingw" -and !(Test-Path ${env:VISP_OPENCV_MINGW_FILE})) { - echo "Downloading OpenCV MinGW from ${env:VISP_OPENCV_MINGW_PKG} ..." - appveyor DownloadFile "${env:VISP_OPENCV_MINGW_PKG}" -FileName ${env:VISP_OPENCV_MINGW_FILE} -Timeout 1200000 - } - - - ps: >- - if (${env:TARGET} -imatch "mingw") { - echo "Extracting OpenCV MinGW to C:\projects\deps ..." - 7z x ${env:VISP_OPENCV_MINGW_FILE} -y "-o${env:VISP_OPENCV_MINGW_DIR}" - } - -cache: - - opencv-4.1.0-MinGW-build-package.7z -> appveyor.yml - - opencv-4.1.0-vc14_vc15.exe -> appveyor.yml - # visp clone directory clone_folder: C:\projects\visp\visp 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 "%TARGET%"=="mingw" set MINGW_DIR=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64 + # Use MinGW-w64 in C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin + - if "%TARGET%"=="mingw" set MINGW_DIR=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64 # Workaround for CMake not wanting sh.exe on PATH for MinGW - if "%TARGET%"=="mingw" set PATH=%PATH:C:\Program Files\Git\usr\bin;=% - - if "%TARGET%"=="mingw" set PATH=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH% - - if "%TARGET%"=="mingw" dir C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin + - if "%TARGET%"=="mingw" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH% + - if "%TARGET%"=="mingw" dir C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin - if "%TARGET%"=="mingw" mingw32-make --version # Setup path for ViSP - - if "%TARGET%"=="msvc" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc15\bin + - if "%TARGET%"=="msvc" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc17\bin - if "%TARGET%"=="msvc" set PATH=%VISP_DLL_DIR%;%PATH% - if "%TARGET%"=="mingw" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\mingw\bin - if "%TARGET%"=="mingw" set PATH=%VISP_DLL_DIR%;%PATH% - - if "%TARGET%"=="visp_sample" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc15\bin + - if "%TARGET%"=="visp_sample" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc17\bin - if "%TARGET%"=="visp_sample" set PATH=%VISP_DLL_DIR%;%PATH% - # Setup path for OpenCV - - if "%TARGET%"=="msvc" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_VS2015_2017_DIR%\opencv\build - - if "%TARGET%"=="msvc" set OpenCV_DLL_DIR=%OpenCV_DIR%\%platform%\vc15\bin - - if "%TARGET%"=="msvc" set PATH=%OPENCV_DLL_DIR%;%PATH% - - if "%TARGET%"=="mingw" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_MINGW_DIR%\install - - if "%TARGET%"=="mingw" set OpenCV_DLL_DIR=%OpenCV_DIR%\x64\mingw\bin - - if "%TARGET%"=="mingw" set PATH=%OPENCV_DLL_DIR%;%PATH% - - if "%TARGET%"=="visp_sample" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_VS2015_2017_DIR%\opencv\build - - if "%TARGET%"=="visp_sample" set OpenCV_DLL_DIR=%OpenCV_DIR%\%platform%\vc15\bin - - if "%TARGET%"=="visp_sample" set PATH=%OPENCV_DLL_DIR%;%PATH% - build_script: - echo %PATH% - dir C:\projects\deps @@ -114,31 +67,28 @@ build_script: - cd C:\projects\visp\build # mingw case - - if "%TARGET%"=="mingw" dir %OpenCV_DLL_DIR% - if "%TARGET%"=="mingw" cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=%configuration% ..\visp - if "%TARGET%"=="mingw" cmake --build . --config %configuration% --target install -- -j2 - if "%TARGET%"=="mingw" dir C:\projects\visp\build\install - if "%TARGET%"=="mingw" dir %VISP_DLL_DIR% - - if "%TARGET%"=="mingw" ctest --output-on-failure -V + - if "%TARGET%"=="mingw" ctest --output-on-failure -j2 # msvc case - - if "%TARGET%"=="msvc" dir %OpenCV_DLL_DIR% - - if "%TARGET%"=="msvc" cmake -G "Visual Studio 15 2017" -A %platform% ..\visp + - if "%TARGET%"=="msvc" cmake -G "Visual Studio 17 2022" -A %platform% ..\visp - if "%TARGET%"=="msvc" cmake --build . --config %configuration% --target install -- /m:2 - if "%TARGET%"=="msvc" dir C:\projects\visp\build\install - if "%TARGET%"=="msvc" dir %VISP_DLL_DIR% - - if "%TARGET%"=="msvc" ctest --output-on-failure -V + - if "%TARGET%"=="msvc" ctest --output-on-failure -j2 # uwp case - - if "%TARGET%"=="uwp" cmake -G "Visual Studio 15 2017" -A %platform% -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp + - if "%TARGET%"=="uwp" cmake -G "Visual Studio 17 2022" -A %platform% -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp - if "%TARGET%"=="uwp" cmake --build . --config %configuration% -- /m:2 # visp_sample case: ViSP as 3rdparty with cmake - - if "%TARGET%"=="visp_sample" dir %OpenCV_DLL_DIR% - - if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 15 2017" -A %platform% -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp + - if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 17 2022" -A %platform% -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp - if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% --target install -- /m:2 - if "%TARGET%"=="visp_sample" cd C:\projects\deps\visp_sample - if "%TARGET%"=="visp_sample" mkdir build - if "%TARGET%"=="visp_sample" cd build - - if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 15 2017" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install + - if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 17 2022" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install - if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% -- /m:2 From 16758408ff526f56870fd6947a5f834b660d9063 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Sat, 13 Apr 2024 08:27:17 +0200 Subject: [PATCH 3/3] Attempt to fix CODECOV_TOKEN usage --- .github/workflows/coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f88b6dec4a..f7a0705e4c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -77,8 +77,9 @@ jobs: - name: Upload report to Codecov uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - token: ${{ secrets.CODECOV_TOKEN }} files: ./build/visp-coverage.cleaned fail_ci_if_error: true verbose: true