gitlab-ci: set emulator RAM to 75% of available host RAM

parent e450569a
......@@ -63,7 +63,10 @@ errorprone:
- if ! avdmanager list avd | grep "Name. avd$AVD_SDK$"; then
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";
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` * 3 / 4 / 1024))";
sed -i '/^hw\.ramSize\s*=.*/d' ~/.android/avd/*.avd/config.ini;
echo "hw.ramSize=$RAMSIZE" >> ~/.android/avd/*.avd/config.ini;
avdmanager list avd;
fi
- emulator64-arm -avd avd$AVD_SDK -no-audio -no-window -no-snapstorage &
......
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