improve vcpkg ci (still times out in travis)
MODIFY
.travis.yml
.travis.yml
@@ -12,6 +12,7 @@ cache:
cargo: false
directories:
- $HOME/build/opencv
+ - $TRAVIS_BUILD_DIR/vcpkg
language: rust
rust:

MODIFY
ci/install-windows-chocolatey.sh
ci/install-windows-chocolatey.sh
set -vex
-choco install -y python3 --version "3.7.5"
+choco install -y python3 --version 3.7.5
choco install -y opencv --version "$CHOCO_OPENCV_VERSION"

MODIFY
ci/install-windows-vcpkg.sh
ci/install-windows-vcpkg.sh
set -vex
-choco install -y ninja
-choco install -y mingw --version "7.3.0"
-choco install -y python3 --version "3.7.5"
+choco install -y python3 --version 3.7.5
-export PATH="$PATH:C:\\ProgramData\\chocolatey\\lib\\ninja\\tools"
git clone https://github.com/Microsoft/vcpkg.git --depth=1
pushd vcpkg
-./scripts/bootstrap.sh --disableMetrics --useSystemBinaries
-./vcpkg integrate install
+cmd "/C bootstrap-vcpkg.bat -disableMetrics"
+#./vcpkg integrate install
echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-windows.cmake
echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x86-windows.cmake
export VCPKG_DEFAULT_TRIPLET=x64-windows
+# this is going to output something to console while opencv builds
+# otherwise travis terminates job because of terminal inactivity
+( while true; do sleep 5m; done ) &
./vcpkg install "opencv${VCPKG_OPENCV_VERSION}[contrib,nonfree]"
+kill $(jobs -p)
popd

MODIFY
ci/script.sh
ci/script.sh
@@ -12,6 +12,7 @@ if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
export OPENCV_HEADER_DIR="C:\\tools\\opencv\\build\\include"
else # vcpkg build
export VCPKG_ROOT="$TRAVIS_BUILD_DIR\\vcpkg"
+ export PATH="$PATH:$VCPKG_ROOT\\installed\\x64-windows\\bin"
export VCPKGRS_DYNAMIC=1
fi
CARGO_FEATURES="$CARGO_FEATURES,buildtime-bindgen"

improve vcpkg ci (still times out in travis)