-
-
Notifications
You must be signed in to change notification settings - Fork 83
164 lines (134 loc) · 4.69 KB
/
ci.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CI
on: [push]
jobs:
build-linux-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup
run: |
cd ..
WROOT=$(readlink -f .)
echo "::set-env name=WORK::${WROOT}"
echo "::set-env name=ANDROID_SDK_HOME::${WROOT}/sdk"
echo "::set-env name=ANDROID_NDK_HOME::${WROOT}/ndk"
echo "::set-env name=ANDROID_NDK_VERSION::r20b"
echo "::set-env name=ANDROID_VERSION::28"
echo "::set-env name=ANDROID_BUILD_TOOLS_VERSION::28.0.3"
echo "::set-env name=GRADLE_VERSION::4.10.3"
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 5.12.6
target: android
arch: android_armv7
- name: Install Android NDK
run: |
cd ..
curl -L https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip -o ndk.zip
unzip ndk.zip
mv android-ndk-${ANDROID_NDK_VERSION} ndk
- name: Install Android SDK
run: |
cd ..
curl -L https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -o sdk.zip
unzip sdk.zip
yes | ./tools/bin/sdkmanager --licenses --sdk_root=${ANDROID_SDK_HOME}
./tools/bin/sdkmanager --update
yes | ./tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "platforms;android-${ANDROID_VERSION}" "platform-tools" --sdk_root=${ANDROID_SDK_HOME}
- name: Install Gradle
run: |
cd ..
curl -L https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip -o gradle.zip
unzip gradle.zip
mv gradle-${GRADLE_VERSION} gradle
- name: Install Firebase C++ SDK
run: |
cd ..
curl -L https://firebase.google.com/download/cpp -o firebase_cpp_sdk.zip
unzip firebase_cpp_sdk.zip
#- name: Install QtFirebase
# run: |
# cd ..
# git clone https://github.com/Larpon/QtFirebase.git
- name: Install QtFirebaseExample
run: |
cd ..
git clone https://github.com/Larpon/QtFirebaseExample.git
- name: Connect projects
run: |
cd ..
ln -s ${WORK}/firebase_cpp_sdk ${WORK}/QtFirebase/firebase_cpp_sdk
ln -s ${WORK}/QtFirebase ${WORK}/QtFirebaseExample/extensions/QtFirebase
- name: Setup ENV
run: |
echo "--- Setup PATH ---"
PATH=${PATH}:${WORK}/gradle/bin:${WORK}/ndk
echo "::set-env name=PATH::${PATH}"
echo "PATH: ${PATH}"
echo "--- Set ANDROID ENV ---"
echo "::set-env name=ANDROID_HOME::${ANDROID_SDK_HOME}"
echo "::set-env name=ANDROID_SDK_ROOT::${ANDROID_SDK_HOME}"
echo "::set-env name=ANDROID_NDK_ROOT::${ANDROID_NDK_HOME}"
echo "${ANDROID_NDK_ROOT}"
#echo "::set-env name=ANDROID_NDK_HOST::linux-x86_64"
#echo "::set-env name=ANDROID_NDK_PLATFORM::android-28"
#echo "::set-env name=ANDROID_NDK_TOOLCHAIN_PREFIX::arm-linux-androideabi"
#echo "::set-env name=ANDROID_NDK_TOOLCHAIN_VERSION::4.9"
#echo "::set-env name=ANDROID_NDK_TOOLS_PREFIX::arm-linux-androideabi"
- name: Run QMake
run: |
cd ..
echo "--- Run QMake ---"
cd "QtFirebaseExample/"
mkdir build && cd build
${Qt5_Dir}/bin/qmake ../
- name: Run Make
run: |
cd ..
cd QtFirebaseExample/build
make
build-linux-desktop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup
run: |
cd ..
WROOT=$(readlink -f .)
echo "::set-env name=WORK::${WROOT}"
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 5.12.6
target: desktop
- name: Install Firebase C++ SDK
run: |
cd ..
curl -L https://firebase.google.com/download/cpp -o firebase_cpp_sdk.zip
unzip firebase_cpp_sdk.zip
#- name: Install QtFirebase
# run: |
# cd ..
# git clone https://github.com/Larpon/QtFirebase.git
- name: Install QtFirebaseExample
run: |
cd ..
git clone https://github.com/Larpon/QtFirebaseExample.git
- name: Connect projects
run: |
cd ..
ln -s ${WORK}/firebase_cpp_sdk ${WORK}/QtFirebase/firebase_cpp_sdk
ln -s ${WORK}/QtFirebase ${WORK}/QtFirebaseExample/extensions/QtFirebase
- name: Run QMake
run: |
cd ..
echo "--- Run QMake ---"
cd "QtFirebaseExample/"
mkdir build && cd build
${Qt5_Dir}/bin/qmake ../
- name: Run Make
run: |
cd ..
cd QtFirebaseExample/build
make