Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Galaxy #1688

Merged
merged 1 commit into from Nov 7, 2022
Merged

Galaxy #1688

merged 1 commit into from Nov 7, 2022

Conversation

dcvz
Copy link
Contributor

@dcvz dcvz commented Oct 3, 2022

This PR moves our CI system to use Github Actions.

Why

The main motivation driving this is being able to further scale. Leveraging Github Actions allows us to make use of their "free to open source" resources. This means we might be able to support more platforms or make use of matrices to perhaps build with different compilers for different platforms, or build and support variants.

Other Benefits

  • One eventual benefit might be to not have to pay for our current Jenkins master node.
  • Integrated into the platform we're already using, making it easy to see CI runs
  • Also, when more ports are supported, ports also won't have to compete for building time.

Potential: If we find a better way to do assets, in theory any public fork of this repo will automatically have CI. Otherwise individual devs can add a machine to their forks to act as asset builders.

Limits

What limits do we have when using Github Actions? Well, in theory it is free to use for any open source project (meaning the repository is public). But there are a few limits to know about:

  • The number of concurrent builds is 20 and 5 concurrent macOS builds. Better than we can currently do, but still good to know about
  • Artefacts can only be stored up to 90 days. Again better than what we currently have, but a good to know

Machine Specs?

Are Github machines fast? No. They are actually quite weak compared to the top notch machines we have in Jenkins so builds take longer.. around 12-25 minutes (macOS and Windows take the longest).

However, as part of this effort I have added in a compiler cache (ccache) that makes builds 65%+ faster. The slowest builds taking up to 4 min or so, when healthy cache is available. Given the bandwidth this project gets, cache should usually be available for builds.

Generating Assets

How does generating assets work? The workflow first generates assets (similar to what we currently do) and for that step and only that step, it uses our self hosted machines. Generating assets takes around 1 minute, making it pretty fast and unlikely to be a bottleneck. When this ships we will have three macOS machines acting as asset builders.

Possible Migration Plan

The moment this is merged in it will begin to work and run on branches that contain these changes. Before this gets merged we should make sure we have at least 3 asset building machines in the organization. We can keep Jenkins running for branches that are not yet updated and for private forks (Ghostship).

Cons

  • Makes it harder to move away from Github (if we ever want to)
  • Machines are technically slower (but mitigated with ccache)
  • Tricker to do private repos (since its only free for open source)

@dcvz dcvz force-pushed the galaxy branch 19 times, most recently from c20586e to b4dc5b3 Compare October 4, 2022 12:56
@dcvz

This comment was marked as outdated.

@dcvz

This comment was marked as outdated.

@dcvz dcvz marked this pull request as draft October 6, 2022 14:54
@dcvz dcvz force-pushed the galaxy branch 7 times, most recently from d2ac3f4 to bd677ff Compare October 6, 2022 22:30
@dcvz
Copy link
Contributor Author

dcvz commented Oct 26, 2022

@dcvz how goes progress with this? Sorry I've been too distracted with other stuff to help out much on this yet

Pretty well @garrettjoecox -- macOS and Windows are building with ccache making subsequent builds faster. Was in the process of trying to get ccache going in the other workflows when I paused work on this.

@dcvz dcvz force-pushed the galaxy branch 17 times, most recently from 0c7e163 to 2edd0a6 Compare October 29, 2022 09:00
@dcvz dcvz marked this pull request as ready for review October 29, 2022 09:46
path: |
soh.appimage
readme.txt
build-nintendo-switch:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd prefer keeping nintendo out of the build names if possible

@dcvz dcvz force-pushed the galaxy branch 3 times, most recently from 8cc22a3 to 21303f9 Compare November 6, 2022 10:50
Copy link
Collaborator

@Kenix3 Kenix3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

So we can repurpose our Jenkins agent for this and thus we no longer need that master server anymore at all?

@sholdee we'll want to talk about backing up the Jenkins master server before shutting it down, but moving to GitHub doesn't depend on that.

@sholdee
Copy link
Contributor

sholdee commented Nov 7, 2022

Nice work! I think this is a good idea.

@dcvz dcvz merged commit 2c6c1d2 into HarbourMasters:develop Nov 7, 2022
@dcvz dcvz deleted the galaxy branch November 7, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants