stohrendorf / CroftEngine

An open-source Tomb Raider 1 engine remake
Other
281 stars 18 forks source link

Add github action #179

Closed bensuperpc closed 2 years ago

bensuperpc commented 2 years ago

Add github action

stohrendorf commented 2 years ago

Thank you.

First, you're not running ctest or make test - that's only missing and only costs a few seconds of additional build time.

But, let's do some calculations:

  1. The average build time using this action seems to be around 6 minutes. Considering I did heavy build time optimizations recently, resulting in ~30% less build time, the build time is very likely to increase again. Let's say it will be 9 minutes to have a safe margin.
  2. Let's assume there are 4 pushes every day, that would make 9*4=36 build minutes a day.
  3. A month has around 30 days, resulting in 30*36=1080 build minutes per month for a single Linux distribution.
  4. Considering there's different versions of a distribution, and Ubuntu is not the only distribution (surprise, surprise), even adding a single other version of Ubuntu or adding another distribution for a matrix build across different distributions is not possible because that would exceed the build time limit of 2000 minutes per month for a free account. And I'd really like to see the CI pipeline running across different versions and distributions, otherwise this is pretty much useless.
  5. As the build time will sooner or later exceed the free limit, I would have to pay for the CI pipeline. I'm not taking money for development, and never will (because of possible legal implications I'm a bit concerned about), so who's going to pay for the build minutes?

Thanks for your work, but as it is right now, it's not usable unfortunately. I'm open to the idea, though, and it would be much better than running CI tests on my own private server, but the reason for setting up CI on my own private server was because of a simple cost calculation.

stohrendorf commented 2 years ago

@bensuperpc maybe it's possible to change the trigger from push to cron and only run it on the master branch. I don't know how that would work with PRs, but maybe it's possible to manually trigger the action from a PR?

bensuperpc commented 2 years ago

@stohrendorf CI has been updated ^^

The CI launches every day at 18h00 (or 6 p.m), I put the link of the site I use for cron in comment.

I don't know enough about Windows / MacOS action github...

It is possible to use Docker containers for other linux distributions, I'll see that later, it takes a little while.

I'm trying to see if I can use dockcross (https://github.com/dockcross/dockcross) to build on ARM64 or ARMv7 or others arch.

stohrendorf commented 2 years ago

@bensuperpc don't worry, it has been running so long without proper CI, it doesn't hurt if it takes some time to get it running as long as it has some decent quality :)

bensuperpc commented 2 years ago

I updated the files ^^

Edit: You need CMake 3.20 to have the command --test-dir

stohrendorf commented 2 years ago

You didn't do a rebase or a squash yet. What I want to see is a single commit based on the current HEAD.

bensuperpc commented 2 years ago

You didn't do a rebase or a squash yet. What I want to see is a single commit based on the current HEAD.

It's done ^^