realm / realm-dotnet

Realm is a mobile database: a replacement for SQLite & ORMs
https://realm.io
Apache License 2.0
1.24k stars 161 forks source link

[Unity] Run tests on CI #2406

Open geragray opened 3 years ago

geragray commented 3 years ago

We need to be building the Unity tests on CI for all platforms and all scripting backends. Since Unity cannot cross-compile with IL2CPP, we'll need to build on Linux, macOS, and Windows separately.

Rough breakdown of the tasks is:

nirinchev commented 3 years ago

Point of contact from Realm: @nirinchev and @LaPeste

bwachter commented 1 year ago

TL;DR for mac: I have a VM with OS-X/intel capable of doing Unity builds with a fixed seat license. Can be used to get mac tests running while I work on getting it to cooperate with the license server as soon as I get a github token to register the runner there.

Unity on OS-X has quite a few issues, and mostly does error handling by not logging anything and not terminating - so a lot of hung processes without obvious reason. Adding to that is that they're wildly jumping between putting data in the users home and system wide location for the licensing client - not all of them are writeable on a default installation, and not in all instances do they handle write errors gracefully. On top of that parts of the license validation seem to call APIs which only work if the user running the license service also has an active desktop session - so currently unity on mac is running as a user logged into the desktop, with the ability to gain elevated privileges, which is not quite ideal.

I've also observed some freezes which seemed to have been due to powershell - so to rule that out as problem currently the unity-editor wrapper on mac is just exec /Applications/Unity/Unity.app/Contents/MacOS/Unity $@

I've cloned the VM with the working builds to one of our servers, so it can be registered as github worker, and am now working on a copy of it to get the interaction with the license server working.

bmunkholm commented 1 year ago

Nikola will look into this issue next week.

bmunkholm commented 1 year ago

No progress so far for Nikola on MacOS tests. Andrea will write wiki on how to simulate CI run locally.