Include binary install of OpenCV 4.2.0 on Ubuntu 20.04 in testing
MODIFY
.github/workflows/opencv-rust.yml
.github/workflows/opencv-rust.yml
@@ -135,44 +135,36 @@ jobs:
family: osx
- image: windows-2019
family: windows
- - image: ubuntu-18.04
- family: linux
rust:
- stable
- beta
version:
- - branch: 3.2
- opencv: 3.2.0
- brew: "excluded"
- branch: 3.4
opencv: 3.4.15
brew: "@3"
- branch: 4
opencv: 4.5.3
brew: "@4"
- exclude:
- - os:
- family: osx
- version:
- branch: 3.2
- - os:
- family: windows
- version:
- branch: 3.2
+ include:
- os:
+ image: ubuntu-18.04
family: linux
+ rust: stable
version:
- branch: 3.4
+ opencv: 3.2.0
+ brew: excluded
- os:
+ image: ubuntu-20.04
family: linux
+ rust: stable
version:
- branch: 4
+ opencv: 4.2.0
+ brew: excluded
runs-on: ${{ matrix.os.image }}
env:
OS_FAMILY: ${{ matrix.os.family }}
RUST_TOOLCHAIN: ${{ matrix.rust }}
OPENCV_VERSION: ${{ matrix.version.opencv }}
- CHOCO_OPENCV_VERSION: ${{ matrix.version.opencv }}
BREW_OPENCV_VERSION: ${{ matrix.version.brew }}
steps:
- uses: actions/checkout@v2

MODIFY
ci/install-bionic.sh
ci/install-bionic.sh
@@ -8,4 +8,4 @@ sudo apt-get install -y clang
# workaround to make clang_sys crate detect installed libclang
sudo ln -s libclang.so.1 /usr/lib/llvm-6.0/lib/libclang.so
-sudo apt-get -y install libopencv-dev=3.2.0*
+sudo apt-get -y install "libopencv-dev=${OPENCV_VERSION}*"

MODIFY
ci/install-focal.sh
ci/install-focal.sh
@@ -9,6 +9,9 @@ sudo apt-get install -y clang
sudo ln -s libclang.so.1 /usr/lib/llvm-10/lib/libclang.so
# runtime deps
+if [[ "$OPENCV_VERSION" == "4.2.0" ]]; then
+ sudo apt-get -y install "libopencv-dev=${OPENCV_VERSION}*"
+else
sudo apt-get -y install \
libatlas3-base \
libavcodec58 \
@@ -181,3 +184,4 @@ cmake $BUILD_FLAGS \
make -j"$(nproc)"
sudo make -j"$(nproc)" install
popd > /dev/null
+fi

MODIFY
ci/install-windows-chocolatey.sh
ci/install-windows-chocolatey.sh
set -vex
choco install -y llvm --version 13.0.0
-choco install -y opencv --version "$CHOCO_OPENCV_VERSION"
+choco install -y opencv --version "$OPENCV_VERSION"

MODIFY
ci/install.sh
ci/install.sh
@@ -19,9 +19,9 @@ elif [[ "$OS_FAMILY" == "osx" ]]; then
"$ci_dir/install-macos-framework.sh"
fi
elif [[ "$OS_FAMILY" == "windows" ]]; then
- if [[ "$CHOCO_OPENCV_VERSION" != "" ]]; then # chocolatey build
- "$ci_dir/install-windows-chocolatey.sh"
- else # vcpkg build
+ if [[ "$VCPKG_OPENCV_VERSION" != "" ]]; then # vcpkg build
"$ci_dir/install-windows-vcpkg.sh"
+ else # chocolatey build
+ "$ci_dir/install-windows-chocolatey.sh"
fi
fi

MODIFY
ci/script.sh
ci/script.sh
@@ -5,16 +5,16 @@ set -vex
if [[ "$OS_FAMILY" == "windows" ]]; then
export PATH="/C/Program Files/LLVM/bin:$PATH"
export LIBCLANG_PATH="/C/Program Files/LLVM/bin"
- if [[ "$CHOCO_OPENCV_VERSION" != "" ]]; then # chocolatey build
- export PATH="/C/tools/opencv/build/x64/vc15/bin:$PATH"
- export OPENCV_LINK_PATHS="/C/tools/opencv/build/x64/vc15/lib"
- export OPENCV_LINK_LIBS="opencv_world${CHOCO_OPENCV_VERSION//./}"
- export OPENCV_INCLUDE_PATHS="/C/tools/opencv/build/include"
- else # vcpkg build
+ if [[ "$VCPKG_OPENCV_VERSION" != "" ]]; then # vcpkg build
export VCPKGRS_DYNAMIC=1
export VCPKG_ROOT="$HOME/build/vcpkg"
echo "=== Installed vcpkg packages:"
"$VCPKG_ROOT/vcpkg" list
+ else # chocolatey build
+ export PATH="/C/tools/opencv/build/x64/vc15/bin:$PATH"
+ export OPENCV_LINK_PATHS="/C/tools/opencv/build/x64/vc15/lib"
+ export OPENCV_LINK_LIBS="opencv_world${OPENCV_VERSION//./}"
+ export OPENCV_INCLUDE_PATHS="/C/tools/opencv/build/include"
fi
echo "=== Installed chocolatey packages:"
choco list --local-only

