-
Notifications
You must be signed in to change notification settings - Fork 4.2k
88 lines (82 loc) · 2.9 KB
/
harmonyos.yml
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
name: harmonyos
on:
push:
branches: [master]
paths:
- '.github/workflows/harmonyos.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/arm/**'
- 'src/layer/x86/**'
- 'src/layer/vulkan/**'
pull_request:
branches: [master]
paths:
- '.github/workflows/harmonyos.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/arm/**'
- 'src/layer/x86/**'
- 'src/layer/vulkan/**'
concurrency:
group: harmonyos-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: [self-hosted, linux, centos]
env:
OHOS_NDK_HOME: /data/action/osd/ohos-sdk/linux/native
OHOS_NDK_CMAKE: /data/action/osd/ohos-sdk/linux/native/build-tools/cmake/bin/cmake
NCNN_CMAKE_OPTIONS: |
-DCMAKE_TOOLCHAIN_FILE=/data/action/osd/ohos-sdk/linux/native/build/cmake/ohos.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DNCNN_SIMPLEOMP=ON \
-DNCNN_VULKAN=ON \
steps:
- uses: actions/checkout@v4
with:
submodules: true
# - name: setup-sdk
# run: |
# cd /data/action/osd
# wget -q https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz
# tar -xf ohos-sdk-windows_linux-public.tar.gz
# cd ohos-sdk/linux
# unzip -q native-linux-x64-4.1.7.8-Release.zip
- name: armeabi-v7a
run: |
mkdir build-armeabi-v7a && cd build-armeabi-v7a
${{ env.OHOS_NDK_CMAKE }} ${{ env.NCNN_CMAKE_OPTIONS }} -DOHOS_ARCH="armeabi-v7a" ..
${{ env.OHOS_NDK_CMAKE }} --build . -j 4
- name: arm64-v8a
run: |
mkdir build-arm64-v8a && cd build-arm64-v8a
${{ env.OHOS_NDK_CMAKE }} ${{ env.NCNN_CMAKE_OPTIONS }} -DOHOS_ARCH="arm64-v8a" ..
${{ env.OHOS_NDK_CMAKE }} --build . -j 4
- name: x86_64
run: |
mkdir build-x86_64 && cd build-x86_64
${{ env.OHOS_NDK_CMAKE }} ${{ env.NCNN_CMAKE_OPTIONS }} -DOHOS_ARCH="x86_64" ..
${{ env.OHOS_NDK_CMAKE }} --build . -j 4
- name: armeabi-v7a-shared
run: |
mkdir build-armeabi-v7a-shared && cd build-armeabi-v7a-shared
${{ env.OHOS_NDK_CMAKE }} ${{ env.NCNN_CMAKE_OPTIONS }} -DOHOS_ARCH="armeabi-v7a" -DNCNN_SHARED_LIB=ON ..
${{ env.OHOS_NDK_CMAKE }} --build . -j 4
- name: arm64-v8a-shared
run: |
mkdir build-arm64-v8a-shared && cd build-arm64-v8a-shared
${{ env.OHOS_NDK_CMAKE }} ${{ env.NCNN_CMAKE_OPTIONS }} -DOHOS_ARCH="arm64-v8a" -DNCNN_SHARED_LIB=ON ..
${{ env.OHOS_NDK_CMAKE }} --build . -j 4
- name: x86_64-shared
run: |
mkdir build-x86_64-shared && cd build-x86_64-shared
${{ env.OHOS_NDK_CMAKE }} ${{ env.NCNN_CMAKE_OPTIONS }} -DOHOS_ARCH="x86_64" -DNCNN_SHARED_LIB=ON ..
${{ env.OHOS_NDK_CMAKE }} --build . -j 4