-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (76 loc) · 2.68 KB
/
android.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
name: android
on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
branches: ["main"]
paths-ignore:
- "**.md"
- "LICENSE"
jobs:
android:
name: android
runs-on: ubuntu-24.04
env:
PACKAGE_NAME: libdartcv-android
COMMON_CMAKE_OPTIONS: |
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake \
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_PLATFORM=android-24 \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_STL=c++_static \
-DANDROID_ARM_NEON=ON \
-DDARTCV_WITH_VIDEOIO=ON \
steps:
- uses: actions/checkout@v4
- name: armeabi-v7a
run: |
mkdir -p build/armeabi-v7a && cd build/armeabi-v7a
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="armeabi-v7a" \
-DCMAKE_INSTALL_PREFIX="install" \
cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: arm64-v8a
run: |
mkdir -p build/arm64-v8a && cd build/arm64-v8a
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="arm64-v8a" \
-DCMAKE_INSTALL_PREFIX="install" \
cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: x86_64
run: |
mkdir -p build/x86_64 && cd build/x86_64
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="x86_64" \
-DCMAKE_INSTALL_PREFIX="install" \
cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: x86
run: |
mkdir -p build/x86 && cd build/x86
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DANDROID_ABI="x86" \
-DCMAKE_INSTALL_PREFIX="install" \
cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: package
run: |
mkdir -p ${{ env.PACKAGE_NAME }}
cp -rf build/armeabi-v7a/install ${{ env.PACKAGE_NAME }}/armeabi-v7a
cp -rf build/arm64-v8a/install ${{ env.PACKAGE_NAME }}/arm64-v8a
cp -rf build/x86_64/install ${{ env.PACKAGE_NAME }}/x86_64
cp -rf build/x86/install ${{ env.PACKAGE_NAME }}/x86
- uses: actions/upload-artifact@v4
name: upload
with:
path: ${{ env.PACKAGE_NAME }}
name: ${{ env.PACKAGE_NAME }}