gitlab-ci: use new image that handles the emulator setup

parent 053ffab3
......@@ -65,52 +65,12 @@ errorprone:
- export AVD_ARCH=`echo $CI_JOB_NAME | awk '{print $4}'`
- export AVD_PACKAGE="system-images;android-${AVD_SDK};${AVD_TAG};${AVD_ARCH}"
- echo $AVD_PACKAGE
- emulator -accel-check || true
# Use bleeding edge for Q, or download proven emulator version, based on
# https://aur.archlinux.org/android-emulator.git
- if [[ "$AVD_SDK" == Q ]]; then
set -x; echo y | sdkmanager --channel=3 "emulator" > /dev/null; set +x;
else
set -x;
rm -rf $ANDROID_HOME/emulator;
wget -q http://dl.google.com/android/repository/emulator-linux-5264690.zip;
echo "48c1cda2bdf3095d9d9d5c010fbfb3d6d673e3ea emulator-linux-5264690.zip" | sha1sum -c;
unzip -qq -d $ANDROID_HOME emulator-linux-5264690.zip;
set +x;
fi
- grep -v '^License' $ANDROID_HOME/tools/source.properties
$ANDROID_HOME/emulator/source.properties
- alias sdkmanager
- echo y | sdkmanager "platforms;android-$AVD_SDK" > /dev/null
- if ! avdmanager list avd | grep "Name. avd$AVD_SDK$"; then
set -x;
rm -rf ~/.android/avd $ANDROID_HOME/system-images;
echo y | sdkmanager "$AVD_PACKAGE" > /dev/null;
echo no | avdmanager create avd --name avd$AVD_SDK --tag "$AVD_TAG" --package "$AVD_PACKAGE" --sdcard 64M --device "Nexus 5";
export RAMSIZE="`sed -n 's,^MemAvailable:[^0-9]*\([0-9][0-9]*\)[^0-9]*$,\1,p' /proc/meminfo`";
if [ $RAMSIZE -le 2048 ]; then
sed -i '/^hw\.ramSize\s*=.*/d' ~/.android/avd/*.avd/config.ini;
echo "hw.ramSize=1024" >> ~/.android/avd/*.avd/config.ini;
fi;
avdmanager list avd;
set +x;
fi
- grep -v '^License' $ANDROID_HOME/system-images/android-$AVD_SDK/$AVD_TAG/$AVD_ARCH/source.properties
- adb start-server
- ls -l ~/.android
- emulator -version
- emulator -avd avd$AVD_SDK
-no-audio
-no-jni
-no-snapstorage
-no-window
-skip-adb-auth
-verbose
-wipe-data
-debug all,-hw_control,-qemud,-sensors,-surface
&
- adb start-server
- start-emulator
- wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment