Update azure-pipelines-android.yml for Azure Pipelines

This commit is contained in:
Tom M 2021-06-13 16:03:23 +02:00
parent 06619e99e0
commit 402f70cf02
1 changed files with 12 additions and 11 deletions

View File

@ -53,7 +53,7 @@ variables:
# This is a symlink pointing to the real Android NDK
# Must be the same as $ANDROID_NDK_HOME see:
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
NDK: '/Users/runner/Library/Android/sdk/ndk-bundle'
NDK: '/Users/runner/Library/Android/sdk/ndk/21.4.7075529'
# All the built binaries, libs and their headers will be installed here
PREFIX: '$(DEV)/opt/android'
@ -562,17 +562,18 @@ jobs:
- bash: |
set -ex
ls $ANDROID_HOME
ls $ANDROID_HOME/emulator
$ANDROID_HOME/emulator/emulator -list-avds
cd $ANDROID_HOME/tools/bin/
./sdkmanager --list | grep system-images
./sdkmanager 'system-images;android-$(ANDROID_API);default;$(ANDROID_ABI_CMAKE)'
./sdkmanager --licenses
echo "no" | avdmanager create avd -n android_emulator -k 'system-images;android-$(ANDROID_API);default;$(ANDROID_ABI_CMAKE)' --force
$ANDROID_HOME/tools/bin/sdkmanager --list | grep system-images
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n android_emulator -k 'system-images;android-$(ANDROID_API);default;$(ANDROID_ABI_CMAKE)' --force
echo "Emulator created successfully $($ANDROID_HOME/emulator/emulator -list-avds), launching it"
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-window -no-snapshot -no-audio -no-boot-anim -accel auto -gpu auto &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
$ANDROID_HOME/platform-tools/adb devices echo "Emulator started"
echo "Emulator created successfully $($ANDROID_HOME/emulator/emulator -list-avds), launching it"
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-window -no-snapshot -no-audio -no-boot-anim -accel auto -gpu auto &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
$ANDROID_HOME/platform-tools/adb devices echo "Emulator started"
displayName: 'Create and start emulator'
continueOnError: true
- bash: |
set -x
@ -612,7 +613,7 @@ jobs:
cd $(Build.ArtifactStagingDirectory)/lib/$(ANDROID_ABI_CMAKE)
cp -LR $(PREFIX)/lib/* .
ls -Rg .
rm -rf *.dll *.alias gettext/ libtextstyle.* *.a *.la
rm -Rf *.dll *.alias gettext/ libtextstyle.* *.a *.la
rm -f *.so.*
mkdir -p $(Build.ArtifactStagingDirectory)/include
cd $(Build.ArtifactStagingDirectory)/include