-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (113 loc) · 4.31 KB
/
android.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Android
on:
workflow_call:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: stateoftheartio/qt6:6.6-android-aqt
options: --user root
timeout-minutes: 60
env:
QTOPCUA_BUILD_ARGS: "-DFEATURE_open62541_security:BOOL=ON -DFEATURE_gds:BOOL=ON"
QT_PATH: "/opt/Qt/6.6.1"
SSL_PATH: "dependencies/android_openssl/ssl_3"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get dependencies
run: ./get_dependencies.sh
- name: Build qtopcua for arm64_v8a
run: |
HOME_DIR=$(pwd)
export BUILD_ARCH=arm64_v8a
mkdir -p build
qt-cmake ./dependencies/qtopcua -G Ninja -B ./build/qtopcua \
${QTOPCUA_BUILD_ARGS} \
-DCMAKE_INSTALL_PREFIX=${QT_PATH}/android_arm64_v8a \
-DOPENSSL_INCLUDE_DIR=${HOME_DIR}/${SSL_PATH}/include/ \
-DOPENSSL_ROOT_DIR=${HOME_DIR}/${SSL_PATH}/arm64-v8a/
cmake --build ./build/qtopcua
/opt/Qt/Tools/CMake/bin/cmake --install ./build/qtopcua
rm -rf ./build/qtopcua
- name: Build qtopcua for x86
run: |
HOME_DIR=$(pwd)
export BUILD_ARCH=x86
mkdir -p build
qt-cmake ./dependencies/qtopcua -G Ninja -B ./build/qtopcua \
${QTOPCUA_BUILD_ARGS} \
-DCMAKE_INSTALL_PREFIX=${QT_PATH}/android_x86 \
-DOPENSSL_INCLUDE_DIR=${HOME_DIR}/${SSL_PATH}/include/ \
-DOPENSSL_ROOT_DIR=${HOME_DIR}/${SSL_PATH}/x86/
cmake --build ./build/qtopcua
/opt/Qt/Tools/CMake/bin/cmake --install ./build/qtopcua
rm -rf ./build/qtopcua
- name: Build qtopcua for x86_64
run: |
HOME_DIR=$(pwd)
export BUILD_ARCH=x86_64
mkdir -p build
qt-cmake ./dependencies/qtopcua -G Ninja -B ./build/qtopcua \
${QTOPCUA_BUILD_ARGS} \
-DCMAKE_INSTALL_PREFIX=${QT_PATH}/android_x86_64 \
-DOPENSSL_INCLUDE_DIR=${HOME_DIR}/${SSL_PATH}/include/ \
-DOPENSSL_ROOT_DIR=${HOME_DIR}/${SSL_PATH}/x86_64/
cmake --build ./build/qtopcua
/opt/Qt/Tools/CMake/bin/cmake --install ./build/qtopcua
rm -rf ./build/qtopcua
- name: Build qtopcua for armv7
run: |
HOME_DIR=$(pwd)
export BUILD_ARCH=armv7
mkdir -p build
qt-cmake ./dependencies/qtopcua -G Ninja -B ./build/qtopcua \
${QTOPCUA_BUILD_ARGS} \
-DCMAKE_INSTALL_PREFIX=${QT_PATH}/android_armv7 \
-DOPENSSL_INCLUDE_DIR=${HOME_DIR}/${SSL_PATH}/include/ \
-DOPENSSL_ROOT_DIR=${HOME_DIR}/${SSL_PATH}/armeabi-v7a/
cmake --build ./build/qtopcua
/opt/Qt/Tools/CMake/bin/cmake --install ./build/qtopcua
rm -rf ./build/qtopcua
- name: Build App
run: |
mkdir -p ./build/opc_ua_browser && \
qt-cmake . -G Ninja -B ./build/opc_ua_browser -DQT_ANDROID_BUILD_ALL_ABIS=ON && \
cmake --build ./build/opc_ua_browser --target aab && \
cmake --build ./build/opc_ua_browser --target apk
- uses: r0adkll/sign-android-release@v1
name: Sign app AAB
id: sign_aab
with:
releaseDirectory: build/opc_ua_browser/android-build/build/outputs/bundle/release/
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0"
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_apk
with:
releaseDirectory: build/opc_ua_browser/android-build/
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0"
- uses: actions/upload-artifact@v2
with:
name: Signed app bundle
path: ${{steps.sign_apk.outputs.signedReleaseFile}}
- uses: actions/upload-artifact@v2
with:
name: Signed app bundle
path: ${{steps.sign_aab.outputs.signedReleaseFile}}
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
releaseFiles: ${{steps.sign_aab.outputs.signedReleaseFile}}
packageName: org.basyskom.opcuabrowser
track: internal
changesNotSentForReview: true