From 919d5e706e10cc88d0f90f0df5e35b3f6e791ff6 Mon Sep 17 00:00:00 2001 From: Yang Chao Date: Sat, 30 Dec 2023 18:40:27 +0800 Subject: [PATCH] fix build error for 4.9 --- .github/workflows/build.yml | 14 ++++++++++---- Package.swift | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3b908d..cfd6df6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,13 +6,17 @@ on: jobs: build: - runs-on: macOS-latest + runs-on: macos-13 steps: + - name: Prepare Xcode + run: | + sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer + - name: actions-setup-cmake uses: jwlawson/actions-setup-cmake@v1.13.1 with: - cmake-version: 3.24 + cmake-version: 3.28 - name: Checkout uses: actions/checkout@v3 @@ -34,12 +38,14 @@ jobs: - name: Build xcframework working-directory: opencv env: - IPHONEOS_DEPLOYMENT_TARGET: 11.0 + IPHONEOS_DEPLOYMENT_TARGET: 12.0 MACOSX_DEPLOYMENT_TARGET: 10.13 run: | git apply $GITHUB_WORKSPACE/opencv-spm/opencv.patch pip3 install pathlib - python3 platforms/apple/build_xcframework.py --iphoneos_archs=arm64 --disable-bitcode -o build + python3 platforms/apple/build_xcframework.py \ + --iphoneos_archs=arm64 \ + --disable-bitcode -o build - name: Zip artifact working-directory: opencv diff --git a/Package.swift b/Package.swift index c38fe9e..ce7d46d 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let checksum = "ce65a8379a4d7428e2c09a8658110015d8f5ded79c15e3aa3b512f14bc85b7dd let package = Package( name: "OpenCV", platforms: [ - .macOS(.v10_13), .iOS(.v11), .macCatalyst(.v13) + .macOS(.v10_13), .iOS(.v12), .macCatalyst(.v13) ], products: [ .library(