@@ -122,3 +122,68 @@ jobs:
122
122
with :
123
123
name : ${{ matrix.host.artifact }}
124
124
path : src/qt/${{ matrix.host.gui_exe }}
125
+
126
+ android :
127
+ name : ${{ matrix.host.name }}
128
+ runs-on : ubuntu-latest
129
+ container : ubuntu:22.04
130
+
131
+ strategy :
132
+ fail-fast : false
133
+ matrix :
134
+ host :
135
+ - name : ' Android ARM 64-bit APK'
136
+ triplet : ' aarch64-linux-android'
137
+ artifact : ' unsecure_android_arm64'
138
+ - name : ' Android ARM 32-bit APK'
139
+ triplet : ' armv7a-linux-android'
140
+ artifact : ' unsecure_android_arm32'
141
+ - name : ' Android x86_64 APK'
142
+ triplet : ' x86_64-linux-android'
143
+ artifact : ' unsecure_android_x86_64'
144
+
145
+ env :
146
+ ANDROID_HOME : ' /tmp/Android'
147
+ ANDROID_API_LEVEL : ' 28'
148
+ ANDROID_BUILD_TOOLS_VERSION : ' 28.0.3'
149
+ ANDROID_NDK_VERSION : ' 23.2.8568313'
150
+ ANDROID_TOOLS_URL : ' https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip'
151
+
152
+ steps :
153
+ - name : Checkout
154
+ uses : actions/checkout@v4
155
+
156
+ - name : Install dependency packages
157
+ run : |
158
+ apt-get update
159
+ apt-get install --no-install-recommends -y autoconf automake ca-certificates curl g++ gradle lbzip2 libtool make openjdk-8-jdk patch pkg-config python3 unzip xz-utils
160
+
161
+ - name : Install Android tools
162
+ run : |
163
+ curl --location --fail ${{ env.ANDROID_TOOLS_URL }} -o android-tools.zip
164
+ mkdir -p ${{ env.ANDROID_HOME }}
165
+ unzip -o android-tools.zip -d ${{ env.ANDROID_HOME }}
166
+ yes | ${{ env.ANDROID_HOME }}/cmdline-tools/bin/sdkmanager --sdk_root=${{ env.ANDROID_HOME }} --install "build-tools;${{ env.ANDROID_BUILD_TOOLS_VERSION }}" "platform-tools" "platforms;android-31" "platforms;android-${{ env.ANDROID_API_LEVEL }}" "ndk;${{ env.ANDROID_NDK_VERSION }}"
167
+
168
+ - name : Build depends
169
+ run : |
170
+ cd depends
171
+ make -j$(nproc) HOST=${{ matrix.host.triplet }} ANDROID_SDK=${{ env.ANDROID_HOME }} ANDROID_NDK=${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }} ANDROID_API_LEVEL=${{ env.ANDROID_API_LEVEL }} ANDROID_TOOLCHAIN_BIN=${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}/toolchains/llvm/prebuilt/linux-x86_64/bin
172
+
173
+ - name : Configure
174
+ run : |
175
+ ./autogen.sh
176
+ ./configure CONFIG_SITE=$PWD/depends/${{ matrix.host.triplet }}/share/config.site --disable-dependency-tracking --disable-tests --disable-bench --disable-fuzz-binary || (cat config.log; false)
177
+
178
+ - name : Build GUI
179
+ run : |
180
+ make -j$(nproc) -C src/qt bitcoin-qt
181
+
182
+ - name : Build APK
183
+ run : |
184
+ make -j$(nproc) -C src/qt apk
185
+
186
+ - uses : actions/upload-artifact@v3
187
+ with :
188
+ name : ${{ matrix.host.artifact }}
189
+ path : src/qt/android/build/outputs/apk/debug/android-debug.apk
0 commit comments