DELETE
ci/xenial-install-opencv.sh
-#!/bin/bash
-
-set -ex
-
-BUILD_FLAGS="
- -D BUILD_CUDA_STUBS=OFF
- -D BUILD_DOCS=OFF
- -D BUILD_EXAMPLES=OFF
- -D BUILD_IPP_IW=ON
- -D BUILD_ITT=ON
- -D BUILD_JASPER=OFF
- -D BUILD_JAVA=OFF
- -D BUILD_JPEG=OFF
- -D BUILD_OPENEXR=OFF
- -D BUILD_PERF_TESTS=OFF
- -D BUILD_PNG=OFF
- -D BUILD_PROTOBUF=ON
- -D BUILD_SHARED_LIBS=ON
- -D BUILD_TBB=OFF
- -D BUILD_TESTS=OFF
- -D BUILD_TIFF=OFF
- -D BUILD_WEBP=OFF
- -D BUILD_WITH_DEBUG_INFO=OFF
- -D BUILD_WITH_DYNAMIC_IPP=OFF
- -D BUILD_ZLIB=OFF
- -D BUILD_opencv_apps=ALL
- -D BUILD_opencv_python2=OFF
- -D BUILD_opencv_python3=OFF
- -D CMAKE_BUILD_TYPE=Release
- -D CMAKE_INSTALL_PREFIX=/usr
- -D CV_DISABLE_OPTIMIZATION=OFF
- -D ENABLE_CONFIG_VERIFICATION=OFF
- -D ENABLE_FAST_MATH=OFF
- -D CV_ENABLE_INTRINSICS=ON
- -D ENABLE_LTO=OFF
- -D ENABLE_PIC=ON
- -D INSTALL_CREATE_DISTRIB=OFF
- -D INSTALL_PYTHON_EXAMPLES=OFF
- -D INSTALL_C_EXAMPLES=OFF
- -D INSTALL_TESTS=OFF
- -D OPENCV_ENABLE_NONFREE=ON
- -D OPENCV_FORCE_3RDPARTY_BUILD=OFF
- -D OPENCV_GENERATE_PKGCONFIG=ON
- -D PROTOBUF_UPDATE_FILES=OFF
- -D WITH_1394=ON
- -D WITH_ADE=ON
- -D WITH_ARAVIS=OFF
- -D WITH_CLP=OFF
- -D WITH_CUDA=OFF
- -D WITH_EIGEN=ON
- -D WITH_FFMPEG=ON
- -D WITH_GDAL=ON
- -D WITH_GDCM=OFF
- -D WITH_GIGEAPI=OFF
- -D WITH_GPHOTO2=ON
- -D WITH_GSTREAMER=ON
- -D WITH_GSTREAMER_0_10=OFF
- -D WITH_GTK=OFF
- -D WITH_GTK_2_X=OFF
- -D WITH_HALIDE=OFF
- -D WITH_IMGCODEC_HDcR=ON
- -D WITH_IMGCODEC_PXM=ON
- -D WITH_IMGCODEC_SUNRASTER=ON
- -D WITH_INF_ENGINE=OFF
- -D WITH_IPP=ON
- -D WITH_ITT=ON
- -D WITH_JASPER=OFF
- -D WITH_JPEG=ON
- -D WITH_LAPACK=ON
- -D WITH_LIBV4L=OFF
- -D WITH_MATLAB=OFF
- -D WITH_MFX=OFF
- -D WITH_OPENCL=ON
- -D WITH_OPENCLAMDBLAS=ON
- -D WITH_OPENCLAMDFFT=ON
- -D WITH_OPENCL_SVM=ON
- -D WITH_OPENEXR=ON
- -D WITH_OPENGL=ON
- -D WITH_OPENMP=OFF
- -D WITH_OPENNI=OFF
- -D WITH_OPENNI2=OFF
- -D WITH_OPENVX=OFF
- -D WITH_PNG=ON
- -D WITH_PROTOBUF=ON
- -D WITH_PTHREADS_PF=ON
- -D WITH_PVAPI=OFF
- -D WITH_QT=ON
- -D WITH_QUIRC=ON
- -D WITH_TBB=ON
- -D WITH_TIFF=ON
- -D WITH_UNICAP=OFF
- -D WITH_V4L=ON
- -D WITH_VA=ON
- -D WITH_VA_INTEL=ON
- -D WITH_VTK=ON
- -D WITH_WEBP=ON
- -D WITH_XIMEA=OFF
- -D WITH_XINE=OFF"
-
-mkdir -p ~/build/opencv
-
-curl -L "https://github.com/opencv/opencv/archive/$OPENCV_VERSION.tar.gz" | tar -xzC ~/build/opencv
-if [[ "$OPENCV_VERSION" == "3.2.0" ]]; then
- curl -L https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/9228.patch | patch -p1 -d ~/"build/opencv/opencv-$OPENCV_VERSION"
-fi
-curl -L "https://github.com/opencv/opencv_contrib/archive/$OPENCV_VERSION.tar.gz" | tar -xzC ~/build/opencv
-
-mkdir -p ~/"build/opencv/opencv-$OPENCV_VERSION-build"
-pushd ~/"build/opencv/opencv-$OPENCV_VERSION-build" > /dev/null
-cmake $BUILD_FLAGS \
- -D CMAKE_INSTALL_PREFIX=/usr \
- -D OPENCV_EXTRA_MODULES_PATH=~/"build/opencv/opencv_contrib-$OPENCV_VERSION/modules" \
- ~/"build/opencv/opencv-$OPENCV_VERSION"
-sudo make -j"$(nproc)" install
-tree .
-popd > /dev/null

Include binary install of OpenCV 4.2.0 on Ubuntu 20.04 in testing