Skip to content

Commit

Permalink
Bump CI
Browse files Browse the repository at this point in the history
  • Loading branch information
twistedfall committed Aug 29, 2024
1 parent 94b7727 commit 507a439
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/opencv-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,21 @@ jobs:
matrix:
os-image:
- ubuntu-22.04
- macos-13
- macos-14
opencv-version:
- 3.4.20
- 4.10.0
linkage:
- dynamic
include:
- os-image: ubuntu-22.04
opencv-version: 4.10.0
linkage: static
- os-image: ubuntu-22.04
opencv-version: 3.4.20
linkage: dynamic
- os-image: macos-13
opencv-version: 3.4.20
linkage: dynamic
runs-on: ${{ matrix.os-image }}
env:
Atlas_ROOT_DIR: /usr/include/ # for cmake to find lapacke.h
Expand Down
3 changes: 2 additions & 1 deletion ci/install-macos-brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ brew -v update
brew upgrade --force --display-times
brew list --versions
brew -v install --force --display-times opencv"$BREW_OPENCV_VERSION"
brew link opencv"$BREW_OPENCV_VERSION"
brew -v link opencv"$BREW_OPENCV_VERSION"
brew -v link --force rustup
8 changes: 8 additions & 0 deletions ci/install-macos-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -xeu

macos_version="$(sw_vers -productVersion)"

dist_dir="$HOME/dist/"
base_dir="$HOME/build/opencv/"
build_dir="$base_dir/opencv-$OPENCV_VERSION-build/"
Expand All @@ -23,7 +25,13 @@ if [ ! -d "$opencv_contrib_src" ]; then
curl -L "https://github.com/opencv/opencv_contrib/archive/$OPENCV_VERSION.tar.gz" | tar -xz -C "$dist_dir"
fi

if [[ "$OPENCV_VERSION" == "3.4.20" ]]; then # old OpenCV doesn't support choosing archs
arch_arg=
else
arch_arg="--macos_archs $(uname -m)"
fi
python "$opencv_src/platforms/osx/build_framework.py" \
--contrib "$opencv_contrib_src" \
--enable_nonfree \
$arch_arg \
"$build_dir"
13 changes: 10 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ elif [[ "$os_family" == "macOS" ]]; then
elif [[ "${BREW_OPENCV_VERSION:-}" != "" ]]; then # brew build
true
else # framework build
opencv_build_path="$HOME/build/opencv/opencv-$OPENCV_VERSION-build"
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$opencv_build_path/build/build-$(uname -m)-macosx/install/lib/"
clang_dir="$(clang --print-search-dirs | awk -F= '/^libraries: =/ { print $2 }')"
export OPENCV_LINK_PATHS="$HOME/build/opencv/opencv-$OPENCV_VERSION-build,$clang_dir/lib/darwin"
export OPENCV_LINK_LIBS="opencv2.framework,OpenCL.framework,Cocoa.framework,Accelerate.framework,AVFoundation.framework,CoreGraphics.framework,CoreMedia.framework,CoreVideo.framework,QuartzCore.framework,clang_rt.osx"
export OPENCV_INCLUDE_PATHS="$HOME/build/opencv/opencv-$OPENCV_VERSION-build"
if [[ "$OPENCV_VERSION" == "3.4.20" ]]; then
export OPENCV_LINK_PATHS="$opencv_build_path,$clang_dir/lib/darwin"
export OPENCV_LINK_LIBS="opencv2.framework,OpenCL.framework,Cocoa.framework,Accelerate.framework,AVFoundation.framework,CoreGraphics.framework,CoreMedia.framework,CoreVideo.framework,QuartzCore.framework,clang_rt.osx"
else
export OPENCV_LINK_PATHS="$opencv_build_path,$clang_dir/lib/darwin,$opencv_build_path/build/build-$(uname -m)-macosx/install/lib/"
export OPENCV_LINK_LIBS="opencv2.framework,OpenCL.framework,Cocoa.framework,Accelerate.framework,AVFoundation.framework,CoreGraphics.framework,CoreMedia.framework,CoreVideo.framework,QuartzCore.framework,clang_rt.osx,OrbbecSDK"
fi
export OPENCV_INCLUDE_PATHS="$opencv_build_path"
fi
echo "=== Installed brew packages:"
brew list --versions
Expand Down

0 comments on commit 507a439

Please sign in to comment.