Skip to content

Commit

Permalink
Added 64-bit Android builds to Circle CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Apr 28, 2023
1 parent b036648 commit 023c979
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,47 @@ jobs:
# Deploy
- run: .circleci/stage.sh

android64:
docker:
- image: mmatyas/pegasus-qt-android
environment:
QT_VERSION: qt5156
QT_TARGET: android
ANDROID_SDK_ROOT: /opt/android-sdk
ANDROID_NDK_ROOT: /opt/android-sdk/ndk/21.4.7075529
BUILDOPTS: ANDROID_ABIS=arm64-v8a FORCE_QT_PNG=1
steps:
- checkout
- run: .circleci/prepare.sh
- run: .circleci/build.sh
- run: if [ "$CIRCLE_BRANCH" != "master" ]; then
/opt/${QT_VERSION}_${QT_TARGET}/bin/androiddeployqt
--input src/app/android-pegasus-fe-deployment-settings.json
--output ${PWD}/installdir
--android-platform android-30
--gradle &&
cp
installdir/build/outputs/apk/debug/installdir-debug.apk
dist/pegasus-fe_$(git describe --always)_android64.apk;
fi
- run: if [ "$CIRCLE_BRANCH" == "master" ]; then
curl -LO https://github.com/mmatyas/pegasus-frontend/releases/download/alpha1/aks.enc &&
openssl aes-256-cbc -k "${AKS_ENC_KEY}" -in aks.enc -out aks -d &&
/opt/${QT_VERSION}_${QT_TARGET}/bin/androiddeployqt
--input src/app/android-pegasus-fe-deployment-settings.json
--output ${PWD}/installdir
--android-platform android-30
--gradle
--sign ./aks "${AKS_ALIAS}"
--storepass "${AKS_STOREPASS}"
--keypass "${AKS_KEYPASS}" &&
cp
installdir/build/outputs/apk/release/installdir-release-signed.apk
dist/pegasus-fe_$(git describe --always)_android64.apk;
fi
# Deploy
- run: .circleci/stage.sh

mingw:
docker:
- image: mmatyas/pegasus-qt-mingw
Expand Down Expand Up @@ -247,6 +288,7 @@ workflows:
jobs:
- x11
- android
- android64
- mingw
- buster-pi1
- buster-pi2
Expand All @@ -259,6 +301,7 @@ workflows:
requires:
- x11
- android
- android64
- mingw
- buster-pi1
- buster-pi2
Expand Down
1 change: 1 addition & 0 deletions .circleci/release_github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ TARGETS=" \
rpi4-static \
macos-static \
android \
android64 \
win32-mingw-static \
odroid-c1-static \
odroid-c2-static \
Expand Down
11 changes: 8 additions & 3 deletions src/link_to_backend.pri
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ isEmpty(USE_SDL_GAMEPAD): QT *= gamepad
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += "$${TOP_BUILDDIR}/thirdparty/apng/debug/qapng.lib"
}


# NOTE: This is a workaround for the Android CI, where qmake doesn't link Qt's PNG otherwise
!isEmpty(FORCE_QT_PNG):android {
LIBS += "-L$$[QT_INSTALL_LIBS]" -lqtlibpng_armeabi-v7a
PRE_TARGETDEPS += "$$[QT_INSTALL_LIBS]/libqtlibpng_armeabi-v7a.a"
contains(QT_ARCH, ".*armeabi.*") {
LIBS += "-L$$[QT_INSTALL_LIBS]" -lqtlibpng_armeabi-v7a
PRE_TARGETDEPS += "$$[QT_INSTALL_LIBS]/libqtlibpng_armeabi-v7a.a"
}
contains(QT_ARCH, ".*arm64.*") {
LIBS += "-L$$[QT_INSTALL_LIBS]" -lqtlibpng_arm64-v8a
PRE_TARGETDEPS += "$$[QT_INSTALL_LIBS]/libqtlibpng_arm64-v8a.a"
}
}

0 comments on commit 023c979

Please sign in to comment.