shapehq / tartelet

⚙️💻 A macOS app that makes it a breeze to manage multiple GitHub Actions runners in ephemeral virtual machines on a single host machine. The benefits are that runners can run in parallel, and each job runs in an isolated environment.
MIT License
501 stars 15 forks source link

Pre download the runner #52

Closed Jon889 closed 9 months ago

Jon889 commented 9 months ago

I already had copied the runner tar into the resources folder so that it would skip downloading the runner each time, but then when a new version had been released, the runner would update itself, so I would keep copying it manually whenever I noticed a new version to save the download time on each job.

It only saves about 10 seconds, (my office internet isn't the fastest) but it seems worth it, I have a lint CI job that takes 20 seconds so 10 seconds is a noticeable difference.

I'm not sure if this is best the way to code it. the 4th commit (https://github.com/shapehq/tartelet/pull/52/commits/dadd5e33db6ff9002cda5d8db9755d19c89a0c65) is optional in that it's a refactor, so if you prefer the GithubService not to do file system operations it can be reverted. Or any other feedback would be good :)

stmitt commented 9 months ago

FYI: with tart version 2.1.0 mounting remote archives are supported and the caching is handled by tart directly: https://github.com/cirruslabs/tart/pull/620

Jon889 commented 9 months ago

@stmitt ah nice, thanks, I've remade the PR: #54