mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
fix: build flow for new conan structure
This commit is contained in:
@@ -854,13 +854,27 @@ jobs:
|
||||
VERSION=$(grep CMAKE_PROJECT_VERSION:STATIC deploy/build/CMakeCache.txt | cut -d= -f2)
|
||||
|
||||
(cd deploy/build/client/android-build && mv AmneziaVPN.apk AmneziaVPN_${VERSION}_android9+_universal.apk)
|
||||
(cd deploy/build/client/android-build/build/outputs/bundle/release && mv android-build-release.aab AmneziaVPN_${VERSION}.aab)
|
||||
(cd deploy/build/client/android-build/build/outputs/bundle/ossRelease && mv android-build-oss-release.aab AmneziaVPN_${VERSION}_oss.aab)
|
||||
|
||||
for abi in arm64-v8a armeabi-v7a x86 x86_64; do
|
||||
deploy/build.sh -t android --sign --abi ${abi} --build ./deploy/build/${abi}
|
||||
(cd deploy/build/${abi}/client/android-build && mv AmneziaVPN.apk AmneziaVPN_${VERSION}_android9+_${abi}.apk)
|
||||
done
|
||||
|
||||
- name: 'Build Play AAB'
|
||||
env:
|
||||
QT_INSTALL_DIR: ${{ runner.temp }}
|
||||
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/android.keystore
|
||||
QT_ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_ALIAS }}
|
||||
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_KEY_PASS }}
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION=$(grep CMAKE_PROJECT_VERSION:STATIC deploy/build/CMakeCache.txt | cut -d= -f2)
|
||||
|
||||
deploy/build.sh -t android --sign --aab --play --build ./deploy/build/play
|
||||
|
||||
(cd deploy/build/play/client/android-build/build/outputs/bundle/playRelease && mv android-build-play-release.aab AmneziaVPN_${VERSION}_play.aab)
|
||||
|
||||
- name: 'Upload universal APK'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
@@ -868,10 +882,17 @@ jobs:
|
||||
archive: false
|
||||
retention-days: 7
|
||||
|
||||
- name: 'Upload AAB'
|
||||
- name: 'Upload OSS AAB'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
path: deploy/build/client/android-build/build/outputs/bundle/release/*.aab
|
||||
path: deploy/build/client/android-build/build/outputs/bundle/ossRelease/*.aab
|
||||
archive: false
|
||||
retention-days: 7
|
||||
|
||||
- name: 'Upload Play AAB'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
path: deploy/build/play/client/android-build/build/outputs/bundle/playRelease/*.aab
|
||||
archive: false
|
||||
retention-days: 7
|
||||
|
||||
|
||||
@@ -68,7 +68,13 @@ if(ANDROID_BUILD_PLAY)
|
||||
add_custom_target(android_play_apk
|
||||
COMMAND ./gradlew assemblePlay${_gradle_suffix} -DexplicitRun=1
|
||||
WORKING_DIRECTORY "${_android_build_dir}"
|
||||
COMMENT "Building Android Play variant (assemblePlay${_gradle_suffix})"
|
||||
COMMENT "Building Android Play APK (assemblePlay${_gradle_suffix})"
|
||||
DEPENDS ${PROJECT}
|
||||
)
|
||||
add_custom_target(android_play_aab
|
||||
COMMAND ./gradlew bundlePlay${_gradle_suffix} -DexplicitRun=1
|
||||
WORKING_DIRECTORY "${_android_build_dir}"
|
||||
COMMENT "Building Android Play AAB (bundlePlay${_gradle_suffix})"
|
||||
DEPENDS ${PROJECT}
|
||||
)
|
||||
endif()
|
||||
|
||||
+10
-1
@@ -33,6 +33,7 @@ while [[ $# -gt 0 ]]; do
|
||||
--abi) abis+=("$2"); shift 2 ;;
|
||||
--sign) : ${SIGN:=true}; shift ;;
|
||||
--aab) : ${BUILD_AAB=true}; shift ;;
|
||||
--play) : ${BUILD_PLAY=true}; shift ;;
|
||||
--help|-h|?)
|
||||
echo "Usage: $0 [options]"
|
||||
echo " Options:"
|
||||
@@ -45,6 +46,7 @@ while [[ $# -gt 0 ]]; do
|
||||
echo " --abi - specify Android ABIs for target to build for. all by default"
|
||||
echo " --sign - whether to sign the resulting files. only appicable to Android"
|
||||
echo " --aab - whether to build AAB. only applicable to Android"
|
||||
echo " --play - build Play flavor (Google Play Billing). use with --aab. only applicable to Android"
|
||||
exit 0
|
||||
;;
|
||||
*) echo "Unknown arg \"$1\". Use $0 -h to get help"; exit 1 ;;
|
||||
@@ -201,6 +203,7 @@ args=()
|
||||
[[ -n "$QT_ANDROID_SIGN_AAB" ]] && args+=("-DQT_ANDROID_SIGN_AAB=$QT_ANDROID_SIGN_AAB")
|
||||
[[ -n "$QT_ANDROID_ABIS" ]] && args+=("-DQT_ANDROID_ABIS=$QT_ANDROID_ABIS")
|
||||
[[ -n "$QT_ANDROID_BUILD_ALL_ABIS" ]] && args+=("-DQT_ANDROID_BUILD_ALL_ABIS=$QT_ANDROID_BUILD_ALL_ABIS")
|
||||
[[ -n "$BUILD_PLAY" ]] && args+=("-DANDROID_BUILD_PLAY=ON")
|
||||
|
||||
if [[ -n "$FORCE" ]]; then
|
||||
run_traced rm -rf "$BUILD_PATH"
|
||||
@@ -209,7 +212,13 @@ fi
|
||||
run_traced cmake -S "$SOURCE_PATH" -B "$BUILD_PATH" "${args[@]}"
|
||||
run_traced cmake --build "$BUILD_PATH" --config "$CMAKE_BUILD_TYPE"
|
||||
|
||||
[[ -n "$BUILD_AAB" ]] && run_traced cmake --build "$BUILD_PATH" --config "$CMAKE_BUILD_TYPE" -t "aab"
|
||||
if [[ -n "$BUILD_AAB" ]]; then
|
||||
if [[ -n "$BUILD_PLAY" ]]; then
|
||||
run_traced cmake --build "$BUILD_PATH" --config "$CMAKE_BUILD_TYPE" -t "android_play_aab"
|
||||
else
|
||||
run_traced cmake --build "$BUILD_PATH" --config "$CMAKE_BUILD_TYPE" -t "aab"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$no_installers" ]; then
|
||||
for installer in $INSTALLERS; do
|
||||
|
||||
Reference in New Issue
Block a user