-
-
Notifications
You must be signed in to change notification settings - Fork 768
Migrate CI to Azure for both iOS and Android #1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
x
in the boxes that apply