From 735cba86bbf8ec9447e1ace8825c165121585fbf Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 1 Dec 2024 22:42:23 +0000 Subject: [PATCH] chore: Build the debug version of Qt for Android. Hopefully we can see something more interesting in stack traces. --- .github/workflows/docker.yml | 37 ++++++++++++++++++++------ qtox/docker/Dockerfile.android-builder | 11 +++++--- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 03d3c89..65059d3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -100,7 +100,8 @@ jobs: matrix: image: - alpine - - android-builder + - android-builder.debug + - android-builder.release - debian - fedora - flatpak-builder @@ -110,12 +111,34 @@ jobs: include: - image: windows-builder.i686 file: windows-builder - arch: i686 - winearch: win32 + args: | + ARCH=i686 + WINEARCH=win32 - image: windows-builder.x86_64 file: windows-builder - arch: x86_64 - winearch: win64 + args: | + ARCH=x86_64 + WINEARCH=win64 + - image: android-builder.arm64-v8a.debug + file: android-builder + args: | + ANDROID_FFMPEG_ABI=arm64 + ANDROID_OPENSSL_ABI=arm64 + ANDROID_OPENSSL_ASM= + ANDROID_QT_ABI=arm64-v8a + ANDROID_TRIPLE=aarch64-linux-android + ANDROID_VPX_ABI=arm64-android-gcc + QT_BUILD_TYPE=debug + - image: android-builder.arm64-v8a.release + file: android-builder + args: | + ANDROID_FFMPEG_ABI=arm64 + ANDROID_OPENSSL_ABI=arm64 + ANDROID_OPENSSL_ASM= + ANDROID_QT_ABI=arm64-v8a + ANDROID_TRIPLE=aarch64-linux-android + ANDROID_VPX_ABI=arm64-android-gcc + QT_BUILD_TYPE=release runs-on: ubuntu-latest steps: - name: Set up Docker Buildx @@ -133,9 +156,7 @@ jobs: with: context: "{{defaultContext}}:qtox" file: "docker/Dockerfile.${{ matrix.file || matrix.image }}" - build-args: | - ARCH=${{ matrix.arch }} - WINEARCH=${{ matrix.winearch }} + build-args: ${{ matrix.args }} tags: toxchat/qtox:${{ matrix.image }} cache-from: type=registry,ref=toxchat/qtox:${{ matrix.image }} cache-to: type=inline diff --git a/qtox/docker/Dockerfile.android-builder b/qtox/docker/Dockerfile.android-builder index feeb63c..57302fe 100644 --- a/qtox/docker/Dockerfile.android-builder +++ b/qtox/docker/Dockerfile.android-builder @@ -54,13 +54,16 @@ RUN tar zxf <(wget -O- https://github.com/openssl/openssl/releases/download/open && make install_sw \ && rm -rf /work/build -#ARG ANDROID_ABI=armeabi-v7a -ARG ANDROID_ABI=arm64-v8a +#ARG QT_BUILD_TYPE=release +ARG QT_BUILD_TYPE=debug +#ARG ANDROID_QT_ABI=armeabi-v7a +ARG ANDROID_QT_ABI=arm64-v8a RUN tar Jxf <(wget -O- https://download.qt.io/archive/qt/6.8/6.8.0/single/qt-everywhere-src-6.8.0.tar.xz) \ && cd qt-everywhere-src-6.8.0 \ && ./configure -prefix "/work/android/qt" \ + "-$QT_BUILD_TYPE" \ -qt-host-path /usr \ - -android-abis "$ANDROID_ABI" \ + -android-abis "$ANDROID_QT_ABI" \ -android-sdk "$ANDROID_SDK_HOME" \ -android-ndk "$ANDROID_NDK_ROOT" \ -android-ndk-platform "android-$ANDROID_API" \ @@ -206,4 +209,6 @@ RUN tar zxf <(wget -O- https://github.com/TokTok/c-toxcore/releases/download/v0. && cmake --install _build \ && rm -rf /work/build +# Make .android world-writable (like /tmp) so debug signing works. +RUN ["chmod", "1777", "/work/android/sdk/.android"] WORKDIR /qtox