srobo / competition-simulator

A simulator for Student Robotics Virtual Competitions
https://studentrobotics.org/docs/simulator/
MIT License
9 stars 2 forks source link

Initial CI migration to Github Actions #303

Closed WillB97 closed 3 years ago

WillB97 commented 3 years ago

An attempt to directly convert the CircleCI config to github actions

Current issues

We could partially overcome the first issue by making use of actions/upload-release-asset to directly place the artifact in the release. ~The second issue may be reduced by making a docker image on the github container repository.~

WillB97 commented 3 years ago

Moving to running Webots directly instead of in docker seems to greatly improve the spin up time to around 80s, all caching attempts I've tried so far have had little benefit on cache-hit and major detriments on misses.

With the build artifacts, moving to automatically deplying them to releases seems like a good solution. With people being able to remove the outer archive if they want the build of a non-tag. A possible solution of just uploading the unarchived build turns out to have shortcomings in that execution permissions are dropped and each file is uploaded as a separate HTTP requests leading to notable overhead.

PeterJCLaw commented 3 years ago

Do you have an example of what you mean by the build uploads? We have one file to upload -- the (custom built) archive of the repo (which I wouldn't expect to preserve execution permissions anyway), so I'm not sure I understand the issues you're hitting?

WillB97 commented 3 years ago

With github actions artifact even uploading a single zip gets encapsulated within another zip. While you could extract the repo archive and rely on the artifact handling to zip it, you loose the execute permission on all the scripts (which probably isn't a big issue) and the artifact's zipping is significantly slower.

Since the system for uploading files to a release uses a different backend, it doesn't add the encapsulating zip. But I haven't figured out all the syntax for it yet.

WillB97 commented 3 years ago

We should probably make a draft release on this branch to test that CI works before merging