Update azure-pipelines-android.yml for Azure Pipelines

This commit is contained in:
Tom M 2021-06-14 21:50:04 +02:00
parent e6837c2051
commit c8215622d3

View file

@ -551,21 +551,6 @@ jobs:
parameters:
sourceDir: 'libinstpatch-$(INSTPATCH_VERSION)'
- bash: |
set -ex
cd $ANDROID_HOME/tools/bin/
./sdkmanager --list | grep system-images
./sdkmanager 'system-images;android-$(ANDROID_API);default;$(ANDROID_ABI_CMAKE)'
# echo "yes" | ./sdkmanager --licenses
echo "no" | ./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 guest > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device
$ANDROID_HOME/platform-tools/adb devices echo "Emulator started"
displayName: 'Create and start emulator'
continueOnError: true
# finally, compile fluidsynth
- template: cmake-android.yml
parameters:
@ -576,15 +561,27 @@ jobs:
installCommand: ''
- bash: |
set -x
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(PREFIX)/lib:$(NDK_TOOLCHAIN)/sysroot/usr/lib/$(ARCH)-linux-android$(ANDROID_TARGET_ABI)/$(ANDROID_API)
pushd build
make -j$((`nproc`+1)) check
ldd test/test_sample_cache
popd
displayName: 'Execute fluidsynth unit test'
condition: and(succeeded(), in(variables['ARCH'], 'x86_64', 'i686'))
enabled: 'false'
set -ex
cd $ANDROID_HOME/tools/bin/
./sdkmanager --list | grep system-images
./sdkmanager 'system-images;android-$(ANDROID_API);default;$(ANDROID_ABI_CMAKE)'
echo "no" | ./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"
cd $(Build.SourcesDirectory)/test-android
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-window -no-snapshot -no-audio -no-boot-anim -accel auto -gpu guest > /dev/null 2>&1 &
emulatorPid=$!
./convert-tests.sh
cp -Rl ${PREFIX}/lib/* app/src/main/jniLibs
$ANDROID_HOME/platform-tools/adb wait-for-device
#./gradlew connectedDebugAndroidTest --stacktrace
./gradlew connectedCheck -PcustomAbiFilters=x86
./gradlew --stop
kill -9 $!
displayName: 'Start emulator and execute unit tests'
continueOnError: true
- bash: |
set -ex