This is a sample of how to set up automated builds for Xamarin.iOS and Xamarin.Android apps, including running UI tests locally and in TestCloud, and packaging the apps for distribution. The build system used here is FAKE.
The TipCalc sample app used here was borrowed with love from Xamarin's samples. Minor updates were made for testability, but that's it.
The TeamCityExport.zip
file contains an export of an example TeamCity configuration using this setup.
To run a build, from the command line do:
./build.sh {target}
These are the targets available:
core-build
- Builds the shared cross-platform TipCalc project
core-tests
- Runs unit tests for the shared TipCalc project and publishes the results to TeamCity
ios-build
- Builds the iOS app
ios-adhoc
- Builds the iOS app for ad-hoc distribution and publishes the IPA file to TeamCity as an artifact
ios-appstore
- Builds the iOS app for app store distribution and publishes the zip file to TeamCity as an artifact
ios-uitests
- Runs automated UI tests for the iOS app in a simulator and publishes the results to TeamCity
ios-testcloud
- Runs automated UI tests for the iOS app in TestCloud and publishes the results to TeamCity
android-build
- Builds the Android app
android-package
- Builds the Android app for distribution and publishes the APK file to TeamCity as an artifact
android-uitests
- Runs automated UI tests for the Android app in a simulator and publishes the results to TeamCity
android-testcloud
- Runs automated UI tests for the Android app in TestCloud and publishes the results to TeamCity