From f6cc2732fbe4e4480abba42d7487b03183dcbc7a Mon Sep 17 00:00:00 2001 From: Souriya Trinh Date: Tue, 7 May 2024 14:58:36 +0200 Subject: [PATCH] [DEBUG] --- .github/workflows/conda/environment_linux.yml | 19 -- .github/workflows/conda/environment_macos.yml | 19 -- .../workflows/conda/environment_windows.yml | 17 -- .github/workflows/coverage.yml | 85 --------- .github/workflows/ios.yml | 43 ----- .github/workflows/macos-linux-conda.yml | 103 ----------- .github/workflows/macos-ustk.yml | 90 --------- .github/workflows/macos.yml | 129 ------------- .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/ubuntu-venv.yml | 78 -------- .github/workflows/valgrind.yml | 55 ------ .github/workflows/windows-clang.yaml | 84 --------- .github/workflows/windows-conda.yml | 94 ---------- .github/workflows/windows-msvc.yaml | 77 -------- modules/core/test/tools/io/testNPZ.cpp | 43 +++++ 21 files changed, 43 insertions(+), 1588 deletions(-) delete mode 100644 .github/workflows/conda/environment_linux.yml delete mode 100644 .github/workflows/conda/environment_macos.yml delete mode 100644 .github/workflows/conda/environment_windows.yml delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/ios.yml delete mode 100644 .github/workflows/macos-linux-conda.yml delete mode 100644 .github/workflows/macos-ustk.yml delete mode 100644 .github/workflows/macos.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/ubuntu-venv.yml delete mode 100644 .github/workflows/valgrind.yml delete mode 100644 .github/workflows/windows-clang.yaml delete mode 100644 .github/workflows/windows-conda.yml delete mode 100644 .github/workflows/windows-msvc.yaml diff --git a/.github/workflows/conda/environment_linux.yml b/.github/workflows/conda/environment_linux.yml deleted file mode 100644 index 0ee6f44a19..0000000000 --- a/.github/workflows/conda/environment_linux.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: visp -channels: - - conda-forge -dependencies: - - cxx-compiler - - cmake - - ninja - - xorg-libx11 - - xorg-libxfixes - - mesa-libegl-cos7-x86_64 - - libxml2 - - libdc1394 >=2.2.6 - - librealsense - - libgomp - - eigen - - libjpeg-turbo - - libpng - - mkl-devel - - pybind11 diff --git a/.github/workflows/conda/environment_macos.yml b/.github/workflows/conda/environment_macos.yml deleted file mode 100644 index e0c9093308..0000000000 --- a/.github/workflows/conda/environment_macos.yml +++ /dev/null @@ -1,19 +0,0 @@ -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/conda/environment_windows.yml b/.github/workflows/conda/environment_windows.yml deleted file mode 100644 index 03836476ca..0000000000 --- a/.github/workflows/conda/environment_windows.yml +++ /dev/null @@ -1,17 +0,0 @@ -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/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-linux-conda.yml b/.github/workflows/macos-linux-conda.yml deleted file mode 100644 index 1bb7047061..0000000000 --- a/.github/workflows/macos-linux-conda.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: MacOS-Linux-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", "macos-latest"] - build_type: [Release] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install miniconda on ubuntu - uses: conda-incubator/setup-miniconda@v3 - if: startsWith(matrix.os,'ubuntu') == true - 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: Install miniconda on macOS - 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: Show conda config - shell: bash -el {0} - run: | - conda info - conda list - conda config --show-sources - 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 - - cmake .. \ - -G "Ninja" \ - -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ - -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ - -DBUILD_TESTS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_TUTORIALS=OFF \ - -DBUILD_APPS=OFF \ - -DBUILD_DEMOS=OFF \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - - # Build - cmake --build . --parallel ${NPROC} --target visp_python_bindings - - # Tests - cmake --build . --parallel ${NPROC} --target visp_python_bindings_test - - 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) }} 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/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/ubuntu-venv.yml b/.github/workflows/ubuntu-venv.yml deleted file mode 100644 index 89b37b7dd3..0000000000 --- a/.github/workflows/ubuntu-venv.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Ubuntu-python-bindings-venv - -# 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: 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 - sudo apt-get install libopencv-dev nlohmann-json3-dev - sudo apt-get install python3 - - - name: Upgrade pip3 - run: | - python3 -m pip install --upgrade pip - - - name: pip3 version - run: | - pip3 --version - - - name: Install virtualenv - run: | - pip3 install virtualenv - - - name: Setup PATH - run: | - echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV - echo ${PATH} - - - name: Create build folder - run: | - mkdir build - cd build - - - name: Build Python bindings - working-directory: build - run: | - echo "Create virtual env" - virtualenv venv - echo "Activate virtual env" - . venv/bin/activate - echo "Install pybind11" - pip install pybind11[global] - echo "Configure" - cmake .. -DBUILD_DEPRECATED_FUNCTIONS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TUTORIALS=OFF -DBUILD_TESTS=OFF -DBUILD_APPS=OFF -DBUILD_DEMOS=OFF - echo "Build python bindings" - make -j$(nproc) visp_python_bindings - echo "Build python tests" - make -j$(nproc) visp_python_bindings_test - echo "Build python doc" - make -j$(nproc) visp_python_bindings_doc 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-conda.yml b/.github/workflows/windows-conda.yml deleted file mode 100644 index 410d323c62..0000000000 --- a/.github/workflows/windows-conda.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Windows-conda-CI - -on: [push,pull_request] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - visp-conda: - name: ${{ matrix.os }} ${{ matrix.compiler }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }} - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: ["windows-latest"] - compiler: ["cl", "clang-cl"] - build_type: [Release] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install miniconda on windows - 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 ^ - -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 }} - 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 - - :: Tests - cmake --build . --target visp_python_bindings_test - 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) }} 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/modules/core/test/tools/io/testNPZ.cpp b/modules/core/test/tools/io/testNPZ.cpp index ce7006cc06..fc38a35583 100644 --- a/modules/core/test/tools/io/testNPZ.cpp +++ b/modules/core/test/tools/io/testNPZ.cpp @@ -142,6 +142,49 @@ TEMPLATE_LIST_TEST_CASE("Test visp::cnpy::npy_load/npz_save", "[BasicTypes][list int main(int argc, char *argv[]) { + // DEBUG: + { + std::string directory_filename = createTmpDir(); + std::string npz_filename = directory_filename + "/test_npz_read_write.npz"; + + { + const std::string save_string = "Open Source Visual Servoing Platform"; + std::vector vec_save_string(save_string.begin(), save_string.end()); + // Manually add a null-terminated character + // https://stackoverflow.com/a/8247804 + vec_save_string.push_back('\0'); + const std::string identifier = "String"; + visp::cnpy::npz_save(npz_filename, identifier, &vec_save_string[0], { vec_save_string.size() }, "w"); + + visp::cnpy::npz_t npz_data = visp::cnpy::npz_load(npz_filename); + visp::cnpy::NpyArray arr_string_data = npz_data[identifier]; + const std::string read_string = std::string(arr_string_data.data()); + std::cout << "(save_string == read_string)=" << (save_string == read_string) << std::endl; + } + { + size_t height = 5, width = 7, channels = 3; + std::vector save_vec; + save_vec.reserve(height*width*channels); + for (size_t i = 0; i < height*width*channels; i++) { + save_vec.push_back(i); + } + + const std::string identifier = "Array"; + visp::cnpy::npz_save(npz_filename, identifier, &save_vec[0], { height, width, channels }, "a"); // append + visp::cnpy::npz_t npz_data = visp::cnpy::npz_load(npz_filename); + visp::cnpy::NpyArray arr_vec_data = npz_data[identifier]; + std::vector read_vec = arr_vec_data.as_vec(); + + std::cout << "(save_vec.size() == read_vec.size())=" << (save_vec.size() == read_vec.size()) << std::endl; + for (size_t i = 0; i < read_vec.size(); i++) { + if (save_vec[i] != read_vec[i]) { + std::cerr << "save_vec[i]=" << save_vec[i] << " ; read_vec[i]=" << read_vec[i] << std::endl; + } + } + } + } + + Catch::Session session; // There must be exactly one instance // Let Catch (using Clara) parse the command line