-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (85 loc) · 2.45 KB
/
apple.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: apple
on:
push:
tags:
- "*.*.*"
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
IOS_DEPLOYMENT_TARGET: "12.0"
MAC_DEPLOYMENT_TARGET: "10.15"
ENABLE_BITCODE: OFF
ENABLE_ARC: OFF
ENABLE_VISIBILITY: OFF
FFMPEG_ROOT: /tmp/ffmpeg
SOURCE_DIR: opencv
OPENCV_SUBDIR: lib/cmake/opencv4
jobs:
macos:
name: macos
strategy:
matrix:
osname:
- {os: macos-13, arch: x64, platform: MAC}
- {os: macos-14, arch: arm64, platform: MAC_ARM64}
runs-on: ${{ matrix.osname.os }}
env:
PACKAGE_NAME: libdartcv-macos-${{ matrix.osname.arch }}
steps:
- uses: actions/checkout@v4
- name: build
run: |
mkdir -p build && cd build
cmake -S ${{ github.workspace }} \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/ios.toolchain.cmake \
-DPLATFORM=${{ matrix.osname.platform }} \
-DDEPLOYMENT_TARGET=$MAC_DEPLOYMENT_TARGET \
-DENABLE_BITCODE=OFF \
-DENABLE_ARC=$ENABLE_ARC \
-DENABLE_VISIBILITY=$ENABLE_VISIBILITY \
-DCMAKE_INSTALL_PREFIX=install \
-DDARTCV_WITH_VIDEOIO=ON \
-DDARTCV_WITH_HIGHGUI=ON \
-DDARTCV_ENABLE_INSTALL=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release -j $(nproc) --target install
- uses: actions/upload-artifact@v4
name: upload
with:
path: build/install
name: ${{ env.PACKAGE_NAME }}
- name: package
run: |
tar -C build/install -zcf ${{ env.PACKAGE_NAME }}.tar.gz .
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
prerelease: false
files: |
${{ env.PACKAGE_NAME }}.tar.gz
- name: macos
run: |
pod lib lint DartCvMacOS.podspec --allow-warnings
ios:
name: ios
strategy:
matrix:
osname:
- {os: macos-13, arch: x64, platform: MAC}
- {os: macos-14, arch: arm64, platform: MAC_ARM64}
runs-on: ${{ matrix.osname.os }}
steps:
- uses: actions/checkout@v4
- name: ios
run: |
pod lib lint DartCvIOS.podspec --allow-warnings