-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
150 lines (142 loc) · 9.81 KB
/
.travis.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
language: java
sudo: required
dist: xenial
jdk:
- openjdk8
addons:
apt_packages:
- p7zip
cache:
directories:
- download/qt
before_install:
- openssl aes-256-cbc -K "$encrypted_14c4db58b9e2_key" -iv "$encrypted_14c4db58b9e2_iv" -in secret/jpc-android.ks.enc -out secret/jpc-android.ks -d
- export ANDROID_HOME="/home/android"
- export ANDROID_SDK_ROOT="$ANDROID_HOME"
- export ANDROID_NDK_ROOT="$ANDROID_HOME/android-ndk-r20"
- export QTDIR="/home/qt/work/install"
- export PATH="$QTDIR/bin:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
install:
# create download directories
- mkdir -p download/qt
# install Android SDK
- sudo install -d -m777 "$ANDROID_HOME"
- wget -q -c -O {download,https://dl.google.com/android/repository}/sdk-tools-linux-4333796.zip
- unzip -q -d "$ANDROID_HOME" download/sdk-tools-linux-4333796.zip
- mkdir -p ~/.android
- touch ~/.android/repositories.cfg
- yes | sdkmanager --licenses > /dev/null
- yes | sdkmanager "tools" "platform-tools" > /dev/null
- yes | sdkmanager "platforms;android-29" > /dev/null
- yes | sdkmanager "build-tools;29.0.1" > /dev/null
# install Android NDK
- wget -q -c -O {download,https://dl.google.com/android/repository}/android-ndk-r20-linux-x86_64.zip
- unzip -q -d "$ANDROID_HOME" download/android-ndk-r20-linux-x86_64.zip
# install Qt
- sudo install -d -m777 /home/qt
# Qt for Android ARMv7
- cd download/qt
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_armv7/5.13.0-0-201906171620qtbase-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARMv7.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_armv7/5.13.0-0-201906171620qtandroidextras-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARMv7.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_armv7/5.13.0-0-201906171620qttools-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARMv7.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_armv7/5.13.0-0-201906171620qtdeclarative-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARMv7.7z
- cd ../..
# Qt for Android X86
- cd download/qt
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86/5.13.0-0-201906171620qtbase-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86/5.13.0-0-201906171620qtandroidextras-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86/5.13.0-0-201906171620qttools-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86/5.13.0-0-201906171620qtdeclarative-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86.7z
- cd ../..
# Qt for Android ARM64
- cd download/qt
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_arm64_v8a/5.13.0-0-201906171620qtbase-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARM64.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_arm64_v8a/5.13.0-0-201906171620qtandroidextras-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARM64.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_arm64_v8a/5.13.0-0-201906171620qttools-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARM64.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_arm64_v8a/5.13.0-0-201906171620qtdeclarative-Linux-RHEL_7_6-Clang-Android-Android_ANY-ARM64.7z
- cd ../..
# Qt for Android X86_64
- cd download/qt
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86_64/5.13.0-0-201906171620qtbase-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86_64.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86_64/5.13.0-0-201906171620qtandroidextras-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86_64.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86_64/5.13.0-0-201906171620qttools-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86_64.7z
- wget -q -c https://download.qt.io/online/qtsdkrepository/linux_x64/android/qt5_5130/qt.qt5.5130.android_x86_64/5.13.0-0-201906171620qtdeclarative-Linux-RHEL_7_6-Clang-Android-Android_ANY-X86_64.7z
- cd ../..
script:
# prepare Qt Android ARMv7
- for f in download/qt/*-ARMv7.7z; do 7zr x -o/home/qt "$f" > /dev/null; done
- mkdir -p /home/qt/work
- ln -s ../5.13.0/android_armv7 /home/qt/work/install
- sed -i 's/^QT_EDITION =.*/QT_EDITION = OpenSource/' /home/qt/work/install/mkspecs/qconfig.pri
- sed -i 's/^QT_LICHECK =.*/QT_LICHECK =/' /home/qt/work/install/mkspecs/qconfig.pri
# build Android ARMv7
- mkdir -p build
- cd build
- QMAKESPEC="$QTDIR/mkspecs/android-clang" qmake CONFIG+=release QMAKE_LINK+=-nostdlib++ ../mpe-surface.pro
- cd ..
- make -C build install INSTALL_ROOT=android-build
- androiddeployqt --input build/android-libmpe-surface.so-deployment-settings.json --output build/android-build --gradle --sign secret/jpc-android.ks jpc-android --storepass "$KEYSTORE_PASS"
- install -D -m 644 build/android-build/build/outputs/apk/release/android-build-release-signed.apk releases/mpe-surface-android_armv7.apk
- rm -rf build
- rm -rf /home/qt/*
# prepare Qt Android X86
- for f in download/qt/*-X86.7z; do 7zr x -o/home/qt "$f" > /dev/null; done
- mkdir -p /home/qt/work
- ln -s ../5.13.0/android_x86 /home/qt/work/install
- sed -i 's/^QT_EDITION =.*/QT_EDITION = OpenSource/' /home/qt/work/install/mkspecs/qconfig.pri
- sed -i 's/^QT_LICHECK =.*/QT_LICHECK =/' /home/qt/work/install/mkspecs/qconfig.pri
# build Android X86
- mkdir -p build
- cd build
- QMAKESPEC="$QTDIR/mkspecs/android-clang" qmake CONFIG+=release QMAKE_LINK+=-nostdlib++ ../mpe-surface.pro
- cd ..
- make -C build install INSTALL_ROOT=android-build
- androiddeployqt --input build/android-libmpe-surface.so-deployment-settings.json --output build/android-build --gradle --sign secret/jpc-android.ks jpc-android --storepass "$KEYSTORE_PASS"
- install -D -m 644 build/android-build/build/outputs/apk/release/android-build-release-signed.apk releases/mpe-surface-android_x86.apk
- rm -rf build
- rm -rf /home/qt/*
# prepare Qt Android ARM64
- for f in download/qt/*-ARM64.7z; do 7zr x -o/home/qt "$f" > /dev/null; done
- mkdir -p /home/qt/work
- ln -s ../5.13.0/android_arm64_v8a /home/qt/work/install
- sed -i 's/^QT_EDITION =.*/QT_EDITION = OpenSource/' /home/qt/work/install/mkspecs/qconfig.pri
- sed -i 's/^QT_LICHECK =.*/QT_LICHECK =/' /home/qt/work/install/mkspecs/qconfig.pri
# build Android ARM64
- mkdir -p build
- cd build
- QMAKESPEC="$QTDIR/mkspecs/android-clang" qmake CONFIG+=release QMAKE_LINK+=-nostdlib++ ../mpe-surface.pro
- cd ..
- make -C build install INSTALL_ROOT=android-build
- androiddeployqt --input build/android-libmpe-surface.so-deployment-settings.json --output build/android-build --gradle --sign secret/jpc-android.ks jpc-android --storepass "$KEYSTORE_PASS"
- install -D -m 644 build/android-build/build/outputs/apk/release/android-build-release-signed.apk releases/mpe-surface-android_arm64.apk
- rm -rf build
- rm -rf /home/qt/*
# prepare Qt Android X86_64
- for f in download/qt/*-X86_64.7z; do 7zr x -o/home/qt "$f" > /dev/null; done
- mkdir -p /home/qt/work
- ln -s ../5.13.0/android_x86_64 /home/qt/work/install
- sed -i 's/^QT_EDITION =.*/QT_EDITION = OpenSource/' /home/qt/work/install/mkspecs/qconfig.pri
- sed -i 's/^QT_LICHECK =.*/QT_LICHECK =/' /home/qt/work/install/mkspecs/qconfig.pri
# build Android X86_64
- mkdir -p build
- cd build
- QMAKESPEC="$QTDIR/mkspecs/android-clang" qmake CONFIG+=release QMAKE_LINK+=-nostdlib++ ../mpe-surface.pro
- cd ..
- make -C build install INSTALL_ROOT=android-build
- androiddeployqt --input build/android-libmpe-surface.so-deployment-settings.json --output build/android-build --gradle --sign secret/jpc-android.ks jpc-android --storepass "$KEYSTORE_PASS"
- install -D -m 644 build/android-build/build/outputs/apk/release/android-build-release-signed.apk releases/mpe-surface-android_x86_64.apk
- rm -rf build
- rm -rf /home/qt/*
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file: releases/*
file_glob: true
skip_cleanup: true
overwrite: true
on:
tags: true
env:
global:
- secure: VRJ4GAftmgO1cfqOdWsYo1edn9tOMQeo2cyTEjqb2x2+ub+blX5nu6Di3h9G5HpLLQ057bTb06VcS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