From f335797ea3a644dc9d4f64d948adeee657fc3299 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Tue, 5 Mar 2024 15:33:37 +0100 Subject: [PATCH 01/25] init conda ci action for ubuntu --- .github/workflows/conda/environment_linux.yml | 15 ++++ .github/workflows/macos-linux-conda.yml | 72 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 .github/workflows/conda/environment_linux.yml create mode 100644 .github/workflows/macos-linux-conda.yml diff --git a/.github/workflows/conda/environment_linux.yml b/.github/workflows/conda/environment_linux.yml new file mode 100644 index 0000000000..d7be46d48e --- /dev/null +++ b/.github/workflows/conda/environment_linux.yml @@ -0,0 +1,15 @@ +name: visp +channels: + - conda-forge +dependencies: + - xorg-libx11 + - xorg-libxfixes + - libxml2 + - libdc1394 >=2.2.6 + - librealsense + - libgomp + - libopencv + - eigen + - libjpeg-turbo + - libpng + - mkl-devel \ No newline at end of file diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml new file mode 100644 index 0000000000..a0995c3c53 --- /dev/null +++ b/.github/workflows/macos-linux-conda.yml @@ -0,0 +1,72 @@ +name: Conda-CI + +on: [push,pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + visp-conda: + name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + build_type: [Release] + python-version: ["3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: visp + auto-update-conda: true + environment-file: .github/workflows/conda/environment_linux.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false + + - name: Build visp + shell: bash -el {0} + run: | + conda list + echo $CONDA_PREFIX + + mkdir build + cd build + + cmake .. \ + -G "Ninja" \ + -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ + -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ + -DPYTHON_EXECUTABLE=$(which python3) \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + cmake --build . -j2 + ctest --output-on-failure + cmake --install . + + - name: Uninstall visp + shell: bash -el {0} + run: | + cd build + cmake --build . --target uninstall + + + check: + if: always() + name: check-macos-linux-conda + + needs: + - visp-conda + + runs-on: Ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} \ No newline at end of file From b2e440b9b3fb0e25232fb67a645e95871b37d22f Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Tue, 5 Mar 2024 15:41:02 +0100 Subject: [PATCH 02/25] add missing dependencies for linux --- .github/workflows/conda/environment_linux.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/conda/environment_linux.yml b/.github/workflows/conda/environment_linux.yml index d7be46d48e..5aad8b3e9a 100644 --- a/.github/workflows/conda/environment_linux.yml +++ b/.github/workflows/conda/environment_linux.yml @@ -2,6 +2,9 @@ name: visp channels: - conda-forge dependencies: + - cxx-compiler + - cmake + - ninja - xorg-libx11 - xorg-libxfixes - libxml2 From d6fecf22bbaa51858bcee66c663d02cf5df14ac3 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Tue, 5 Mar 2024 16:13:47 +0100 Subject: [PATCH 03/25] build python bindings on linux --- .github/workflows/conda/environment_linux.yml | 3 ++- .github/workflows/macos-linux-conda.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda/environment_linux.yml b/.github/workflows/conda/environment_linux.yml index 5aad8b3e9a..fa1d6d81d3 100644 --- a/.github/workflows/conda/environment_linux.yml +++ b/.github/workflows/conda/environment_linux.yml @@ -15,4 +15,5 @@ dependencies: - eigen - libjpeg-turbo - libpng - - mkl-devel \ No newline at end of file + - mkl-devel + - pybind11 \ No newline at end of file diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index a0995c3c53..5471c10c47 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -45,7 +45,7 @@ jobs: -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DPYTHON_EXECUTABLE=$(which python3) \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - cmake --build . -j2 + cmake --build . --target visp_python_bindings -j2 ctest --output-on-failure cmake --install . From 67d0d6b87bc4df99adf29eec60cb16d3bd70c787 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Tue, 5 Mar 2024 17:49:54 +0100 Subject: [PATCH 04/25] add macos build --- .github/workflows/conda/environment_macos.yml | 19 +++++++++++++++ .github/workflows/macos-linux-conda.yml | 23 ++++++++++--------- 2 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/conda/environment_macos.yml diff --git a/.github/workflows/conda/environment_macos.yml b/.github/workflows/conda/environment_macos.yml new file mode 100644 index 0000000000..e0c9093308 --- /dev/null +++ b/.github/workflows/conda/environment_macos.yml @@ -0,0 +1,19 @@ +name: visp +channels: + - conda-forge +dependencies: + - cxx-compiler + - cmake + - ninja + - xorg-libx11 + - xorg-libxfixes + - libxml2 + - libdc1394 >=2.2.6 + - librealsense + - libopencv + - eigen + - libjpeg-turbo + - libpng + - libopenblas + - llvm-openmp + - pybind11 \ No newline at end of file diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 5471c10c47..809bbf5611 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest"] + os: ["ubuntu-latest", "macos-latest"] build_type: [Release] python-version: ["3.11", "3.12"] @@ -23,6 +23,7 @@ jobs: submodules: recursive - uses: conda-incubator/setup-miniconda@v3 + if: startsWith(matrix.os,'ubuntu') == true with: activate-environment: visp auto-update-conda: true @@ -30,7 +31,16 @@ jobs: python-version: ${{ matrix.python-version }} auto-activate-base: false - - name: Build visp + - uses: conda-incubator/setup-miniconda@v3 + if: startsWith(matrix.os,'macos') == true + with: + activate-environment: visp + auto-update-conda: true + environment-file: .github/workflows/conda/environment_macos.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false + + - name: Build visp python bindings shell: bash -el {0} run: | conda list @@ -46,15 +56,6 @@ jobs: -DPYTHON_EXECUTABLE=$(which python3) \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} cmake --build . --target visp_python_bindings -j2 - ctest --output-on-failure - cmake --install . - - - name: Uninstall visp - shell: bash -el {0} - run: | - cd build - cmake --build . --target uninstall - check: if: always() From 0e557aeda87ebd883dc09bb7770bc9f1d742639f Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Wed, 6 Mar 2024 14:10:53 +0100 Subject: [PATCH 05/25] do not parallelize make --- .github/workflows/macos-linux-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 809bbf5611..5155a9701b 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -55,7 +55,7 @@ jobs: -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DPYTHON_EXECUTABLE=$(which python3) \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - cmake --build . --target visp_python_bindings -j2 + cmake --build . --target visp_python_bindings check: if: always() From 81c5b729dad8643e390cd3dc237aefe12601beea Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Wed, 6 Mar 2024 16:18:27 +0100 Subject: [PATCH 06/25] discard failing assert on header include dir check consistency due to invalid use of vpConfig.h and visp_modules.h --- modules/python/generator/visp_python_bindgen/submodule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/python/generator/visp_python_bindgen/submodule.py b/modules/python/generator/visp_python_bindgen/submodule.py index 7b9cefc0ce..a998e0cd18 100644 --- a/modules/python/generator/visp_python_bindgen/submodule.py +++ b/modules/python/generator/visp_python_bindgen/submodule.py @@ -288,7 +288,10 @@ def get_submodules(config_path: Path, generate_path: Path) -> List[Submodule]: # The headers are already filtered: they should all come from the ViSP source folder (no vpConfig, etc.) include_dir = headers[0].parent hh = "\n".join(map(lambda s: str(s), headers)) - assert all(map(lambda header_path: header_path.parent == include_dir, headers)), f'Found headers in different directory, this case is not yet handled. Headers = {hh}' + + # TODO: this fails with include/visp3/core/vpConfig.h and include/visp3/visp_modules.h which are added by core module + # but should be excluded from generation + #assert all(map(lambda header_path: header_path.parent == include_dir, headers)), f'Found headers in different directory, this case is not yet handled. Headers = {hh}' submodule = Submodule(module_data.name, include_dir, config_path, generate_path / f'{module_data.name}.cpp') result[module_data.name] = submodule From 61b34f6837bbd651d7e06d81ddbb72ed39beb556 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Wed, 6 Mar 2024 17:08:54 +0100 Subject: [PATCH 07/25] add windows conda ci --- .../workflows/conda/environment_windows.yml | 17 ++++ .github/workflows/macos-linux-conda.yml | 22 +++-- .github/workflows/windows-conda.yml | 83 +++++++++++++++++++ 3 files changed, 116 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/conda/environment_windows.yml create mode 100644 .github/workflows/windows-conda.yml diff --git a/.github/workflows/conda/environment_windows.yml b/.github/workflows/conda/environment_windows.yml new file mode 100644 index 0000000000..03836476ca --- /dev/null +++ b/.github/workflows/conda/environment_windows.yml @@ -0,0 +1,17 @@ +name: visp +channels: + - conda-forge +dependencies: + - cxx-compiler + - cmake + - clang + - ninja + - llvm-openmp + - openmp + - pthreads-win32 + - libopencv + - eigen + - libjpeg-turbo + - libpng + - mkl-devel + - pybind11 diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 5155a9701b..0b2b1efa27 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -1,4 +1,4 @@ -name: Conda-CI +name: MacOS-Linux-conda-CI on: [push,pull_request] concurrency: @@ -15,7 +15,7 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest"] build_type: [Release] - python-version: ["3.11", "3.12"] + python-version: ["3.12"] steps: - uses: actions/checkout@v4 @@ -40,12 +40,18 @@ jobs: python-version: ${{ matrix.python-version }} auto-activate-base: false - - name: Build visp python bindings + - name: Show conda config shell: bash -el {0} run: | + conda info conda list - echo $CONDA_PREFIX + conda config --show-sources + conda config --show + printenv | sort + - name: Build visp python bindings + shell: bash -el {0} + run: | mkdir build cd build @@ -53,10 +59,14 @@ jobs: -G "Ninja" \ -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ - -DPYTHON_EXECUTABLE=$(which python3) \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + + # Build cmake --build . --target visp_python_bindings + # Install bindings + cmake --build . --target install + check: if: always() name: check-macos-linux-conda @@ -70,4 +80,4 @@ jobs: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 with: - jobs: ${{ toJSON(needs) }} \ No newline at end of file + jobs: ${{ toJSON(needs) }} diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml new file mode 100644 index 0000000000..2c2e64fdf2 --- /dev/null +++ b/.github/workflows/windows-conda.yml @@ -0,0 +1,83 @@ +name: Windows-conda-CI + +on: [push,pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + visp-conda: + name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: ["windows-latest"] + compiler: ["clang-cl"] + build_type: [Release] + python-version: ["3.11"] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: visp + auto-update-conda: true + environment-file: .github/workflows/conda/environment_windows.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false + + - name: Show conda config + shell: cmd /C CALL {0} + run: | + conda info + conda list + conda config --show-sources + conda config --show + + - name: Build visp python bindings + shell: cmd /C CALL {0} + env: + CC: ${{ matrix.compiler }} + CXX: ${{ matrix.compiler }} + run: | + :: start building + call "%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 + if errorlevel 1 exit 1 + + mkdir build + cd build + + cmake .. ^ + -G "Ninja" ^ + -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^ + -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ + -DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + if errorlevel 1 exit 1 + + cmake --build . --target visp_python_bindings + if errorlevel 1 exit 1 + + :: Build and Install + cmake --build . --target install + if errorlevel 1 exit 1 + + check: + if: always() + name: check-windows-conda + + needs: + - visp-conda + + runs-on: Ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} From 4f001d479847cbfed8f180979f373803c78f06a3 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Thu, 7 Mar 2024 10:07:13 +0100 Subject: [PATCH 08/25] add cl compiler for windows --- .github/workflows/windows-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index 2c2e64fdf2..3910ca9370 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: ["windows-latest"] - compiler: ["clang-cl"] + compiler: ["cl", "clang-cl"] build_type: [Release] python-version: ["3.11"] From f171e0c2a20a53ecef29e78bd4c169950b62c998 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Thu, 7 Mar 2024 15:59:18 +0100 Subject: [PATCH 09/25] test if import failure results in job failure for Unix --- .github/workflows/macos-linux-conda.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 0b2b1efa27..4de2e302e5 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -64,8 +64,9 @@ jobs: # Build cmake --build . --target visp_python_bindings - # Install bindings - cmake --build . --target install + # Test Python import + #cd modules/python/bindings + python -c "import visp" check: if: always() From c53ef40b0cf3a83644af0cf574913da80000fef5 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Thu, 7 Mar 2024 15:59:41 +0100 Subject: [PATCH 10/25] add python import visp module test on windows debugging --- .github/workflows/macos-linux-conda.yml | 2 +- .github/workflows/windows-conda.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 4de2e302e5..61896723a9 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -66,7 +66,7 @@ jobs: # Test Python import #cd modules/python/bindings - python -c "import visp" + # python -c "import visp" check: if: always() diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index 3910ca9370..b3c810f14b 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -7,7 +7,7 @@ concurrency: jobs: visp-conda: - name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }} + name: ${{ matrix.os }} ${{ matrix.compiler }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }} runs-on: ${{ matrix.os }} strategy: @@ -60,11 +60,13 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} if errorlevel 1 exit 1 + :: Build bindings cmake --build . --target visp_python_bindings if errorlevel 1 exit 1 - :: Build and Install - cmake --build . --target install + :: Test Python import + cd modules/python/bindings + python -c "import visp" if errorlevel 1 exit 1 check: From 2b69e991cdc6ca1f26cfa208f146c825e9797994 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Thu, 7 Mar 2024 16:36:30 +0100 Subject: [PATCH 11/25] re-enable python import test for module visp --- .github/workflows/macos-linux-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 61896723a9..b0b1c9cb29 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -65,8 +65,8 @@ jobs: cmake --build . --target visp_python_bindings # Test Python import - #cd modules/python/bindings - # python -c "import visp" + cd modules/python/bindings + python -c "import visp" check: if: always() From b5acd5add1c07b3468ba6465606b8d5946e3f506 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Thu, 7 Mar 2024 16:37:14 +0100 Subject: [PATCH 12/25] enable python matrix for linux macos --- .github/workflows/macos-linux-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index b0b1c9cb29..4d796a80b4 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -15,7 +15,7 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest"] build_type: [Release] - python-version: ["3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 From 64c108e3f6d3fd55b5094a438f979b8f41fbe783 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Thu, 7 Mar 2024 16:47:35 +0100 Subject: [PATCH 13/25] enable python matrix for windows --- .github/workflows/windows-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index b3c810f14b..1fcd390d84 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -16,7 +16,7 @@ jobs: os: ["windows-latest"] compiler: ["cl", "clang-cl"] build_type: [Release] - python-version: ["3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 From c1803c09290755fb4c81875a064e10c2e10ab9de Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Mon, 11 Mar 2024 15:02:17 +0100 Subject: [PATCH 14/25] Revert "discard failing assert on header include dir check consistency due to invalid use of vpConfig.h and visp_modules.h" This reverts commit 3614fe5f6feda3a1ce5b180ba55a80d0daba4ffc. --- modules/python/generator/visp_python_bindgen/submodule.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/python/generator/visp_python_bindgen/submodule.py b/modules/python/generator/visp_python_bindgen/submodule.py index a998e0cd18..7b9cefc0ce 100644 --- a/modules/python/generator/visp_python_bindgen/submodule.py +++ b/modules/python/generator/visp_python_bindgen/submodule.py @@ -288,10 +288,7 @@ def get_submodules(config_path: Path, generate_path: Path) -> List[Submodule]: # The headers are already filtered: they should all come from the ViSP source folder (no vpConfig, etc.) include_dir = headers[0].parent hh = "\n".join(map(lambda s: str(s), headers)) - - # TODO: this fails with include/visp3/core/vpConfig.h and include/visp3/visp_modules.h which are added by core module - # but should be excluded from generation - #assert all(map(lambda header_path: header_path.parent == include_dir, headers)), f'Found headers in different directory, this case is not yet handled. Headers = {hh}' + assert all(map(lambda header_path: header_path.parent == include_dir, headers)), f'Found headers in different directory, this case is not yet handled. Headers = {hh}' submodule = Submodule(module_data.name, include_dir, config_path, generate_path / f'{module_data.name}.cpp') result[module_data.name] = submodule From a42b1ca50becfbcb36180a60ef5f2531eabc751c Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Mon, 11 Mar 2024 15:56:56 +0100 Subject: [PATCH 15/25] install bindings on windows --- .github/workflows/windows-conda.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index 1fcd390d84..f15f617e6d 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -57,6 +57,9 @@ jobs: -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ -DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^ + -DBUILD_TESTS=OFF ^ + -DBUILD_EXAMPLES=OFF ^ + -DBUILD_TUTORIALS=OFF ^ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} if errorlevel 1 exit 1 @@ -64,8 +67,10 @@ jobs: cmake --build . --target visp_python_bindings if errorlevel 1 exit 1 + :: Install bindings + cmake --build . --target install + :: Test Python import - cd modules/python/bindings python -c "import visp" if errorlevel 1 exit 1 From 3a0e5a170ed7ae537e84a4f272151bc5c6d118b4 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Mon, 11 Mar 2024 16:38:23 +0100 Subject: [PATCH 16/25] compile & install visp libs first on windows --- .github/workflows/windows-conda.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index f15f617e6d..68199efd35 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -58,18 +58,21 @@ jobs: -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ -DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^ -DBUILD_TESTS=OFF ^ + -DVISP_LIB_INSTALL_PATH="lib" ^ + -DVISP_BIN_INSTALL_PATH="bin" ^ + -DVISP_CONFIG_INSTALL_PATH="cmake" ^ -DBUILD_EXAMPLES=OFF ^ -DBUILD_TUTORIALS=OFF ^ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} if errorlevel 1 exit 1 + :: Build visp libs & install them + cmake --build . --target install + :: Build bindings cmake --build . --target visp_python_bindings if errorlevel 1 exit 1 - :: Install bindings - cmake --build . --target install - :: Test Python import python -c "import visp" if errorlevel 1 exit 1 From 58564a67fbf1a2a44bd9f3a514848b08fd3f7d64 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Mon, 11 Mar 2024 17:50:23 +0100 Subject: [PATCH 17/25] add test target --- .github/workflows/macos-linux-conda.yml | 8 +++++--- .github/workflows/windows-conda.yml | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 4d796a80b4..afa56f0f5d 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -59,14 +59,16 @@ jobs: -G "Ninja" \ -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ + -DBUILD_TESTS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TUTORIALS=OFF \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} # Build cmake --build . --target visp_python_bindings - # Test Python import - cd modules/python/bindings - python -c "import visp" + # Tests + cmake --build . --target visp_python_bindings_test check: if: always() diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index 68199efd35..c28bff108f 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -57,10 +57,10 @@ jobs: -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ -DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^ - -DBUILD_TESTS=OFF ^ -DVISP_LIB_INSTALL_PATH="lib" ^ -DVISP_BIN_INSTALL_PATH="bin" ^ -DVISP_CONFIG_INSTALL_PATH="cmake" ^ + -DBUILD_TESTS=OFF ^ -DBUILD_EXAMPLES=OFF ^ -DBUILD_TUTORIALS=OFF ^ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} @@ -73,8 +73,8 @@ jobs: cmake --build . --target visp_python_bindings if errorlevel 1 exit 1 - :: Test Python import - python -c "import visp" + :: Tests + cmake --build . --target visp_python_bindings_test if errorlevel 1 exit 1 check: From d4a77055ec9da90b4c2bcccd2ea057677c2ae17a Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Wed, 13 Mar 2024 14:59:44 +0100 Subject: [PATCH 18/25] remove use of PYTHON_SITELIB cmake var on windows --- .github/workflows/windows-conda.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index c28bff108f..d464436139 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -56,7 +56,6 @@ jobs: -G "Ninja" ^ -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ - -DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^ -DVISP_LIB_INSTALL_PATH="lib" ^ -DVISP_BIN_INSTALL_PATH="bin" ^ -DVISP_CONFIG_INSTALL_PATH="cmake" ^ From e21ff2e266c1c62d068cb9165826079fb1a574e0 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Fri, 22 Mar 2024 17:28:44 +0100 Subject: [PATCH 19/25] add verbosity on actions --- .github/workflows/macos-linux-conda.yml | 9 ++++++--- .github/workflows/windows-conda.yml | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index afa56f0f5d..812a1cf051 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -18,11 +18,13 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 with: submodules: recursive - - uses: conda-incubator/setup-miniconda@v3 + - name: Install miniconda on ubuntu + uses: conda-incubator/setup-miniconda@v3 if: startsWith(matrix.os,'ubuntu') == true with: activate-environment: visp @@ -31,7 +33,8 @@ jobs: python-version: ${{ matrix.python-version }} auto-activate-base: false - - uses: conda-incubator/setup-miniconda@v3 + - name: Install miniconda on macOS + uses: conda-incubator/setup-miniconda@v3 if: startsWith(matrix.os,'macos') == true with: activate-environment: visp diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index d464436139..410d323c62 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -19,11 +19,13 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 with: submodules: recursive - - uses: conda-incubator/setup-miniconda@v3 + - name: Install miniconda on windows + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: visp auto-update-conda: true From f35db84b5f9249d648069ebbdb427b24e249db40 Mon Sep 17 00:00:00 2001 From: Olivier Roussel Date: Fri, 22 Mar 2024 17:29:05 +0100 Subject: [PATCH 20/25] add libegl dependency on linux --- .github/workflows/conda/environment_linux.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda/environment_linux.yml b/.github/workflows/conda/environment_linux.yml index fa1d6d81d3..fe9cde4ecb 100644 --- a/.github/workflows/conda/environment_linux.yml +++ b/.github/workflows/conda/environment_linux.yml @@ -7,6 +7,7 @@ dependencies: - ninja - xorg-libx11 - xorg-libxfixes + - mesa-libegl-cos7-x86_64 - libxml2 - libdc1394 >=2.2.6 - librealsense @@ -16,4 +17,4 @@ dependencies: - libjpeg-turbo - libpng - mkl-devel - - pybind11 \ No newline at end of file + - pybind11 From 9f8a10ef6ba626c65feafb35e44421dfeb2e1843 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 19 Apr 2024 14:10:45 +0200 Subject: [PATCH 21/25] Remove temporary useless ci --- .github/workflows/coverage.yml | 85 ----------- .github/workflows/ios.yml | 43 ------ .github/workflows/macos-ustk.yml | 90 ------------ .github/workflows/macos.yml | 129 ---------------- .github/workflows/other-arch-isolated.yml | 74 ---------- .github/workflows/other-arch.yml | 77 ---------- .github/workflows/ubuntu-3rdparty.yml | 92 ------------ .github/workflows/ubuntu-contrib.yml | 68 --------- .github/workflows/ubuntu-dep-apt.yml | 113 -------------- .github/workflows/ubuntu-dep-src.yml | 171 ---------------------- .github/workflows/ubuntu-isolated.yml | 68 --------- .github/workflows/ubuntu-sanitizers.yml | 93 ------------ .github/workflows/ubuntu-ustk.yml | 90 ------------ .github/workflows/valgrind.yml | 55 ------- .github/workflows/windows-clang.yaml | 84 ----------- .github/workflows/windows-msvc.yaml | 77 ---------- appveyor.yml | 94 ------------ 17 files changed, 1503 deletions(-) delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/ios.yml delete mode 100644 .github/workflows/macos-ustk.yml delete mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/other-arch-isolated.yml delete mode 100644 .github/workflows/other-arch.yml delete mode 100644 .github/workflows/ubuntu-3rdparty.yml delete mode 100644 .github/workflows/ubuntu-contrib.yml delete mode 100644 .github/workflows/ubuntu-dep-apt.yml delete mode 100644 .github/workflows/ubuntu-dep-src.yml delete mode 100644 .github/workflows/ubuntu-isolated.yml delete mode 100644 .github/workflows/ubuntu-sanitizers.yml delete mode 100644 .github/workflows/ubuntu-ustk.yml delete mode 100644 .github/workflows/valgrind.yml delete mode 100644 .github/workflows/windows-clang.yaml delete mode 100644 .github/workflows/windows-msvc.yaml delete mode 100644 appveyor.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index f7a0705e4c..0000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Code-coverage - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Print compiler information - run: dpkg --list | grep compiler - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev lcov gcovr - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_COVERAGE=ON -DBUILD_DEPRECATED_FUNCTIONS=OFF - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: make -j$(nproc) - - # https://blog.ineat-group.com/2020/07/exploiter-votre-code-coverage-avec-codecov-io-flutter-tips-of-the-month-5/ - - name: Run code coverage - working-directory: build - run: | - lcov --zerocounters --directory . - cmake --build . --target all -j$(nproc) - cmake --build . --target test -j$(nproc) - lcov --directory . --capture --output-file visp-coverage.info - lcov --remove visp-coverage.info \ - '/usr/*' \ - '*/private/*' \ - '*/test/*' \ - "/home/runner/work/visp/visp/3rdparty/*" \ - "/home/runner/work/visp/visp/demo/*" \ - "/home/runner/work/visp/visp/example/*" \ - "/home/runner/work/visp/visp/samples/*" \ - "/home/runner/work/visp/visp/modules/gui*" \ - "/home/runner/work/visp/visp/modules/io/src/parallel-port*" \ - "/home/runner/work/visp/visp/modules/robot*" \ - "/home/runner/work/visp/visp/modules/sensor*" \ - --output-file visp-coverage.cleaned - - - name: Upload report to Codecov - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - files: ./build/visp-coverage.cleaned - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml deleted file mode 100644 index eb3c8f95c6..0000000000 --- a/.github/workflows/ios.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: iOS - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ios: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-11] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: | - sysctl -a | grep machdep.cpu - sysctl -a | grep logical - - - name: Print OS information - run: system_profiler SPSoftwareDataType - - - name: Install dependencies - run: brew install python - - - name: Build ios framework - run: | - mkdir build - cd build - python ../platforms/ios/build_framework.py ios diff --git a/.github/workflows/macos-ustk.yml b/.github/workflows/macos-ustk.yml deleted file mode 100644 index 266e8c3baf..0000000000 --- a/.github/workflows/macos-ustk.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: MacOS-ustk - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-macos: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-12] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: | - sysctl -a | grep machdep.cpu - sysctl -a | grep logical - - - name: Print OS information - run: system_profiler SPSoftwareDataType - - - name: Install dependencies - run: brew install libpng libjpeg-turbo libdc1394 opencv pcl librealsense zbar pkg-config nlohmann-json - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Clone ustk-dataset - 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: Clone ustk - run: | - git clone --depth 1 https://github.com/lagadic/ustk ${HOME}/ustk - - - name: Clone ustk-sample - run: | - git clone --depth 1 https://github.com/lagadic/ustk-sample ${HOME}/ustk-sample - - # Openblas location is exported explicitly because openblas is keg-only, - # which means it was not symlinked into /usr/local/. - # qt@5 is as a requested dependency for vtk and thus for pcl 1.12.1 - # qt@5 is keg-only, which means it was not symlinked into /usr/local that's why we need to set Qt5_DIR - - name: Configure CMake - run: | - export LDFLAGS="-L/usr/local/opt/openblas/lib" - export CPPFLAGS="-I/usr/local/opt/openblas/include" - export Qt5_DIR="$(brew --prefix qt5)/lib/cmake/Qt5" - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DVISP_CONTRIB_MODULES_PATH=${HOME}/ustk/modules -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: make -j$(sysctl -n hw.logicalcpu) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure - - - name: ViSP + UsTK as 3rdparty with cmake - run: | - cd ${HOME}/ustk-sample - mkdir ustk-sample-build - cd ustk-sample-build - cmake .. -DVISP_DIR=/tmp/usr/local/lib/cmake/visp - make -j$(sysctl -n hw.logicalcpu) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 7bd441dbbe..0000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: MacOS - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-macos: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-12, macos-13] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: | - sysctl -a | grep machdep.cpu - sysctl -a | grep logical - - - name: Print OS information - run: system_profiler SPSoftwareDataType - - - name: Install dependencies on macos-12 - if: matrix.os == 'macos-12' - run: | - brew install libpng libjpeg-turbo libdc1394 opencv pcl librealsense zbar pkg-config nlohmann-json - - - name: Install dependencies on macos-13 - # On macos-13 we need to do a specific action - # ==> Pouring python@3.12--3.12.1_1.ventura.bottle.tar.gz - # Error: The `brew link` step did not complete successfully - # The formula built, but is not symlinked into /usr/local - # Could not symlink bin/2to3-3.12 - # Target /usr/local/bin/2to3-3.12 - # already exists. You may want to remove it: - # rm '/usr/local/bin/2to3-3.12' - # - # To force the link and overwrite all conflicting files: - # brew link --overwrite python@3.12 - # - # Fix proposed in https://github.com/actions/runner-images/issues/6817 - if: matrix.os == 'macos-13' - run: | - brew update - brew upgrade || true - brew install libpng libjpeg-turbo libdc1394 pcl librealsense zbar pkg-config nlohmann-json - brew install opencv - - - name: Install java dependencies - run: | - brew install openjdk ant - sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk - echo "JAVA_HOME=$(/usr/libexec/java_home)" >> $GITHUB_ENV - echo ${JAVA_HOME} - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Clone visp_sample - run: | - git clone --depth 1 https://github.com/lagadic/visp_sample ${HOME}/visp_sample - - # Openblas location is exported explicitly because openblas is keg-only, - # which means it was not symlinked into /usr/local/. - # qt@5 is as a requested dependency for vtk and thus for pcl 1.12.1 - # qt@5 is keg-only, which means it was not symlinked into /usr/local that's why we need to set Qt5_DIR - - name: Configure CMake - run: | - export LDFLAGS="-L/usr/local/opt/openblas/lib" - export CPPFLAGS="-I/usr/local/opt/openblas/include" - export Qt5_DIR="$(brew --prefix qt5)/lib/cmake/Qt5" - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: make -j$(sysctl -n hw.logicalcpu) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure -V - - - name: ViSP as 3rdparty with cmake - run: | - cd ${HOME}/visp_sample - mkdir visp_sample-build - cd visp_sample-build - cmake ../ -DVISP_DIR=/tmp/usr/local/lib/cmake/visp -DCMAKE_VERBOSE_MAKEFILE=ON - make -j$(sysctl -n hw.logicalcpu) - - - name: ViSP as 3rdparty with visp.pc and pkg-config - run: | - cd ${HOME}/visp_sample - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig - pkg-config --cflags visp - pkg-config --libs visp - make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp.pc - make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp.pc clean - - - name: ViSP as 3rdparty with visp-config - run: | - cd ${HOME}/visp_sample - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig - export VISP_INSTALL_PREFIX=/tmp/usr/local - $VISP_INSTALL_PREFIX/bin/visp-config --cflags - $VISP_INSTALL_PREFIX/bin/visp-config --libs - make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp-config - make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp-config clean diff --git a/.github/workflows/other-arch-isolated.yml b/.github/workflows/other-arch-isolated.yml deleted file mode 100644 index 868bfebb3d..0000000000 --- a/.github/workflows/other-arch-isolated.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Other-architectures-isolated - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -# https://github.com/uraimo/run-on-arch-action -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-other-architectures: - # The host should always be linux - runs-on: ubuntu-22.04 - name: Build on ${{ matrix.distro }} ${{ matrix.arch }} ${{ matrix.endianness }} - - # Run steps on a matrix of different arch/distro combinations - strategy: - fail-fast: false - matrix: - include: - # - arch: armv6 - # distro: bullseye - # target: ARMV6 - - arch: armv7 - distro: ubuntu22.04 - target: ARMV7 - endianness: (Little Endian) - - arch: aarch64 - distro: ubuntu22.04 #fedora_latest - target: ARMV8 - endianness: (Little Endian) - - arch: ppc64le - distro: ubuntu22.04 - target: POWER8 - endianness: (Little Endian) - - arch: s390x - distro: ubuntu22.04 - target: Z13 - endianness: (Big Endian) - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Run on arch - uses: uraimo/run-on-arch-action@v2.2.1 - with: - githubToken: ${{ github.token }} - arch: ${{ matrix.arch }} - distro: ${{ matrix.distro }} - - run: | - lscpu - - apt-get update && apt-get install -y lsb-release git build-essential cmake - lsb_release -a - dpkg --list | grep compiler - - pwd - mkdir build && cd build - cmake .. -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TUTORIALS=OFF -DBUILD_JAVA=OFF \ - -DUSE_JPEG=OFF -DUSE_PNG=OFF -DUSE_X11=OFF -DUSE_XML2=OFF -DBUILD_JAVA=OFF -DUSE_BLAS/LAPACK=OFF - cat ViSP-third-party.txt - - make -j$(nproc) - - ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/other-arch.yml b/.github/workflows/other-arch.yml deleted file mode 100644 index 902a514e86..0000000000 --- a/.github/workflows/other-arch.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Other-architectures - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -# https://github.com/uraimo/run-on-arch-action -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-other-architectures: - # The host should always be linux - runs-on: ubuntu-20.04 - name: Build on ${{ matrix.distro }} ${{ matrix.arch }} ${{ matrix.endianness }} - - # Run steps on a matrix of 3 arch/distro combinations - strategy: - fail-fast: false - matrix: - include: - # - arch: armv6 - # distro: bullseye - # target: ARMV6 - # - arch: armv7 - # distro: ubuntu20.04 - # target: ARMV7 - - arch: aarch64 - distro: ubuntu20.04 #fedora_latest - target: ARMV8 - endianness: (Little Endian) - # - arch: ppc64le - # distro: ubuntu20.04 - # target: POWER8 - - arch: s390x - distro: ubuntu20.04 - target: Z13 - endianness: (Big Endian) - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Run on arch - uses: uraimo/run-on-arch-action@v2.1.1 - with: - githubToken: ${{ github.token }} - arch: ${{ matrix.arch }} - distro: ${{ matrix.distro }} - - run: | - lscpu - - apt-get update && apt-get install -y lsb-release git build-essential cmake - lsb_release -a - - apt-get update && apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev gfortran liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev - apt-get update && apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev - - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - export VISP_INPUT_IMAGE_PATH=$HOME/visp-images - echo ${VISP_INPUT_IMAGE_PATH} - - pwd - mkdir build && cd build - cmake .. -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TUTORIALS=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java=OFF -DBUILD_MODULE_visp_java_binding=OFF - cat ViSP-third-party.txt - - make -j$(nproc) - - ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/ubuntu-3rdparty.yml b/.github/workflows/ubuntu-3rdparty.yml deleted file mode 100644 index a0950d6946..0000000000 --- a/.github/workflows/ubuntu-3rdparty.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Ubuntu-3rdparty - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-dep-apt: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, ubuntu-22.04] - compiler: [ {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Print compiler information - run: dpkg --list | grep compiler - - - name: Install dependencies for ubuntu 18.04 and 20.04 - if: matrix.os != 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Install dependencies for ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Clone camera_localization - run: | - git clone --depth 1 https://github.com/lagadic/camera_localization ${HOME}/camera_localization - - - name: Clone visp_started - run: | - git clone --depth 1 https://github.com/lagadic/visp_started ${HOME}/visp_started - - - name: Configure ViSP with cmake - run: | - mkdir build - cd build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - echo "CC: $CC" - echo "CXX: $CXX" - cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_DEMOS=OFF -DBUILD_TUTORIALS=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/tmp/usr/local - cat ViSP-third-party.txt - - - name: Compile and install ViSP - working-directory: build - run: | - make -j$(nproc) install - - - name: Build camera_localization with ViSP as 3rdparty - run: | - cd ${HOME}/camera_localization - mkdir camera_localization-build - cd camera_localization-build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - echo "CC: $CC" - echo "CXX: $CXX" - cmake ../ -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DVISP_DIR=/tmp/usr/local/lib/cmake/visp - make -j$(nproc) - - - name: Build visp_started with ViSP as 3rdparty - run: | - cd ${HOME}/visp_started - mkdir visp_started-build - cd visp_started-build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - echo "CC: $CC" - echo "CXX: $CXX" - cmake ../ -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DVISP_DIR=/tmp/usr/local/lib/cmake/visp - make -j$(nproc) diff --git a/.github/workflows/ubuntu-contrib.yml b/.github/workflows/ubuntu-contrib.yml deleted file mode 100644 index 6ff03f0316..0000000000 --- a/.github/workflows/ubuntu-contrib.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Ubuntu-contrib - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-dep-apt: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, ubuntu-22.04] - compiler: [ {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Print compiler information - run: dpkg --list | grep compiler - - - name: Install dependencies for ubuntu 20.04 - if: matrix.os != 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Install dependencies for ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Clone visp_contrib - run: | - git clone --depth 1 https://github.com/lagadic/visp_contrib ${HOME}/visp_contrib - - - name: Configure ViSP and visp_contrib with cmake - run: | - mkdir build - cd build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - echo "CC: $CC" - echo "CXX: $CXX" - cmake .. -DVISP_CONTRIB_MODULES_PATH=${HOME}/visp_contrib/modules -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_DEMOS=OFF -DBUILD_TUTORIALS=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/tmp/usr/local - cat ViSP-third-party.txt - - - name: Compile and install ViSP - working-directory: build - run: | - make -j$(nproc) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/ubuntu-dep-apt.yml b/.github/workflows/ubuntu-dep-apt.yml deleted file mode 100644 index cc206218f6..0000000000 --- a/.github/workflows/ubuntu-dep-apt.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: Ubuntu-dep-apt - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-dep-apt: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, ubuntu-22.04] - compiler: [ {CC: /usr/bin/gcc-9, CXX: /usr/bin/g++-9}, {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ] - standard: [ 98, 11, 17 ] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Print compiler information - run: dpkg --list | grep compiler - - - name: Install dependencies for ubuntu 20.04 - if: matrix.os != 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Install dependencies for ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Clone visp_sample - run: | - git clone --depth 1 https://github.com/lagadic/visp_sample ${HOME}/visp_sample - - - name: Configure CMake - run: | - mkdir build - cd build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - CXX_STANDARD=${{ matrix.standard }} - echo "CC: $CC" - echo "CXX: $CXX" - echo "Standard: $CXX_STANDARD" - cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DUSE_CXX_STANDARD=$CXX_STANDARD - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: | - make -j$(nproc) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(nproc) --output-on-failure - - - name: ViSP as 3rdparty with cmake - run: | - cd ${HOME}/visp_sample - mkdir visp_sample-build - cd visp_sample-build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DVISP_DIR=/tmp/usr/local/lib/cmake/visp -DCMAKE_VERBOSE_MAKEFILE=ON - make -j$(nproc) - - - name: ViSP as 3rdparty with visp.pc and pkg-config - run: | - cd ${HOME}/visp_sample - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - pkg-config --cflags visp - pkg-config --libs visp - make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp.pc - make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp.pc clean - - - name: ViSP as 3rdparty with visp-config - run: | - cd ${HOME}/visp_sample - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig - export VISP_INSTALL_PREFIX=/tmp/usr/local - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - $VISP_INSTALL_PREFIX/bin/visp-config --cflags - $VISP_INSTALL_PREFIX/bin/visp-config --libs - make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp-config - make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp-config clean diff --git a/.github/workflows/ubuntu-dep-src.yml b/.github/workflows/ubuntu-dep-src.yml deleted file mode 100644 index aa382ffd69..0000000000 --- a/.github/workflows/ubuntu-dep-src.yml +++ /dev/null @@ -1,171 +0,0 @@ -name: Ubuntu-dep-src - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-dep-src: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, ubuntu-22.04] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Install dependencies for ubuntu 20.04 - if: matrix.os != 'ubuntu-22.04' - run: | - sudo apt-get update && sudo apt-get install -y libdc1394-22-dev - - - name: Install dependencies for ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' - run: | - sudo apt-get update && sudo apt-get install -y libdc1394-dev - - - name: Install common dependencies for ubuntu - run: | - sudo apt-get update - sudo apt-get install -y libx11-dev libv4l-dev gfortran liblapack-dev libeigen3-dev - sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev - sudo apt-get install -y mesa-common-dev mesa-utils freeglut3-dev libflann-dev libboost-all-dev - sudo apt-get install -y nlohmann-json3-dev - - - name: Install dependencies for ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' - run: | - sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev gfortran liblapack-dev libeigen3-dev - sudo apt-get update && sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev - - - name: Build OpenBLAS from source - run: | - pwd - echo $GITHUB_WORKSPACE - git clone --depth 1 https://github.com/xianyi/OpenBLAS.git ${HOME}/OpenBLAS - cd ${HOME}/OpenBLAS - mkdir install - make -j$(nproc) - make -j$(nproc) install PREFIX=$(pwd)/install - echo "OpenBLAS_HOME=$(pwd)/install" >> $GITHUB_ENV - echo $OpenBLAS_HOME - - - name: Build VTK from source - run: | - pwd - git clone --recursive --depth 1 https://github.com/Kitware/VTK.git ${HOME}/VTK - cd ${HOME}/VTK - mkdir build && cd build && mkdir install - cmake .. -DVTK_ANDROID_BUILD=OFF -DVTK_BUILD_DOCUMENTATION=OFF -DVTK_BUILD_EXAMPLES=OFF -DVTK_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release \ - -DVTK_GROUP_ENABLE_Imaging=DONT_WANT -DVTK_GROUP_ENABLE_MPI=DONT_WANT -DVTK_GROUP_ENABLE_Web=DONT_WANT -DCMAKE_INSTALL_PREFIX=$(pwd)/install - make -j$(nproc) install - echo "VTK_DIR=$(pwd)/install" >> $GITHUB_ENV - echo $VTK_DIR - - - name: Build OpenCV from source - run: | - pwd - git clone --depth 1 https://github.com/opencv/opencv.git ${HOME}/opencv - cd ${HOME}/opencv - mkdir build && cd build && mkdir install - cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install - make -j$(nproc) install - echo "OpenCV_DIR=$(pwd)/install" >> $GITHUB_ENV - echo $OpenCV_DIR - - - name: Build librealsense2 from source - run: | - pwd - git clone --depth 1 https://github.com/IntelRealSense/librealsense.git ${HOME}/librealsense - cd ${HOME}/librealsense - mkdir build && cd build && mkdir install - cmake .. -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install - make -j$(nproc) install - echo "REALSENSE2_DIR=$(pwd)/install" >> $GITHUB_ENV - echo $REALSENSE2_DIR - - - name: Build PCL from source - run: | - pwd - git clone --depth 1 https://github.com/PointCloudLibrary/pcl.git ${HOME}/pcl - cd ${HOME}/pcl - mkdir build && cd build && mkdir install - cmake .. -DBUILD_tools=OFF -DBUILD_global_tests=OFF -DPCL_DISABLE_GPU_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install - make -j$(nproc) install - echo "PCL_DIR=$(pwd)/install" >> $GITHUB_ENV - echo $PCL_DIR - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Configure CMake - run: | - pwd - mkdir build && cd build && mkdir install - cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/install - cat ViSP-third-party.txt - - - name: Build visp-config script - working-directory: build - run: | - make -j$(nproc) developer_scripts - ./bin/visp-config --cflags - ./bin/visp-config --libs - - - name: Build and install ViSP - working-directory: build - run: | - make -j$(nproc) install - echo "VISP_DIR=$(pwd)/install" >> $GITHUB_ENV - echo $VISP_DIR - - - name: Run unit tests - working-directory: build - run: ctest -j$(nproc) --output-on-failure - - - name: Clone camera_localization - run: | - git clone --depth 1 https://github.com/lagadic/camera_localization ${HOME}/camera_localization - - - name: Build camera_localization with ViSP as 3rdparty - run: | - cd ${HOME}/camera_localization - mkdir camera_localization-build - cd camera_localization-build - cmake .. - make -j$(nproc) - - - name: Clone visp_started - run: | - git clone --depth 1 https://github.com/lagadic/visp_started ${HOME}/visp_started - - - name: Build visp_started with ViSP as 3rdparty - run: | - cd ${HOME}/visp_started - mkdir visp_started-build - cd visp_started-build - cmake .. - make -j$(nproc) diff --git a/.github/workflows/ubuntu-isolated.yml b/.github/workflows/ubuntu-isolated.yml deleted file mode 100644 index bd5684f0e5..0000000000 --- a/.github/workflows/ubuntu-isolated.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Isolated = build without 3rdparty and visp-images -name: Ubuntu-isolated - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-dep-apt: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - compiler: [ {CC: /usr/bin/gcc, CXX: /usr/bin/g++} ] - standard: [ 17 ] - - steps: - # Install OpenMP and turn-off some dependencies (below) to try to have a similar env compared to the ROS buildbot - - name: Install OpenMP - run: | - sudo apt-get update - sudo apt-get install libomp-dev - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Print compiler information - run: dpkg --list | grep compiler - - - name: Configure CMake - run: | - mkdir build - cd build - CC=${{ matrix.compiler.CC }} - CXX=${{ matrix.compiler.CXX }} - CXX_STANDARD=${{ matrix.standard }} - echo "CC: $CC" - echo "CXX: $CXX" - echo "Standard: $CXX_STANDARD" - cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" \ - -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DUSE_CXX_STANDARD=$CXX_STANDARD \ - -DUSE_JPEG=OFF -DUSE_PNG=OFF -DUSE_X11=OFF -DUSE_XML2=OFF -DBUILD_JAVA=OFF -DUSE_BLAS/LAPACK=OFF - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: | - make -j$(nproc) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/ubuntu-sanitizers.yml b/.github/workflows/ubuntu-sanitizers.yml deleted file mode 100644 index 4210c71d7f..0000000000 --- a/.github/workflows/ubuntu-sanitizers.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: Ubuntu-sanitizers - -on: - push: - pull_request: - schedule: - # https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events - # * is a special character in YAML so you have to quote this string - # every Sunday at 2 am - - cron: '0 2 * * SUN' - -# 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-ubuntu-sanitizers: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - flags: ["-fsanitize=address", "-fsanitize=leak", "-fsanitize=thread", "-fsanitize=undefined"] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libblas-dev libeigen3-dev nlohmann-json3-dev - - - name: Linear algebra liblapack/libblas alternatives - run: | - update-alternatives --list liblapack.so.3-x86_64-linux-gnu - update-alternatives --list libblas.so.3-x86_64-linux-gnu - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -DCMAKE_C_FLAGS=${{ matrix.flags }} -DCMAKE_CXX_FLAGS=${{ matrix.flags }} -DCMAKE_LDFLAGS=${{ matrix.flags }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_OPENMP=OFF - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: make -j$(nproc) - - - name: Run unit tests with sanitizers - env: - # Workaround error in SimdLib - # ==20865==ERROR: AddressSanitizer: odr-violation (0x7f4ad36c4500): - # [1] size=8 'ALIGNMENT' /home/runner/work/visp/visp/3rdparty/simdlib/Simd/SimdLib.cpp:82:18 - # [2] size=8 'ALIGNMENT' /home/runner/work/visp/visp/3rdparty/simdlib/Simd/SimdLib.cpp:82:18 - # These globals were registered at these points: - # [1]: - # #0 0x7f4ad3702928 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 - # #1 0x7f4ad2eea39a in _sub_I_00099_1 (/home/runner/work/visp/visp/build/lib/libvisp_mbt.so.3.5+0x4e839a) - # #2 0x7f4ad40c847d (/lib64/ld-linux-x86-64.so.2+0x647d) - # - # [2]: - # #0 0x7f4ad3702928 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 - # #1 0x7f4ad1957db0 in _sub_I_00099_1 (/home/runner/work/visp/visp/build/lib/libvisp_core.so.3.5+0x6aadb0) - # #2 0x7f4ad40c847d (/lib64/ld-linux-x86-64.so.2+0x647d) - # - # ==20865==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 - # SUMMARY: AddressSanitizer: odr-violation: global 'ALIGNMENT' at /home/runner/work/visp/visp/3rdparty/simdlib/Simd/SimdLib.cpp:82:18 - ASAN_OPTIONS: detect_odr_violation=0 - working-directory: build - # When running ctest we got a lot of segfault - # This seems a bug reported in - # - https://stackoverflow.com/questions/77894856/possible-bug-in-gcc-sanitizers - # - https://stackoverflow.com/questions/77850769/fatal-threadsanitizer-unexpected-memory-mapping-when-running-on-linux-kernels - # The workaround seems to be to set vm.mmap_rnd_bits=28 - run: | - sudo cat /proc/sys/vm/mmap_rnd_bits - sudo sysctl vm.mmap_rnd_bits=28 - ctest -j$(nproc) --output-on-failure -V diff --git a/.github/workflows/ubuntu-ustk.yml b/.github/workflows/ubuntu-ustk.yml deleted file mode 100644 index 6c63dd55db..0000000000 --- a/.github/workflows/ubuntu-ustk.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Ubuntu-ustk - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-dep-apt: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, ubuntu-22.04] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Print compiler information - run: dpkg --list | grep compiler - - - name: Install dependencies for ubuntu 20.04 - if: matrix.os != 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Install dependencies for ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Clone ustk-dataset - 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: Clone ustk - run: | - git clone --depth 1 https://github.com/lagadic/ustk ${HOME}/ustk - - - name: Clone ustk-sample - run: | - git clone --depth 1 https://github.com/lagadic/ustk-sample ${HOME}/ustk-sample - - - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DVISP_CONTRIB_MODULES_PATH=${HOME}/ustk/modules - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: | - make -j$(nproc) install - - - name: Run unit tests - working-directory: build - run: ctest -j$(nproc) --output-on-failure - - - name: ViSP + UsTK as 3rdparty with cmake - run: | - cd ${HOME}/ustk-sample - mkdir ustk-sample-build - cd ustk-sample-build - cmake .. -DVISP_DIR=/tmp/usr/local/lib/cmake/visp - make -j$(nproc) diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml deleted file mode 100644 index 3f77bb5762..0000000000 --- a/.github/workflows/valgrind.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Ubuntu-valgrind - -# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events -on: - push: - pull_request: - schedule: - - cron: '0 2 * * SUN' - -# 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-ubuntu-valgrind: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Print system information - run: lscpu - - - name: Print OS information - run: lsb_release -a - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev valgrind - - - name: Clone visp-images - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo ${VISP_INPUT_IMAGE_PATH} - - - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo - cat ViSP-third-party.txt - - - name: Compile - working-directory: build - run: make -j$(nproc) - - - name: Run unit tests with Valgrind - working-directory: build - run: ctest -j$(nproc) -T memcheck diff --git a/.github/workflows/windows-clang.yaml b/.github/workflows/windows-clang.yaml deleted file mode 100644 index 6da3a39259..0000000000 --- a/.github/workflows/windows-clang.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: Windows - clang -on: - pull_request: - push: - -# 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-clang] - - include: - - name: windows-latest-clang - os: windows-2022 - compiler: clang-cl - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Display the workspace path - working-directory: ${{ github.workspace }} - run: pwd - - - name: Clone visp-images - shell: bash - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - run: | - git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images - echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV - echo "VISP_INPUT_IMAGE_PATH: ${{ env.VISP_INPUT_IMAGE_PATH }}" - - - name: Configure ViSP - working-directory: ${{ github.workspace }} - run: | - set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }} - echo "VISP_INPUT_IMAGE_PATH: " - echo %VISP_INPUT_IMAGE_PATH% - mkdir build - cd build - cmake .. -G "Visual Studio 17 2022" -T "ClangCl" -A "x64" - type ViSP-third-party.txt - pwd - - - name: Build ViSP - working-directory: ${{ github.workspace }}\build - run: | - pwd - cmake --build . --config Release - - - name: Install ViSP - 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\ - dir ${{ github.workspace }}\build\install\x64\ - dir ${{ github.workspace }}\build\install\x64\vc17\ - 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/.github/workflows/windows-msvc.yaml b/.github/workflows/windows-msvc.yaml deleted file mode 100644 index 6a0e8940af..0000000000 --- a/.github/workflows/windows-msvc.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: Windows - Visual 2019 -on: - pull_request: - push: - -# 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-images - shell: bash - # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ - 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: Configure ViSP - working-directory: ${{ github.workspace }} - run: | - set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }} - echo "VISP_INPUT_IMAGE_PATH: " - echo %VISP_INPUT_IMAGE_PATH% - mkdir build - cd build - cmake .. -G "Visual Studio 17 2022" -A "x64" - type ViSP-third-party.txt - - - name: Build ViSP - working-directory: ${{ github.workspace }}\build - run: | - cmake --build . --config Release - - - name: Install ViSP - 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 414e713f88..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,94 +0,0 @@ -# Specify version format -version: "3.6.1-{build}" - -image: - - Visual Studio 2022 - -# to add several platforms to build matrix -platform: - - x64 - -configuration: - - Release - -environment: - matrix: - - TARGET: mingw - # - TARGET: msvc - - TARGET: uwp - - TARGET: visp_sample - -# 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 - - set VISP_INPUT_IMAGE_PATH=C:\projects\deps\visp-images - - # visp_sample - - git clone --depth 1 https://github.com/lagadic/visp_sample - -# visp clone directory -clone_folder: C:\projects\visp\visp - -before_build: - # Setup path for mingw - # 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-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%\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%\vc17\bin - - if "%TARGET%"=="visp_sample" set PATH=%VISP_DLL_DIR%;%PATH% - -build_script: - - echo %PATH% - - dir C:\projects\deps - - dir C:\tools - - md C:\projects\visp\build - - cd C:\projects\visp\build - - # mingw case - - 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 -j2 - - # msvc case - - 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 -j2 - - # uwp case - - 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" 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 17 2022" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install - - if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% -- /m:2 From 0061869afcdbbae488b708c063f93bfdddd7573a Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 19 Apr 2024 14:29:02 +0200 Subject: [PATCH 22/25] Build using parallel jobs --- .github/workflows/macos-linux-conda.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 812a1cf051..1bb7047061 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -52,9 +52,21 @@ jobs: conda config --show printenv | sort + - name: Determine number of processor on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + echo "NPROC=$(nproc)" >> $GITHUB_ENV + + - name: Determine number of processor on MacOS + if: matrix.os == 'macos-latest' + run: | + echo "NPROC=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV + - name: Build visp python bindings shell: bash -el {0} run: | + echo "Number of processors: ${NPROC}" + mkdir build cd build @@ -65,13 +77,15 @@ jobs: -DBUILD_TESTS=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TUTORIALS=OFF \ + -DBUILD_APPS=OFF \ + -DBUILD_DEMOS=OFF \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} # Build - cmake --build . --target visp_python_bindings + cmake --build . --parallel ${NPROC} --target visp_python_bindings # Tests - cmake --build . --target visp_python_bindings_test + cmake --build . --parallel ${NPROC} --target visp_python_bindings_test check: if: always() From bb326fc461663d6e656846aaa1c03411d027e84d Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 19 Apr 2024 14:29:45 +0200 Subject: [PATCH 23/25] Atempt to remove libopencv dependency to fix libEGL.so issue --- .github/workflows/conda/environment_linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/conda/environment_linux.yml b/.github/workflows/conda/environment_linux.yml index fe9cde4ecb..0ee6f44a19 100644 --- a/.github/workflows/conda/environment_linux.yml +++ b/.github/workflows/conda/environment_linux.yml @@ -12,7 +12,6 @@ dependencies: - libdc1394 >=2.2.6 - librealsense - libgomp - - libopencv - eigen - libjpeg-turbo - libpng From 842827501466f1ae4c37f86b34a173471a69da75 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 19 Apr 2024 15:40:03 +0200 Subject: [PATCH 24/25] Introduce again ci removed temporary --- .github/workflows/coverage.yml | 85 +++++++++++ .github/workflows/ios.yml | 43 ++++++ .github/workflows/macos-ustk.yml | 90 ++++++++++++ .github/workflows/macos.yml | 129 ++++++++++++++++ .github/workflows/other-arch-isolated.yml | 74 ++++++++++ .github/workflows/other-arch.yml | 77 ++++++++++ .github/workflows/ubuntu-3rdparty.yml | 92 ++++++++++++ .github/workflows/ubuntu-contrib.yml | 68 +++++++++ .github/workflows/ubuntu-dep-apt.yml | 113 ++++++++++++++ .github/workflows/ubuntu-dep-src.yml | 171 ++++++++++++++++++++++ .github/workflows/ubuntu-isolated.yml | 68 +++++++++ .github/workflows/ubuntu-sanitizers.yml | 93 ++++++++++++ .github/workflows/ubuntu-ustk.yml | 90 ++++++++++++ .github/workflows/valgrind.yml | 55 +++++++ .github/workflows/windows-clang.yaml | 84 +++++++++++ .github/workflows/windows-msvc.yaml | 77 ++++++++++ appveyor.yml | 94 ++++++++++++ 17 files changed, 1503 insertions(+) create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/ios.yml create mode 100644 .github/workflows/macos-ustk.yml create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/other-arch-isolated.yml create mode 100644 .github/workflows/other-arch.yml create mode 100644 .github/workflows/ubuntu-3rdparty.yml create mode 100644 .github/workflows/ubuntu-contrib.yml create mode 100644 .github/workflows/ubuntu-dep-apt.yml create mode 100644 .github/workflows/ubuntu-dep-src.yml create mode 100644 .github/workflows/ubuntu-isolated.yml create mode 100644 .github/workflows/ubuntu-sanitizers.yml create mode 100644 .github/workflows/ubuntu-ustk.yml create mode 100644 .github/workflows/valgrind.yml create mode 100644 .github/workflows/windows-clang.yaml create mode 100644 .github/workflows/windows-msvc.yaml create mode 100644 appveyor.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000000..f7a0705e4c --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,85 @@ +name: Code-coverage + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Print compiler information + run: dpkg --list | grep compiler + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev lcov gcovr + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Configure CMake + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_COVERAGE=ON -DBUILD_DEPRECATED_FUNCTIONS=OFF + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: make -j$(nproc) + + # https://blog.ineat-group.com/2020/07/exploiter-votre-code-coverage-avec-codecov-io-flutter-tips-of-the-month-5/ + - name: Run code coverage + working-directory: build + run: | + lcov --zerocounters --directory . + cmake --build . --target all -j$(nproc) + cmake --build . --target test -j$(nproc) + lcov --directory . --capture --output-file visp-coverage.info + lcov --remove visp-coverage.info \ + '/usr/*' \ + '*/private/*' \ + '*/test/*' \ + "/home/runner/work/visp/visp/3rdparty/*" \ + "/home/runner/work/visp/visp/demo/*" \ + "/home/runner/work/visp/visp/example/*" \ + "/home/runner/work/visp/visp/samples/*" \ + "/home/runner/work/visp/visp/modules/gui*" \ + "/home/runner/work/visp/visp/modules/io/src/parallel-port*" \ + "/home/runner/work/visp/visp/modules/robot*" \ + "/home/runner/work/visp/visp/modules/sensor*" \ + --output-file visp-coverage.cleaned + + - name: Upload report to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: ./build/visp-coverage.cleaned + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000000..eb3c8f95c6 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,43 @@ +name: iOS + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ios: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-11] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: | + sysctl -a | grep machdep.cpu + sysctl -a | grep logical + + - name: Print OS information + run: system_profiler SPSoftwareDataType + + - name: Install dependencies + run: brew install python + + - name: Build ios framework + run: | + mkdir build + cd build + python ../platforms/ios/build_framework.py ios diff --git a/.github/workflows/macos-ustk.yml b/.github/workflows/macos-ustk.yml new file mode 100644 index 0000000000..266e8c3baf --- /dev/null +++ b/.github/workflows/macos-ustk.yml @@ -0,0 +1,90 @@ +name: MacOS-ustk + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-macos: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-12] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: | + sysctl -a | grep machdep.cpu + sysctl -a | grep logical + + - name: Print OS information + run: system_profiler SPSoftwareDataType + + - name: Install dependencies + run: brew install libpng libjpeg-turbo libdc1394 opencv pcl librealsense zbar pkg-config nlohmann-json + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Clone ustk-dataset + 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: Clone ustk + run: | + git clone --depth 1 https://github.com/lagadic/ustk ${HOME}/ustk + + - name: Clone ustk-sample + run: | + git clone --depth 1 https://github.com/lagadic/ustk-sample ${HOME}/ustk-sample + + # Openblas location is exported explicitly because openblas is keg-only, + # which means it was not symlinked into /usr/local/. + # qt@5 is as a requested dependency for vtk and thus for pcl 1.12.1 + # qt@5 is keg-only, which means it was not symlinked into /usr/local that's why we need to set Qt5_DIR + - name: Configure CMake + run: | + export LDFLAGS="-L/usr/local/opt/openblas/lib" + export CPPFLAGS="-I/usr/local/opt/openblas/include" + export Qt5_DIR="$(brew --prefix qt5)/lib/cmake/Qt5" + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DVISP_CONTRIB_MODULES_PATH=${HOME}/ustk/modules -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: make -j$(sysctl -n hw.logicalcpu) install + + - name: Run unit tests + working-directory: build + run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure + + - name: ViSP + UsTK as 3rdparty with cmake + run: | + cd ${HOME}/ustk-sample + mkdir ustk-sample-build + cd ustk-sample-build + cmake .. -DVISP_DIR=/tmp/usr/local/lib/cmake/visp + make -j$(sysctl -n hw.logicalcpu) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000..7bd441dbbe --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,129 @@ +name: MacOS + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-macos: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-12, macos-13] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: | + sysctl -a | grep machdep.cpu + sysctl -a | grep logical + + - name: Print OS information + run: system_profiler SPSoftwareDataType + + - name: Install dependencies on macos-12 + if: matrix.os == 'macos-12' + run: | + brew install libpng libjpeg-turbo libdc1394 opencv pcl librealsense zbar pkg-config nlohmann-json + + - name: Install dependencies on macos-13 + # On macos-13 we need to do a specific action + # ==> Pouring python@3.12--3.12.1_1.ventura.bottle.tar.gz + # Error: The `brew link` step did not complete successfully + # The formula built, but is not symlinked into /usr/local + # Could not symlink bin/2to3-3.12 + # Target /usr/local/bin/2to3-3.12 + # already exists. You may want to remove it: + # rm '/usr/local/bin/2to3-3.12' + # + # To force the link and overwrite all conflicting files: + # brew link --overwrite python@3.12 + # + # Fix proposed in https://github.com/actions/runner-images/issues/6817 + if: matrix.os == 'macos-13' + run: | + brew update + brew upgrade || true + brew install libpng libjpeg-turbo libdc1394 pcl librealsense zbar pkg-config nlohmann-json + brew install opencv + + - name: Install java dependencies + run: | + brew install openjdk ant + sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk + echo "JAVA_HOME=$(/usr/libexec/java_home)" >> $GITHUB_ENV + echo ${JAVA_HOME} + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Clone visp_sample + run: | + git clone --depth 1 https://github.com/lagadic/visp_sample ${HOME}/visp_sample + + # Openblas location is exported explicitly because openblas is keg-only, + # which means it was not symlinked into /usr/local/. + # qt@5 is as a requested dependency for vtk and thus for pcl 1.12.1 + # qt@5 is keg-only, which means it was not symlinked into /usr/local that's why we need to set Qt5_DIR + - name: Configure CMake + run: | + export LDFLAGS="-L/usr/local/opt/openblas/lib" + export CPPFLAGS="-I/usr/local/opt/openblas/include" + export Qt5_DIR="$(brew --prefix qt5)/lib/cmake/Qt5" + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: make -j$(sysctl -n hw.logicalcpu) install + + - name: Run unit tests + working-directory: build + run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure -V + + - name: ViSP as 3rdparty with cmake + run: | + cd ${HOME}/visp_sample + mkdir visp_sample-build + cd visp_sample-build + cmake ../ -DVISP_DIR=/tmp/usr/local/lib/cmake/visp -DCMAKE_VERBOSE_MAKEFILE=ON + make -j$(sysctl -n hw.logicalcpu) + + - name: ViSP as 3rdparty with visp.pc and pkg-config + run: | + cd ${HOME}/visp_sample + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig + pkg-config --cflags visp + pkg-config --libs visp + make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp.pc + make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp.pc clean + + - name: ViSP as 3rdparty with visp-config + run: | + cd ${HOME}/visp_sample + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig + export VISP_INSTALL_PREFIX=/tmp/usr/local + $VISP_INSTALL_PREFIX/bin/visp-config --cflags + $VISP_INSTALL_PREFIX/bin/visp-config --libs + make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp-config + make -j$(sysctl -n hw.logicalcpu) -f Makefile.visp-config clean diff --git a/.github/workflows/other-arch-isolated.yml b/.github/workflows/other-arch-isolated.yml new file mode 100644 index 0000000000..868bfebb3d --- /dev/null +++ b/.github/workflows/other-arch-isolated.yml @@ -0,0 +1,74 @@ +name: Other-architectures-isolated + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +# https://github.com/uraimo/run-on-arch-action +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-other-architectures: + # The host should always be linux + runs-on: ubuntu-22.04 + name: Build on ${{ matrix.distro }} ${{ matrix.arch }} ${{ matrix.endianness }} + + # Run steps on a matrix of different arch/distro combinations + strategy: + fail-fast: false + matrix: + include: + # - arch: armv6 + # distro: bullseye + # target: ARMV6 + - arch: armv7 + distro: ubuntu22.04 + target: ARMV7 + endianness: (Little Endian) + - arch: aarch64 + distro: ubuntu22.04 #fedora_latest + target: ARMV8 + endianness: (Little Endian) + - arch: ppc64le + distro: ubuntu22.04 + target: POWER8 + endianness: (Little Endian) + - arch: s390x + distro: ubuntu22.04 + target: Z13 + endianness: (Big Endian) + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run on arch + uses: uraimo/run-on-arch-action@v2.2.1 + with: + githubToken: ${{ github.token }} + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + + run: | + lscpu + + apt-get update && apt-get install -y lsb-release git build-essential cmake + lsb_release -a + dpkg --list | grep compiler + + pwd + mkdir build && cd build + cmake .. -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TUTORIALS=OFF -DBUILD_JAVA=OFF \ + -DUSE_JPEG=OFF -DUSE_PNG=OFF -DUSE_X11=OFF -DUSE_XML2=OFF -DBUILD_JAVA=OFF -DUSE_BLAS/LAPACK=OFF + cat ViSP-third-party.txt + + make -j$(nproc) + + ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/other-arch.yml b/.github/workflows/other-arch.yml new file mode 100644 index 0000000000..902a514e86 --- /dev/null +++ b/.github/workflows/other-arch.yml @@ -0,0 +1,77 @@ +name: Other-architectures + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +# https://github.com/uraimo/run-on-arch-action +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-other-architectures: + # The host should always be linux + runs-on: ubuntu-20.04 + name: Build on ${{ matrix.distro }} ${{ matrix.arch }} ${{ matrix.endianness }} + + # Run steps on a matrix of 3 arch/distro combinations + strategy: + fail-fast: false + matrix: + include: + # - arch: armv6 + # distro: bullseye + # target: ARMV6 + # - arch: armv7 + # distro: ubuntu20.04 + # target: ARMV7 + - arch: aarch64 + distro: ubuntu20.04 #fedora_latest + target: ARMV8 + endianness: (Little Endian) + # - arch: ppc64le + # distro: ubuntu20.04 + # target: POWER8 + - arch: s390x + distro: ubuntu20.04 + target: Z13 + endianness: (Big Endian) + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run on arch + uses: uraimo/run-on-arch-action@v2.1.1 + with: + githubToken: ${{ github.token }} + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + + run: | + lscpu + + apt-get update && apt-get install -y lsb-release git build-essential cmake + lsb_release -a + + apt-get update && apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev gfortran liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev + apt-get update && apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev + + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + export VISP_INPUT_IMAGE_PATH=$HOME/visp-images + echo ${VISP_INPUT_IMAGE_PATH} + + pwd + mkdir build && cd build + cmake .. -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TUTORIALS=OFF -DBUILD_JAVA=OFF -DBUILD_MODULE_visp_java=OFF -DBUILD_MODULE_visp_java_binding=OFF + cat ViSP-third-party.txt + + make -j$(nproc) + + ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/ubuntu-3rdparty.yml b/.github/workflows/ubuntu-3rdparty.yml new file mode 100644 index 0000000000..a0950d6946 --- /dev/null +++ b/.github/workflows/ubuntu-3rdparty.yml @@ -0,0 +1,92 @@ +name: Ubuntu-3rdparty + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-dep-apt: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + compiler: [ {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Print compiler information + run: dpkg --list | grep compiler + + - name: Install dependencies for ubuntu 18.04 and 20.04 + if: matrix.os != 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Install dependencies for ubuntu 22.04 + if: matrix.os == 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Clone camera_localization + run: | + git clone --depth 1 https://github.com/lagadic/camera_localization ${HOME}/camera_localization + + - name: Clone visp_started + run: | + git clone --depth 1 https://github.com/lagadic/visp_started ${HOME}/visp_started + + - name: Configure ViSP with cmake + run: | + mkdir build + cd build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + echo "CC: $CC" + echo "CXX: $CXX" + cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_DEMOS=OFF -DBUILD_TUTORIALS=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/tmp/usr/local + cat ViSP-third-party.txt + + - name: Compile and install ViSP + working-directory: build + run: | + make -j$(nproc) install + + - name: Build camera_localization with ViSP as 3rdparty + run: | + cd ${HOME}/camera_localization + mkdir camera_localization-build + cd camera_localization-build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + echo "CC: $CC" + echo "CXX: $CXX" + cmake ../ -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DVISP_DIR=/tmp/usr/local/lib/cmake/visp + make -j$(nproc) + + - name: Build visp_started with ViSP as 3rdparty + run: | + cd ${HOME}/visp_started + mkdir visp_started-build + cd visp_started-build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + echo "CC: $CC" + echo "CXX: $CXX" + cmake ../ -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DVISP_DIR=/tmp/usr/local/lib/cmake/visp + make -j$(nproc) diff --git a/.github/workflows/ubuntu-contrib.yml b/.github/workflows/ubuntu-contrib.yml new file mode 100644 index 0000000000..6ff03f0316 --- /dev/null +++ b/.github/workflows/ubuntu-contrib.yml @@ -0,0 +1,68 @@ +name: Ubuntu-contrib + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-dep-apt: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + compiler: [ {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Print compiler information + run: dpkg --list | grep compiler + + - name: Install dependencies for ubuntu 20.04 + if: matrix.os != 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Install dependencies for ubuntu 22.04 + if: matrix.os == 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Clone visp_contrib + run: | + git clone --depth 1 https://github.com/lagadic/visp_contrib ${HOME}/visp_contrib + + - name: Configure ViSP and visp_contrib with cmake + run: | + mkdir build + cd build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + echo "CC: $CC" + echo "CXX: $CXX" + cmake .. -DVISP_CONTRIB_MODULES_PATH=${HOME}/visp_contrib/modules -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_DEMOS=OFF -DBUILD_TUTORIALS=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/tmp/usr/local + cat ViSP-third-party.txt + + - name: Compile and install ViSP + working-directory: build + run: | + make -j$(nproc) install + + - name: Run unit tests + working-directory: build + run: ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/ubuntu-dep-apt.yml b/.github/workflows/ubuntu-dep-apt.yml new file mode 100644 index 0000000000..cc206218f6 --- /dev/null +++ b/.github/workflows/ubuntu-dep-apt.yml @@ -0,0 +1,113 @@ +name: Ubuntu-dep-apt + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-dep-apt: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + compiler: [ {CC: /usr/bin/gcc-9, CXX: /usr/bin/g++-9}, {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ] + standard: [ 98, 11, 17 ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Print compiler information + run: dpkg --list | grep compiler + + - name: Install dependencies for ubuntu 20.04 + if: matrix.os != 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Install dependencies for ubuntu 22.04 + if: matrix.os == 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Clone visp_sample + run: | + git clone --depth 1 https://github.com/lagadic/visp_sample ${HOME}/visp_sample + + - name: Configure CMake + run: | + mkdir build + cd build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + CXX_STANDARD=${{ matrix.standard }} + echo "CC: $CC" + echo "CXX: $CXX" + echo "Standard: $CXX_STANDARD" + cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DUSE_CXX_STANDARD=$CXX_STANDARD + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: | + make -j$(nproc) install + + - name: Run unit tests + working-directory: build + run: ctest -j$(nproc) --output-on-failure + + - name: ViSP as 3rdparty with cmake + run: | + cd ${HOME}/visp_sample + mkdir visp_sample-build + cd visp_sample-build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DVISP_DIR=/tmp/usr/local/lib/cmake/visp -DCMAKE_VERBOSE_MAKEFILE=ON + make -j$(nproc) + + - name: ViSP as 3rdparty with visp.pc and pkg-config + run: | + cd ${HOME}/visp_sample + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + pkg-config --cflags visp + pkg-config --libs visp + make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp.pc + make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp.pc clean + + - name: ViSP as 3rdparty with visp-config + run: | + cd ${HOME}/visp_sample + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/tmp/usr/local/lib/pkgconfig + export VISP_INSTALL_PREFIX=/tmp/usr/local + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + $VISP_INSTALL_PREFIX/bin/visp-config --cflags + $VISP_INSTALL_PREFIX/bin/visp-config --libs + make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp-config + make CXX=${{ matrix.compiler.CXX }} -j$(nproc) -f Makefile.visp-config clean diff --git a/.github/workflows/ubuntu-dep-src.yml b/.github/workflows/ubuntu-dep-src.yml new file mode 100644 index 0000000000..aa382ffd69 --- /dev/null +++ b/.github/workflows/ubuntu-dep-src.yml @@ -0,0 +1,171 @@ +name: Ubuntu-dep-src + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-dep-src: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Install dependencies for ubuntu 20.04 + if: matrix.os != 'ubuntu-22.04' + run: | + sudo apt-get update && sudo apt-get install -y libdc1394-22-dev + + - name: Install dependencies for ubuntu 22.04 + if: matrix.os == 'ubuntu-22.04' + run: | + sudo apt-get update && sudo apt-get install -y libdc1394-dev + + - name: Install common dependencies for ubuntu + run: | + sudo apt-get update + sudo apt-get install -y libx11-dev libv4l-dev gfortran liblapack-dev libeigen3-dev + sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev + sudo apt-get install -y mesa-common-dev mesa-utils freeglut3-dev libflann-dev libboost-all-dev + sudo apt-get install -y nlohmann-json3-dev + + - name: Install dependencies for ubuntu 22.04 + if: matrix.os == 'ubuntu-22.04' + run: | + sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev gfortran liblapack-dev libeigen3-dev + sudo apt-get update && sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev + + - name: Build OpenBLAS from source + run: | + pwd + echo $GITHUB_WORKSPACE + git clone --depth 1 https://github.com/xianyi/OpenBLAS.git ${HOME}/OpenBLAS + cd ${HOME}/OpenBLAS + mkdir install + make -j$(nproc) + make -j$(nproc) install PREFIX=$(pwd)/install + echo "OpenBLAS_HOME=$(pwd)/install" >> $GITHUB_ENV + echo $OpenBLAS_HOME + + - name: Build VTK from source + run: | + pwd + git clone --recursive --depth 1 https://github.com/Kitware/VTK.git ${HOME}/VTK + cd ${HOME}/VTK + mkdir build && cd build && mkdir install + cmake .. -DVTK_ANDROID_BUILD=OFF -DVTK_BUILD_DOCUMENTATION=OFF -DVTK_BUILD_EXAMPLES=OFF -DVTK_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release \ + -DVTK_GROUP_ENABLE_Imaging=DONT_WANT -DVTK_GROUP_ENABLE_MPI=DONT_WANT -DVTK_GROUP_ENABLE_Web=DONT_WANT -DCMAKE_INSTALL_PREFIX=$(pwd)/install + make -j$(nproc) install + echo "VTK_DIR=$(pwd)/install" >> $GITHUB_ENV + echo $VTK_DIR + + - name: Build OpenCV from source + run: | + pwd + git clone --depth 1 https://github.com/opencv/opencv.git ${HOME}/opencv + cd ${HOME}/opencv + mkdir build && cd build && mkdir install + cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install + make -j$(nproc) install + echo "OpenCV_DIR=$(pwd)/install" >> $GITHUB_ENV + echo $OpenCV_DIR + + - name: Build librealsense2 from source + run: | + pwd + git clone --depth 1 https://github.com/IntelRealSense/librealsense.git ${HOME}/librealsense + cd ${HOME}/librealsense + mkdir build && cd build && mkdir install + cmake .. -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install + make -j$(nproc) install + echo "REALSENSE2_DIR=$(pwd)/install" >> $GITHUB_ENV + echo $REALSENSE2_DIR + + - name: Build PCL from source + run: | + pwd + git clone --depth 1 https://github.com/PointCloudLibrary/pcl.git ${HOME}/pcl + cd ${HOME}/pcl + mkdir build && cd build && mkdir install + cmake .. -DBUILD_tools=OFF -DBUILD_global_tests=OFF -DPCL_DISABLE_GPU_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install + make -j$(nproc) install + echo "PCL_DIR=$(pwd)/install" >> $GITHUB_ENV + echo $PCL_DIR + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Configure CMake + run: | + pwd + mkdir build && cd build && mkdir install + cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/install + cat ViSP-third-party.txt + + - name: Build visp-config script + working-directory: build + run: | + make -j$(nproc) developer_scripts + ./bin/visp-config --cflags + ./bin/visp-config --libs + + - name: Build and install ViSP + working-directory: build + run: | + make -j$(nproc) install + echo "VISP_DIR=$(pwd)/install" >> $GITHUB_ENV + echo $VISP_DIR + + - name: Run unit tests + working-directory: build + run: ctest -j$(nproc) --output-on-failure + + - name: Clone camera_localization + run: | + git clone --depth 1 https://github.com/lagadic/camera_localization ${HOME}/camera_localization + + - name: Build camera_localization with ViSP as 3rdparty + run: | + cd ${HOME}/camera_localization + mkdir camera_localization-build + cd camera_localization-build + cmake .. + make -j$(nproc) + + - name: Clone visp_started + run: | + git clone --depth 1 https://github.com/lagadic/visp_started ${HOME}/visp_started + + - name: Build visp_started with ViSP as 3rdparty + run: | + cd ${HOME}/visp_started + mkdir visp_started-build + cd visp_started-build + cmake .. + make -j$(nproc) diff --git a/.github/workflows/ubuntu-isolated.yml b/.github/workflows/ubuntu-isolated.yml new file mode 100644 index 0000000000..bd5684f0e5 --- /dev/null +++ b/.github/workflows/ubuntu-isolated.yml @@ -0,0 +1,68 @@ +# Isolated = build without 3rdparty and visp-images +name: Ubuntu-isolated + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-dep-apt: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + compiler: [ {CC: /usr/bin/gcc, CXX: /usr/bin/g++} ] + standard: [ 17 ] + + steps: + # Install OpenMP and turn-off some dependencies (below) to try to have a similar env compared to the ROS buildbot + - name: Install OpenMP + run: | + sudo apt-get update + sudo apt-get install libomp-dev + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Print compiler information + run: dpkg --list | grep compiler + + - name: Configure CMake + run: | + mkdir build + cd build + CC=${{ matrix.compiler.CC }} + CXX=${{ matrix.compiler.CXX }} + CXX_STANDARD=${{ matrix.standard }} + echo "CC: $CC" + echo "CXX: $CXX" + echo "Standard: $CXX_STANDARD" + cmake .. -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" \ + -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DUSE_CXX_STANDARD=$CXX_STANDARD \ + -DUSE_JPEG=OFF -DUSE_PNG=OFF -DUSE_X11=OFF -DUSE_XML2=OFF -DBUILD_JAVA=OFF -DUSE_BLAS/LAPACK=OFF + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: | + make -j$(nproc) install + + - name: Run unit tests + working-directory: build + run: ctest -j$(nproc) --output-on-failure diff --git a/.github/workflows/ubuntu-sanitizers.yml b/.github/workflows/ubuntu-sanitizers.yml new file mode 100644 index 0000000000..4210c71d7f --- /dev/null +++ b/.github/workflows/ubuntu-sanitizers.yml @@ -0,0 +1,93 @@ +name: Ubuntu-sanitizers + +on: + push: + pull_request: + schedule: + # https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events + # * is a special character in YAML so you have to quote this string + # every Sunday at 2 am + - cron: '0 2 * * SUN' + +# 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-ubuntu-sanitizers: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + flags: ["-fsanitize=address", "-fsanitize=leak", "-fsanitize=thread", "-fsanitize=undefined"] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libblas-dev libeigen3-dev nlohmann-json3-dev + + - name: Linear algebra liblapack/libblas alternatives + run: | + update-alternatives --list liblapack.so.3-x86_64-linux-gnu + update-alternatives --list libblas.so.3-x86_64-linux-gnu + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Configure CMake + run: | + mkdir build + cd build + cmake .. -DCMAKE_C_FLAGS=${{ matrix.flags }} -DCMAKE_CXX_FLAGS=${{ matrix.flags }} -DCMAKE_LDFLAGS=${{ matrix.flags }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_OPENMP=OFF + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: make -j$(nproc) + + - name: Run unit tests with sanitizers + env: + # Workaround error in SimdLib + # ==20865==ERROR: AddressSanitizer: odr-violation (0x7f4ad36c4500): + # [1] size=8 'ALIGNMENT' /home/runner/work/visp/visp/3rdparty/simdlib/Simd/SimdLib.cpp:82:18 + # [2] size=8 'ALIGNMENT' /home/runner/work/visp/visp/3rdparty/simdlib/Simd/SimdLib.cpp:82:18 + # These globals were registered at these points: + # [1]: + # #0 0x7f4ad3702928 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 + # #1 0x7f4ad2eea39a in _sub_I_00099_1 (/home/runner/work/visp/visp/build/lib/libvisp_mbt.so.3.5+0x4e839a) + # #2 0x7f4ad40c847d (/lib64/ld-linux-x86-64.so.2+0x647d) + # + # [2]: + # #0 0x7f4ad3702928 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 + # #1 0x7f4ad1957db0 in _sub_I_00099_1 (/home/runner/work/visp/visp/build/lib/libvisp_core.so.3.5+0x6aadb0) + # #2 0x7f4ad40c847d (/lib64/ld-linux-x86-64.so.2+0x647d) + # + # ==20865==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 + # SUMMARY: AddressSanitizer: odr-violation: global 'ALIGNMENT' at /home/runner/work/visp/visp/3rdparty/simdlib/Simd/SimdLib.cpp:82:18 + ASAN_OPTIONS: detect_odr_violation=0 + working-directory: build + # When running ctest we got a lot of segfault + # This seems a bug reported in + # - https://stackoverflow.com/questions/77894856/possible-bug-in-gcc-sanitizers + # - https://stackoverflow.com/questions/77850769/fatal-threadsanitizer-unexpected-memory-mapping-when-running-on-linux-kernels + # The workaround seems to be to set vm.mmap_rnd_bits=28 + run: | + sudo cat /proc/sys/vm/mmap_rnd_bits + sudo sysctl vm.mmap_rnd_bits=28 + ctest -j$(nproc) --output-on-failure -V diff --git a/.github/workflows/ubuntu-ustk.yml b/.github/workflows/ubuntu-ustk.yml new file mode 100644 index 0000000000..6c63dd55db --- /dev/null +++ b/.github/workflows/ubuntu-ustk.yml @@ -0,0 +1,90 @@ +name: Ubuntu-ustk + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-dep-apt: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Print compiler information + run: dpkg --list | grep compiler + + - name: Install dependencies for ubuntu 20.04 + if: matrix.os != 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Install dependencies for ubuntu 22.04 + if: matrix.os == 'ubuntu-22.04' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Clone ustk-dataset + 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: Clone ustk + run: | + git clone --depth 1 https://github.com/lagadic/ustk ${HOME}/ustk + + - name: Clone ustk-sample + run: | + git clone --depth 1 https://github.com/lagadic/ustk-sample ${HOME}/ustk-sample + + - name: Configure CMake + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DVISP_CONTRIB_MODULES_PATH=${HOME}/ustk/modules + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: | + make -j$(nproc) install + + - name: Run unit tests + working-directory: build + run: ctest -j$(nproc) --output-on-failure + + - name: ViSP + UsTK as 3rdparty with cmake + run: | + cd ${HOME}/ustk-sample + mkdir ustk-sample-build + cd ustk-sample-build + cmake .. -DVISP_DIR=/tmp/usr/local/lib/cmake/visp + make -j$(nproc) diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml new file mode 100644 index 0000000000..3f77bb5762 --- /dev/null +++ b/.github/workflows/valgrind.yml @@ -0,0 +1,55 @@ +name: Ubuntu-valgrind + +# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events +on: + push: + pull_request: + schedule: + - cron: '0 2 * * SUN' + +# 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-ubuntu-valgrind: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Print system information + run: lscpu + + - name: Print OS information + run: lsb_release -a + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev valgrind + + - name: Clone visp-images + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo ${VISP_INPUT_IMAGE_PATH} + + - name: Configure CMake + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo + cat ViSP-third-party.txt + + - name: Compile + working-directory: build + run: make -j$(nproc) + + - name: Run unit tests with Valgrind + working-directory: build + run: ctest -j$(nproc) -T memcheck diff --git a/.github/workflows/windows-clang.yaml b/.github/workflows/windows-clang.yaml new file mode 100644 index 0000000000..6da3a39259 --- /dev/null +++ b/.github/workflows/windows-clang.yaml @@ -0,0 +1,84 @@ +name: Windows - clang +on: + pull_request: + push: + +# 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-clang] + + include: + - name: windows-latest-clang + os: windows-2022 + compiler: clang-cl + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Display the workspace path + working-directory: ${{ github.workspace }} + run: pwd + + - name: Clone visp-images + shell: bash + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + run: | + git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images + echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV + echo "VISP_INPUT_IMAGE_PATH: ${{ env.VISP_INPUT_IMAGE_PATH }}" + + - name: Configure ViSP + working-directory: ${{ github.workspace }} + run: | + set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }} + echo "VISP_INPUT_IMAGE_PATH: " + echo %VISP_INPUT_IMAGE_PATH% + mkdir build + cd build + cmake .. -G "Visual Studio 17 2022" -T "ClangCl" -A "x64" + type ViSP-third-party.txt + pwd + + - name: Build ViSP + working-directory: ${{ github.workspace }}\build + run: | + pwd + cmake --build . --config Release + + - name: Install ViSP + 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\ + dir ${{ github.workspace }}\build\install\x64\ + dir ${{ github.workspace }}\build\install\x64\vc17\ + 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/.github/workflows/windows-msvc.yaml b/.github/workflows/windows-msvc.yaml new file mode 100644 index 0000000000..6a0e8940af --- /dev/null +++ b/.github/workflows/windows-msvc.yaml @@ -0,0 +1,77 @@ +name: Windows - Visual 2019 +on: + pull_request: + push: + +# 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-images + shell: bash + # https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/ + 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: Configure ViSP + working-directory: ${{ github.workspace }} + run: | + set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }} + echo "VISP_INPUT_IMAGE_PATH: " + echo %VISP_INPUT_IMAGE_PATH% + mkdir build + cd build + cmake .. -G "Visual Studio 17 2022" -A "x64" + type ViSP-third-party.txt + + - name: Build ViSP + working-directory: ${{ github.workspace }}\build + run: | + cmake --build . --config Release + + - name: Install ViSP + 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 new file mode 100644 index 0000000000..414e713f88 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,94 @@ +# Specify version format +version: "3.6.1-{build}" + +image: + - Visual Studio 2022 + +# to add several platforms to build matrix +platform: + - x64 + +configuration: + - Release + +environment: + matrix: + - TARGET: mingw + # - TARGET: msvc + - TARGET: uwp + - TARGET: visp_sample + +# 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 + - set VISP_INPUT_IMAGE_PATH=C:\projects\deps\visp-images + + # visp_sample + - git clone --depth 1 https://github.com/lagadic/visp_sample + +# visp clone directory +clone_folder: C:\projects\visp\visp + +before_build: + # Setup path for mingw + # 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-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%\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%\vc17\bin + - if "%TARGET%"=="visp_sample" set PATH=%VISP_DLL_DIR%;%PATH% + +build_script: + - echo %PATH% + - dir C:\projects\deps + - dir C:\tools + - md C:\projects\visp\build + - cd C:\projects\visp\build + + # mingw case + - 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 -j2 + + # msvc case + - 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 -j2 + + # uwp case + - 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" 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 17 2022" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install + - if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% -- /m:2 From db4350072234d5a49f1da2b28e5e9c112b1505e1 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Fri, 19 Apr 2024 15:40:49 +0200 Subject: [PATCH 25/25] Add Oliver as contributor --- ChangeLog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1c7b5945be..8b069dd5c4 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,7 +8,7 @@ ViSP 3.x.x (Version in development) - Contributors: . Fabien Spindler, Romain Lagneau, Pierre Perraud, Florent Lamiraux, Samuel Felton, François Chaumette, - Souriya Trinh + Souriya Trinh, Olivier Roussel - New classes . vpPololu and vpRobotPololuPtu to control respectively a servo motor using a pololu maestro board or a 3D printed 2 dof pan-tilt unit. Visual servoing example provided in example/servo-pololu-ptu. Tests available in