I’m at the very start of developing a cross-platform game with the intent to target Windows, Linux, MacOS, Android and iOS. I’m looking for both a framework and a CI system which supports these platforms.
MonoGame looks like a great fit, but I haven’t really found an up-to-date guide which covers building for all of the aforementioned platforms.
It seems pretty obvious that I’m going to need an OSX build slave for MacOS and iOS, so I would prefer Travis CI at this point.
What about the other platforms, especially Android (since it seems to have the most dependencies)?
Should I try to build all five configurations on MAC or maybe split that into Windows and MAC build slaves?
Does anyone maybe have a .travis.yml that builds for Windows, Linux and Android?
I build Windows, WindowsGL, and WindowsUniversal on Windows and the rest on Mac.
I’ve had great luck with Azure DevOps so far. They recently added free Windows and Mac CI/CD pipelines for open source projects, which I’ve used to build the MonoGame framework packages for all platforms. I haven’t tried building a complete app yet because I wasn’t planning to make it open source, but I think it may be possible to do even for iOS.
I can give you more details on that if you’re interested.
Thanks, haven’t stumbled across Azure DevOps during my research. It looks like a valid alternative to Travis indeed.
I forgot to mention I’m Open Source but looks like you assumed so
After an initial getting-used-to-MAC-command-line-tools phase, I managed to build an APK on a MAC OS Client with the following yaml file:
# Trigger the Azure DevOps build upon changes in the master or AzureTest branches
# Build on MacOS
# Configure paths here
# Install NuGet
- task: NuGetToolInstaller@0
# Restore any missing dependencies
- task: NuGetCommand@2
# Install MonoGame and other dependencies
- task: ShellScript@2
# Build any .csproj containing "Android" as a Xamarin project
- task: XamarinAndroid@1
With install.sh being:
# Download Monogame 3.7.1 (-L is important so curl follows redirects)
curl -L -O https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/MonoGame.pkg
# Install the MonoGame package
sudo installer -pkg "$(pwd)/MonoGame.pkg" -target /
I can now dive into signing the apk using an encrypted keystore and deploying it somewhere. Once that’s done, I will look into the other platforms.
I will publish a guide on how to set up a cross-platform CI project once I’m done testing everything.