documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Add build example for windows images (UWP)

Open desto12 opened this issue 3 years ago • 2 comments

Context

I didn't find any example of windows UWP build and documentation is a bit complicated -> https://game.ci/docs/docker/windows-docker-images because if I understand everything -> after steps from documentation, I should write own powershell scripts to start build in container. For me it's a bit hard because I'm newbie with CI/CD, I stucked at this moment and I think there will be more people like me :)

Suggested solution

Add ps scripts for build and license and some example in gtilab-ci.yml

desto12 avatar Sep 07 '22 15:09 desto12

Hi, This documentation would indeed benefit from easier to follow steps for gitlab-ci.

I recommend making sure you understand how to build for other platforms using gitlab-ci first. UWP isn't the easiest target platform due to what is described in the documentation you linked, more precisely the section explaining that Microsoft does not allow redistribution of Visual Studio build tools.

Concerning Gitlab and Windows based images, I recommend first trying with non-unity related steps to learn how to interact with windows containers on gitlab-ci.

Make sure you are able to invoke a powershell script printing a hello world from a .gitlab-ci.yml.

For now, the only example we have are on the github-actions side.

We have a list of supported build platforms here:
https://github.com/game-ci/unity-actions#build

This points to Windows Builds pipelines which are defined here:
https://github.com/game-ci/unity-builder/blob/main/.github/workflows/windows-build-tests.yml

Target platform is WSAPlayer as seen here:
https://github.com/game-ci/unity-builder/blob/main/.github/workflows/windows-build-tests.yml#L25

The build is based on the actual repository:
https://github.com/game-ci/unity-builder/blob/main/.github/workflows/windows-build-tests.yml#L57

These are the powershell scripts being used:
https://github.com/game-ci/unity-builder/tree/main/dist/platforms/windows

I did not try this, but if we can confirm that the UWP builds from above pipelines are working, one could reuse these powershell scripts with other CIs and things could work.

Hope the above can shed some light on what we have.


Again, I agree that the UWP docs we have are not super clear and we would benefit from easier to follow steps here. We're accepting contributions on this 🚀

GabLeRoux avatar Sep 07 '22 16:09 GabLeRoux

Thank you very much for very helpful informations and sorry for so late answer but I wanted try some things, so I got working windows docker images on local runner, but there is some problem with license activation client (after send request to unity backend I get response with "200" then it stuck and unity client got timeout), I guess it can be connected with hyper-v (I didn't try isolation process) or some container network configuration. I gave up this and I went for GitLab repository mirroring to GitHub and it can be a workaround if you need only test/build something "on push" and you don't need other pipeline events.

desto12 avatar Sep 20 '22 15:09 desto12