@@ -745,11 +745,29 @@ jobs:
745745 needs : Bake-Prebuilts-Android
746746 if : ${{ always() }}
747747
748+ strategy :
749+ fail-fast : false
750+ matrix :
751+ include :
752+ - label : ' android9-10'
753+ qt_version : ' 6.10.1'
754+ min_sdk : 28
755+ max_sdk : 29
756+ version_code_offset : 0
757+ - label : ' android11+'
758+ qt_version : ' 6.10.3'
759+ min_sdk : 30
760+ max_sdk : ' '
761+ version_code_offset : 1
762+
748763 env :
749- ANDROID_PLATFORM : android-28
764+ ANDROID_PLATFORM : android-${{ matrix.min_sdk }}
750765 NDK_VERSION : 27.0.11718014
751- QT_VERSION : 6.10.3
766+ QT_VERSION : ${{ matrix.qt_version }}
752767 QT_MODULES : ' qtremoteobjects qt5compat qtimageformats qtshadertools'
768+ APP_ANDROID_MIN_SDK : ${{ matrix.min_sdk }}
769+ APP_ANDROID_MAX_SDK : ${{ matrix.max_sdk }}
770+ APP_ANDROID_VERSION_CODE_OFFSET : ${{ matrix.version_code_offset }}
753771 PROD_AGW_PUBLIC_KEY : ${{ secrets.PROD_AGW_PUBLIC_KEY }}
754772 PROD_S3_ENDPOINT : ${{ secrets.PROD_S3_ENDPOINT }}
755773 FALLBACK_S3_ENDPOINT : ${{ secrets.FALLBACK_S3_ENDPOINT }}
@@ -857,236 +875,68 @@ jobs:
857875 QT_ANDROID_KEYSTORE_PATH : ${{ github.workspace }}/android.keystore
858876 QT_ANDROID_KEYSTORE_ALIAS : ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_ALIAS }}
859877 QT_ANDROID_KEYSTORE_STORE_PASS : ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_PASS }}
878+ LABEL : ${{ matrix.label }}
860879 shell : bash
861880 run : |
862- BASE_VERSION_CODE=$(grep -oP '(?<=set\(APP_ANDROID_VERSION_CODE )\d+' CMakeLists.txt)
863- VERSION_CODE=$((BASE_VERSION_CODE + 2))
881+ OUT=deploy/artifacts
882+ rm -rf $OUT && mkdir -p $OUT
864883
865- APP_ANDROID_VERSION_CODE=$VERSION_CODE deploy/build.sh -t android --sign --aab
884+ deploy/build.sh -t android --sign --aab
866885
867886 VERSION=$(grep CMAKE_PROJECT_VERSION:STATIC deploy/build/CMakeCache.txt | cut -d= -f2)
868887
869- (cd deploy/build/client/android-build && mv AmneziaVPN.apk AmneziaVPN_${VERSION}_android11+_universal.apk)
888+ mv deploy/build/client/android-build/AmneziaVPN.apk \
889+ $OUT/AmneziaVPN_${VERSION}_${LABEL}_universal.apk
890+ mv deploy/build/client/android-build/build/outputs/bundle/release/android-build-release.aab \
891+ $OUT/AmneziaVPN_${VERSION}_${LABEL}.aab
870892
871893 for abi in arm64-v8a armeabi-v7a x86 x86_64; do
872- APP_ANDROID_VERSION_CODE=$VERSION_CODE deploy/build.sh -t android --sign --abi ${abi} --build ./deploy/build/${abi}
873- (cd deploy/build/${abi}/client/android-build && mv AmneziaVPN.apk AmneziaVPN_${VERSION}_android11+_${abi}.apk)
894+ deploy/build.sh -t android --sign --abi ${abi} --build ./deploy/build/${abi}
895+ mv deploy/build/${abi}/client/android-build/AmneziaVPN.apk \
896+ $OUT/AmneziaVPN_${VERSION}_${LABEL}_${abi}.apk
874897 done
875898
876- APP_ANDROID_MIN_SDK=30 APP_ANDROID_VERSION_CODE=$VERSION_CODE deploy/build.sh -t android --sign --aab --build ./deploy/build/aab
877-
878- (cd deploy/build/aab/client/android-build/build/outputs/bundle/release && mv android-build-release.aab AmneziaVPN_${VERSION}_android11+.aab)
899+ ls -l $OUT
879900
880901 - name : ' Upload universal APK'
881902 uses : actions/upload-artifact@v7
882903 with :
883- path : deploy/build/client/android-build/* .apk
904+ path : deploy/artifacts/*_universal .apk
884905 archive : false
885906 retention-days : 7
886907
887- - name : ' Upload android11+ AAB'
888- uses : actions/upload-artifact@v7
889- with :
890- path : deploy/build/aab/client/android-build/build/outputs/bundle/release/*.aab
891- archive : false
892- retention-days : 7
893-
894- - name : ' Upload arm64-v8a APK'
895- uses : actions/upload-artifact@v7
896- with :
897- path : deploy/build/arm64-v8a/client/android-build/*.apk
898- archive : false
899- retention-days : 7
900-
901- - name : ' Upload armeabi-v7a APK'
902- uses : actions/upload-artifact@v7
903- with :
904- path : deploy/build/armeabi-v7a/client/android-build/*.apk
905- archive : false
906- retention-days : 7
907-
908- - name : ' Upload x86 APK'
909- uses : actions/upload-artifact@v7
910- with :
911- path : deploy/build/x86/client/android-build/*.apk
912- archive : false
913- retention-days : 7
914-
915- - name : ' Upload x86_64 APK'
916- uses : actions/upload-artifact@v7
917- with :
918- path : deploy/build/x86_64/client/android-build/*.apk
919- archive : false
920- retention-days : 7
921-
922- # ------------------------------------------------------
923-
924- Build-Android-Qt610 :
925- runs-on : android-runner
926-
927- needs : Bake-Prebuilts-Android
928- if : ${{ always() }}
929-
930- env :
931- ANDROID_PLATFORM : android-28
932- NDK_VERSION : 27.0.11718014
933- QT_VERSION : 6.10.1
934- QT_MODULES : ' qtremoteobjects qt5compat qtimageformats qtshadertools'
935- PROD_AGW_PUBLIC_KEY : ${{ secrets.PROD_AGW_PUBLIC_KEY }}
936- PROD_S3_ENDPOINT : ${{ secrets.PROD_S3_ENDPOINT }}
937- FALLBACK_S3_ENDPOINT : ${{ secrets.FALLBACK_S3_ENDPOINT }}
938- DEV_AGW_PUBLIC_KEY : ${{ secrets.DEV_AGW_PUBLIC_KEY }}
939- DEV_AGW_ENDPOINT : ${{ secrets.DEV_AGW_ENDPOINT }}
940- DEV_S3_ENDPOINT : ${{ secrets.DEV_S3_ENDPOINT }}
941- FREE_V2_ENDPOINT : ${{ secrets.FREE_V2_ENDPOINT }}
942- PREM_V1_ENDPOINT : ${{ secrets.PREM_V1_ENDPOINT }}
943-
944- steps :
945- - name : ' Get sources'
946- uses : actions/checkout@v4
947- with :
948- submodules : ' true'
949-
950- - name : ' Install desktop Qt'
951- uses : jurplel/install-qt-action@v4
952- with :
953- version : ${{ env.QT_VERSION }}
954- host : ' linux'
955- target : ' desktop'
956- arch : ' linux_gcc_64'
957- modules : ${{ env.QT_MODULES }}
958- dir : ${{ runner.temp }}
959- py7zrversion : ' ==0.22.*'
960- extra : ' --base ${{ env.QT_MIRROR }}'
961-
962- - name : ' Install android_armv7 Qt'
963- uses : jurplel/install-qt-action@v4
964- with :
965- version : ${{ env.QT_VERSION }}
966- host : ' linux'
967- target : ' android'
968- arch : ' android_armv7'
969- modules : ${{ env.QT_MODULES }}
970- dir : ${{ runner.temp }}
971- py7zrversion : ' ==0.22.*'
972- extra : ' --base ${{ env.QT_MIRROR }}'
973-
974- - name : ' Install android_arm64_v8a Qt'
975- uses : jurplel/install-qt-action@v4
976- with :
977- version : ${{ env.QT_VERSION }}
978- host : ' linux'
979- target : ' android'
980- arch : ' android_arm64_v8a'
981- modules : ${{ env.QT_MODULES }}
982- dir : ${{ runner.temp }}
983- py7zrversion : ' ==0.22.*'
984- extra : ' --base ${{ env.QT_MIRROR }}'
985-
986- - name : ' Install android_x86 Qt'
987- uses : jurplel/install-qt-action@v4
988- with :
989- version : ${{ env.QT_VERSION }}
990- host : ' linux'
991- target : ' android'
992- arch : ' android_x86'
993- modules : ${{ env.QT_MODULES }}
994- dir : ${{ runner.temp }}
995- py7zrversion : ' ==0.22.*'
996- extra : ' --base ${{ env.QT_MIRROR }}'
997-
998- - name : ' Install android_x86_64 Qt'
999- uses : jurplel/install-qt-action@v4
1000- with :
1001- version : ${{ env.QT_VERSION }}
1002- host : ' linux'
1003- target : ' android'
1004- arch : ' android_x86_64'
1005- modules : ${{ env.QT_MODULES }}
1006- dir : ${{ runner.temp }}
1007- py7zrversion : ' ==0.22.*'
1008- extra : ' --base ${{ env.QT_MIRROR }}'
1009-
1010- - name : ' Setup Java'
1011- uses : actions/setup-java@v4
1012- with :
1013- distribution : ' temurin'
1014- java-version : ' 17'
1015-
1016- - name : ' Setup Android SDK'
1017- uses : android-actions/setup-android@v4
1018- with :
1019- packages : " platforms;${{ env.ANDROID_PLATFORM }} ndk;${{ env.NDK_VERSION }}"
1020-
1021- - name : ' Setup python'
1022- uses : actions/setup-python@v6
1023- with :
1024- python-version : 3.14
1025-
1026- - name : ' Install conan'
1027- run : pip install "conan==2.28.0"
1028-
1029- - name : ' Decode keystore secret to file'
1030- env :
1031- KEYSTORE_BASE64 : ${{ secrets.ANDROID_RELEASE_KEYSTORE_BASE64 }}
1032- shell : bash
1033- run : |
1034- echo $KEYSTORE_BASE64 | base64 --decode > android.keystore
1035-
1036- - name : ' Build project'
1037- env :
1038- QT_INSTALL_DIR : ${{ runner.temp }}
1039- QT_ANDROID_KEYSTORE_PATH : ${{ github.workspace }}/android.keystore
1040- QT_ANDROID_KEYSTORE_ALIAS : ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_ALIAS }}
1041- QT_ANDROID_KEYSTORE_STORE_PASS : ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_PASS }}
1042- APP_ANDROID_MIN_SDK : 28
1043- APP_ANDROID_MAX_SDK : 29
1044- shell : bash
1045- run : |
1046- for abi in arm64-v8a armeabi-v7a x86 x86_64; do
1047- deploy/build.sh -t android --sign --abi ${abi} --build ./deploy/build/${abi}
1048-
1049- VERSION=$(grep CMAKE_PROJECT_VERSION:STATIC deploy/build/${abi}/CMakeCache.txt | cut -d= -f2)
1050- (cd deploy/build/${abi}/client/android-build && mv AmneziaVPN.apk AmneziaVPN_${VERSION}_android9-10_qt_6_10_${abi}.apk)
1051- done
1052-
1053- BASE_VERSION_CODE=$(grep -oP '(?<=set\(APP_ANDROID_VERSION_CODE )\d+' CMakeLists.txt)
1054- APP_ANDROID_VERSION_CODE=$((BASE_VERSION_CODE + 1)) deploy/build.sh -t android --sign --aab --build ./deploy/build/aab
1055-
1056- (cd deploy/build/aab/client/android-build/build/outputs/bundle/release && mv android-build-release.aab AmneziaVPN_${VERSION}_android9-10.aab)
1057-
1058908 - name : ' Upload arm64-v8a APK'
1059909 uses : actions/upload-artifact@v7
1060910 with :
1061- path : deploy/build/arm64 -v8a/client/android-build/* .apk
911+ path : deploy/artifacts/*_arm64 -v8a.apk
1062912 archive : false
1063913 retention-days : 7
1064914
1065915 - name : ' Upload armeabi-v7a APK'
1066916 uses : actions/upload-artifact@v7
1067917 with :
1068- path : deploy/build/armeabi -v7a/client/android-build/* .apk
918+ path : deploy/artifacts/*_armeabi -v7a.apk
1069919 archive : false
1070920 retention-days : 7
1071921
1072922 - name : ' Upload x86 APK'
1073923 uses : actions/upload-artifact@v7
1074924 with :
1075- path : deploy/build/x86/client/android-build/* .apk
925+ path : deploy/artifacts/*_x86 .apk
1076926 archive : false
1077927 retention-days : 7
1078928
1079929 - name : ' Upload x86_64 APK'
1080930 uses : actions/upload-artifact@v7
1081931 with :
1082- path : deploy/build/x86_64/client/android-build/* .apk
932+ path : deploy/artifacts/*_x86_64 .apk
1083933 archive : false
1084934 retention-days : 7
1085935
1086- - name : ' Upload android9-10 AAB'
936+ - name : ' Upload AAB'
1087937 uses : actions/upload-artifact@v7
1088938 with :
1089- path : deploy/build/aab/client/android-build/build/outputs/bundle/release /*.aab
939+ path : deploy/artifacts /*.aab
1090940 archive : false
1091941 retention-days : 7
1092942
0 commit comments