Migrate CI to Azure for both iOS and Android#1081
Conversation
azure-pipelines.yml
Outdated
| echo $ANDROID_HOME/emulator/emulator -list-avds | ||
| echo "Starting emulator" | ||
| nohup $ANDROID_HOME/emulator/emulator -avd xamarin_android_emulator -no-snapshot > /dev/null 2>&1 & | ||
| $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' |
There was a problem hiding this comment.
checking sys.boot_completed might sometimes be not reliable if CI is too slow, because the package manager might take more time to start. I'd rather verify if adb shell pm list packages returns zero exit code
There was a problem hiding this comment.
Yeah I accept that. I see we do that at many places but I went with azure suggestions and so far their CI is faster. Travis took more than 20mins to complete but azure agents took only 10mins. Will definitely check and improve if required.
There was a problem hiding this comment.
Travis is so slow because their VMs don't support KVM virtualization required for x86 emulator. And, of course, emulating ARM instructions set on Intel processors is slow
azure-pipelines.yml
Outdated
| echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n xamarin_android_emulator -k 'system-images;android-27;google_apis;x86' --force | ||
| echo $ANDROID_HOME/emulator/emulator -list-avds | ||
| echo "Starting emulator" | ||
| nohup $ANDROID_HOME/emulator/emulator -avd xamarin_android_emulator -no-snapshot > /dev/null 2>&1 & |
There was a problem hiding this comment.
can we have a separate variable for the emulator name?
azure-pipelines.yml
Outdated
|
|
||
| - script: | | ||
| echo Configuring Environment | ||
| echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-27;google_apis;x86' |
There was a problem hiding this comment.
can we have a variable for image name? Also, it might be useful to set platform and tools versions separately
| @@ -1,47 +0,0 @@ | |||
| sudo: required | |||
There was a problem hiding this comment.
so we'd like to get rid of Travis completely...
Is Azure stable enough? is it supposed to be always free for open source?
There was a problem hiding this comment.
Yes as per their documents and offerings in their website. I see it is much stable than Travis.
|
@mykola-mokhnach sorry I missed this PR. Please review when you get time. |
mykola-mokhnach
left a comment
There was a problem hiding this comment.
Azure config is ok. Although I'm still not quite convinced that we need to drop Travis
|
@mykola-mokhnach I added Travis back. We can check both parallelly for some time and remove either of one if any of this is not working for us. |
Change list
Migrate CI to Azure for both iOS and Android
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that apply