servo / project

A repo for the Servo Project
Creative Commons Zero v1.0 Universal
238 stars 6 forks source link

Decide strategy for CI #15

Closed asajeffrey closed 1 year ago

asajeffrey commented 4 years ago

We shouldn't be on taskcluster any more.

asajeffrey commented 4 years ago

@SimonSapin says that each mac CI run of Servo would cost $17 on GitHub actions?

SimonSapin commented 4 years ago

https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions says 0.08 USD / macOS minute.

Assuming GitHub’s workers are equivalent to one mac mini from Macstadium, we have a ~40 min build on one worker followed by ~20 minutes of WPT on 9 workers which is 220 minutes.

SimonSapin commented 4 years ago

This is a very rough estimate, but it gives an order of magnitude. We could consider running much less of WPT on mac, perhaps only WebGL tests, since we also run all of WPT on Linux.

SimonSapin commented 4 years ago

Here are some of the options with some thoughts on each. There are likely others but I know know as much about them.

TaskCluster on community-tc

This is the status quo.

Pros:

Cons:

Self-hosted TaskCluster

Current-generation TaskCluster is designed to have multiple independent instances/deployments of it exist in the world and has some documentation about deploying a new one. Mozilla has two, and apparently at least one other company has one. The Servo Project could host one.

Pros:

Cons:

GitHub Actions with GitHub-hosted runners

Pros:

Cons:

GitHub Actions with self-hosted runners

Pros:

Cons:

jdm commented 4 years ago

We chatted with Pietro about rust-lang's experience with GitHub actions, and it sounds like our concerns about minutes do not apply to non-private repositories. That suggests that we should try creating some Actions workflows for linux/mac/windows builds and see what the cycle time looks like.

jdm commented 4 years ago

Summary of the conversation:

jdm commented 4 years ago

https://github.com/features/actions https://github.com/pricing https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration

asajeffrey commented 4 years ago

Ah, interesting... https://about.gitlab.com/solutions/open-source/ provides free CI time for open source projects.

nuritzi commented 4 years ago

Ah, interesting... https://about.gitlab.com/solutions/open-source/ provides free CI time for open source projects.

Hi All! I'm the one who runs the GitLab for Open Source program that @asajeffrey mentioned. Through the program, you'd get 50K CI minutes per month for free.

One of the benefits of GitLab CI is that we're really focused on security, so that's baked in as well. Here's an example:

GitLab Security Scanning

Happy to answer any questions! Just ping me :)

jdm commented 4 years ago

Github actions workflows examples:

brodock commented 3 years ago

on the GitHub Actions to GitLab CI comparison:

the biggest pain point for GitHub actions is the security of custom runners. rust-lang runs a fork which rejects builds for PRs to avoid this, and also creates ephemeral VMs as a backup security measure.

Considering GitLab CI for external resources (when using it with GitHub), this is the default behavior, so you don't need to keep a fork of the runner. By default (as a security model) we never run external code (from a fork) within the same context as the project. So an external user will never be able to arbitrarily execute anything using your project's own resources, own runners etc.

When using GitLab CI as part of a GitLab project (which is not the case here), MRs (how we call PRs) always execute on the context of where it originated from. If a fork, it will use that fork's context.

(relevant documentation: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/)

the fork causes problems with github's desire to auto-upgrade runners; there's a 4 hour window between new upstream releases and when the non-upgraded runners stop accepting jobs.

In our release model, IIRC you can still use an older runner for as long as you want, the side-effect is that it may not support a feature introduced in a new version. And we release new minor releases every 22nd each month as part of GitLab's release cycle (patch releases can happen during the month, but again, not necessary to upgrade as long as whatever is being fixed is not affecting you).

RAM limitations on workers are likely to be the biggest concern for migrating Servo

what are your requirements?

jdm commented 3 years ago

One rustc process consumes up to 6gb at its peak when compiling Servo,I believe.

SimonSapin commented 3 years ago

https://coopcoopbware.tumblr.com/post/636411382111272960/taskcluster-ci-for-engineers talks about Taskcluster outside of Mozilla.

Taskcluster required at least two separate cloud providers (AWS and Azure) and a Heroku account to launch.

Over the past year, we removed the need for Azure as a back-end data store and removed the need for Heroku for deployments. Now if you have a Kubernetes environment setup, you’re ready to install Taskcluster. You’ll still need AWS S3 access for artifact storage, but we’re working to make that configurable too.

So this reduces one of the concerns I had.

However later in the post:

Here are some examples of use cases where Taskcluster might make sense for you:

  • You already have a person or team of people dedicated to your CI pipeline.
  • […]

This is the assessment of something working on TC at Mozilla. I feel this is probably the serious downside that makes self-hosted TC not a good fit for Servo.

mrego commented 1 year ago

@mrobinson we have been doing lots of improvements on the CI this year, do we still need this issue or we can close it?

mrobinson commented 1 year ago

I think we can close this as we've standardized on GitHub Actions for the moment. Maybe that's not the best thing forever, and I could see a future where we want to manage our own runners, but for now I think we can move on.