Skip to content

Conversation

SrinivasanTarget
Copy link
Member

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

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@SrinivasanTarget
Copy link
Member Author

#1064

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'
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Jan 1, 2019

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

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

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 &
Copy link
Contributor

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?


- script: |
echo Configuring Environment
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-27;google_apis;x86'
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Member Author

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.

@SrinivasanTarget
Copy link
Member Author

@mykola-mokhnach sorry I missed this PR. Please review when you get time.

Copy link
Contributor

@mykola-mokhnach mykola-mokhnach left a 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

@SrinivasanTarget
Copy link
Member Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants