Re: [llvm-dev] RFC: Using GitHub Actions for CI testing on the release/* branches

18 views
Skip to first unread message

John Byrd via llvm-dev

unread,
Dec 12, 2019, 2:43:17 AM12/12/19
to llvm...@lists.llvm.org
Please forgive the incorrect threading on this reply to Tom Stellard's RFC.

> I would like to start using GitHub Actions[1] for CI testing on the release/*
> branches.  As far as I know we don't have any buildbots listening to the
> release branches, and I think GitHub Actions are a good way for us to
> quickly bring-up some CI jobs there.  

Personally, I feel that Tom's proof of concept, is more important than we seem to be giving him credit for.

As of this writing, the Github actions system permits all comers, six hours of CPU time per build platform.  Due to this long CPU allotment, AFAIK, Github is one of the few CIs in town that lets anyone build and smoke llvm for free.

Consider the workflow of someone who has never worked on llvm before.  They will probably fork the monorepo on Github, in order to fix bugs or add a feature or such.  At the moment they do this, they get a built-in workflow that will sanity-check their builds on several important targets.  Zero braining involved.

Giving Joe Programmer a CI system that magically smoke tests llvm, out of the box, after he forks the repo, is a compelling reason to make something like Tom's system a standard part of llvm master.

Concerns might be raised that llvm is "preferring" one CI system over another.  Some thoughts about that.  First, because the monorepo's on Github, you'll end up going to github.com anyway to get your first pull.  Second, nothing about Github actions precludes supporting other CI systems in the future.

Thanks for your kind consideration.

--
---

John Byrd
Gigantic Software
2321 E 4th Street
Suite C #429
Santa Ana, CA  92705-3862
http://www.giganticsoftware.com
T: (949) 892-3526 F: (206) 309-0850

Reid Kleckner via llvm-dev

unread,
Dec 12, 2019, 1:53:52 PM12/12/19
to John Byrd, Christian Kühnel, llvm-dev
I think everyone agrees that LLVM needs better CI, automatic pre-commit testing of various platforms, etc. This is not rocket science, it is standard practice for 2019 software engineering.

I think my concern is that LLVM could prove to be too big and require too many resources for github's infrastructure. How many patches go into LLVM a day, and how many build and test jobs does GitHub allow users to run concurrently before being throttled?

You may have seen that Christian Kuhnel has been working on a pre-commit testing bot that integrates with Phab:
I hope that ends up being the way forward and suits Tom's original release testing goals.

_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Valentin Churavy via llvm-dev

unread,
Dec 13, 2019, 8:38:55 AM12/13/19
to Reid Kleckner, llvm-dev, John Byrd
I think my concern is that LLVM could prove to be too big and require too many resources for github's infrastructure. How many patches go into LLVM a day, and how many build and test jobs does GitHub allow users to run concurrently before being throttled?

A big project like LLVM, should almost never rely on the free tier of a CI service. I am neither for nor against Github actions (I personally use them for my project and they work out well, but the caching story needs more work), but Github actions at least allows for self hosted runners that allows us to move the load away from their infrastructure to ours. 

Christian Kühnel via llvm-dev

unread,
Dec 13, 2019, 10:53:36 AM12/13/19
to Valentin Churavy, llvm-dev, John Byrd
I suppose we should discuss the use case first and then find the right tool for the purpose.

Why not re-use the build bots?
What do you want to build and test? Only the release branch?
Is this in addition to the build bots and pre-merge testing?
On which platforms?
How often/when to trigger a build?

--
Christian

--
Best,
Christian

Tom Stellard via llvm-dev

unread,
Dec 13, 2019, 1:56:45 PM12/13/19
to Reid Kleckner, John Byrd, Christian Kühnel, llvm-dev
On 12/12/2019 10:53 AM, Reid Kleckner via llvm-dev wrote:
> I think everyone agrees that LLVM needs better CI, automatic pre-commit testing of various platforms, etc. This is not rocket science, it is standard practice for 2019 software engineering.
>
> I think my concern is that LLVM could prove to be too big and require too many resources for github's infrastructure. How many patches go into LLVM a day, and how many build and test jobs does GitHub allow users to run concurrently before being throttled?
>

The key point from John's email is that the GitHub CI resources are easily
accessible for everyone. So even if we aren't using it as a project for CI,
having working CI definitions available so people can pre-test changes in
their own forks is really valuable.

-Tom

> You may have seen that Christian Kuhnel has been working on a pre-commit testing bot that integrates with Phab:
> https://reviews.llvm.org/p/merge_guards_bot/
> https://github.com/google/llvm-premerge-checks/blob/master/docs/user_doc.md
> I hope that ends up being the way forward and suits Tom's original release testing goals.
>

> On Wed, Dec 11, 2019 at 11:43 PM John Byrd via llvm-dev <llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>> wrote:
>
> Please forgive the incorrect threading on this reply to Tom Stellard's RFC.
>
> > I would like to start using GitHub Actions[1] for CI testing on the release/*
> > branches. As far as I know we don't have any buildbots listening to the
> > release branches, and I think GitHub Actions are a good way for us to
> > quickly bring-up some CI jobs there.
>
> Personally, I feel that Tom's proof of concept, is more important than we seem to be giving him credit for.
>
> As of this writing, the Github actions system permits all comers, six hours of CPU time per build platform. Due to this long CPU allotment, AFAIK, Github is one of the few CIs in town that lets anyone build and smoke llvm for free.
>
> Consider the workflow of someone who has never worked on llvm before. They will probably fork the monorepo on Github, in order to fix bugs or add a feature or such. At the moment they do this, they get a built-in workflow that will sanity-check their builds on several important targets. Zero braining involved.
>
> Giving Joe Programmer a CI system that magically smoke tests llvm, out of the box, after he forks the repo, is a compelling reason to make something like Tom's system a standard part of llvm master.
>

> Concerns might be raised that llvm is "preferring" one CI system over another. Some thoughts about that. First, because the monorepo's on Github, you'll end up going to github.com <http://github.com> anyway to get your first pull. Second, nothing about Github actions precludes supporting other CI systems in the future.


>
> Thanks for your kind consideration.
>
> --
> ---
>
> John Byrd
> Gigantic Software
> 2321 E 4th Street
> Suite C #429
> Santa Ana, CA 92705-3862
> http://www.giganticsoftware.com

> T: (949) 892-3526 <tel:%28949%29%20892-3526> F: (206) 309-0850 <tel:%28206%29%20309-0850>


> _______________________________________________
> LLVM Developers mailing list

> llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

John Byrd via llvm-dev

unread,
Dec 13, 2019, 5:07:43 PM12/13/19
to Reid Kleckner, llvm...@lists.llvm.org
> I think my concern is that LLVM could prove to be too big and require too many resources for github's infrastructure. How many patches go into LLVM a day, and how many build and test jobs does GitHub allow users to run concurrently before being throttled?

Please, no one confuse "what should be LLVM's official CIs" with "what can we do to make it easier for individuals and small companies to experiment with small changes in their own forks." 

Current usage limits for the free Github actions tier are:

- You can execute up to 20 workflows concurrently per repository.
- You can execute up to 1000 API requests in an hour across all actions within a repository.
- Each job in a workflow can run for up to 6 hours of execution time.
- The number of jobs you can run concurrently across all repositories in your account depends on your GitHub plan.
- You can have a maximum concurrent set of 5 maximum concurrent MacOS jobs.

So, this isn't enough juice to replace all the LLVM buildbots, but it is enough to have CI on *your personal fork* of LLVM.  And having CI on everyone's personal fork, makes it that much more likely that your Phabricator patches will be correct the first time.

Best of all, if you don't like Github's CI, you can completely ignore it and proceed with your current workflow.

Russell Gallop via llvm-dev

unread,
Feb 6, 2020, 11:41:53 AM2/6/20
to Tom Stellard, llvm-dev
Hi Tom,

Thank you for setting this up. It's very useful.

One question about what this builds. It only builds "ninja check-all", not "ninja all"[1]. check-all isn't a strict superset of all so while this covers most things, this does miss building a few things such as:
bin/clang-offload-wrapper
bin/llvm-itanium-demangle-fuzzer
bin/llvm-microsoft-demangle-fuzzer
bin/llvm-PerfectShuffle
...
lib/libclang.so
...

For completeness, should this do "ninja all", "ninja check-all" as most buildbot builders do?

Thanks
Russ

Tom Stellard via llvm-dev

unread,
Feb 6, 2020, 11:43:38 AM2/6/20
to Russell Gallop, llvm-dev
On 02/06/2020 08:41 AM, Russell Gallop wrote:
> Hi Tom,
>
> Thank you for setting this up. It's very useful.
>
> One question about what this builds. It only builds "ninja check-all", not "ninja all"[1]. check-all isn't a strict superset of all so while this covers most things, this does miss building a few things such as:
> bin/clang-offload-wrapper
> bin/llvm-itanium-demangle-fuzzer
> bin/llvm-microsoft-demangle-fuzzer
> bin/llvm-PerfectShuffle
> ...
> lib/libclang.so
> ...
>
> For completeness, should this do "ninja all", "ninja check-all" as most buildbot builders do?
>

Does ninja all run the tests too?

-Tom

> On Fri, 13 Dec 2019 at 22:07, John Byrd via llvm-dev <llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>> wrote:
>
> > I think my concern is that LLVM could prove to be too big and require too many resources for github's infrastructure. How many patches go into LLVM a day, and how many build and test jobs does GitHub allow users to run concurrently before being throttled?
>
> Please, no one confuse "what should be LLVM's official CIs" with "what can we do to make it easier for individuals and small companies to experiment with small changes in their own forks."
>
> Current usage limits for the free Github actions tier are:
>
> - You can execute up to 20 workflows concurrently per repository.
> - You can execute up to 1000 API requests in an hour across all actions within a repository.
> - Each job in a workflow can run for up to 6 hours of execution time.
> - The number of jobs you can run concurrently across all repositories in your account depends on your GitHub plan.
> - You can have a maximum concurrent set of 5 maximum concurrent MacOS jobs.
>
> So, this isn't enough juice to replace all the LLVM buildbots, but it is enough to have CI on *your personal fork* of LLVM. And having CI on everyone's personal fork, makes it that much more likely that your Phabricator patches will be correct the first time.
>
> Best of all, if you don't like Github's CI, you can completely ignore it and proceed with your current workflow.
>

> On Thu, Dec 12, 2019 at 10:53 AM Reid Kleckner <r...@google.com <mailto:r...@google.com>> wrote:
>
> I think everyone agrees that LLVM needs better CI, automatic pre-commit testing of various platforms, etc. This is not rocket science, it is standard practice for 2019 software engineering.
>
> I think my concern is that LLVM could prove to be too big and require too many resources for github's infrastructure. How many patches go into LLVM a day, and how many build and test jobs does GitHub allow users to run concurrently before being throttled?
>
> You may have seen that Christian Kuhnel has been working on a pre-commit testing bot that integrates with Phab:
> https://reviews.llvm.org/p/merge_guards_bot/
> https://github.com/google/llvm-premerge-checks/blob/master/docs/user_doc.md
> I hope that ends up being the way forward and suits Tom's original release testing goals.
>

> On Wed, Dec 11, 2019 at 11:43 PM John Byrd via llvm-dev <llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>> wrote:
>
> Please forgive the incorrect threading on this reply to Tom Stellard's RFC.
>
> > I would like to start using GitHub Actions[1] for CI testing on the release/*
> > branches. As far as I know we don't have any buildbots listening to the
> > release branches, and I think GitHub Actions are a good way for us to
> > quickly bring-up some CI jobs there.
>
> Personally, I feel that Tom's proof of concept, is more important than we seem to be giving him credit for.
>
> As of this writing, the Github actions system permits all comers, six hours of CPU time per build platform. Due to this long CPU allotment, AFAIK, Github is one of the few CIs in town that lets anyone build and smoke llvm for free.
>
> Consider the workflow of someone who has never worked on llvm before. They will probably fork the monorepo on Github, in order to fix bugs or add a feature or such. At the moment they do this, they get a built-in workflow that will sanity-check their builds on several important targets. Zero braining involved.
>
> Giving Joe Programmer a CI system that magically smoke tests llvm, out of the box, after he forks the repo, is a compelling reason to make something like Tom's system a standard part of llvm master.
>

> Concerns might be raised that llvm is "preferring" one CI system over another. Some thoughts about that. First, because the monorepo's on Github, you'll end up going to github.com <http://github.com> anyway to get your first pull. Second, nothing about Github actions precludes supporting other CI systems in the future.


>
> Thanks for your kind consideration.
>
> --
> ---
>
> John Byrd
> Gigantic Software
> 2321 E 4th Street
> Suite C #429
> Santa Ana, CA 92705-3862
> http://www.giganticsoftware.com

> T: (949) 892-3526 <tel:%28949%29%20892-3526> F: (206) 309-0850 <tel:%28206%29%20309-0850>

> _______________________________________________
> LLVM Developers mailing list

> llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>


> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
>
> --
> ---
>
> John Byrd
> Gigantic Software
> 2321 E 4th Street
> Suite C #429
> Santa Ana, CA 92705-3862
> http://www.giganticsoftware.com
> T: (949) 892-3526 F: (206) 309-0850
> _______________________________________________
> LLVM Developers mailing list

> llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Russell Gallop via llvm-dev

unread,
Feb 6, 2020, 3:50:07 PM2/6/20
to Tom Stellard, llvm-dev
> Does ninja all run the tests too?

No, it just builds everything.

Russ

Sjoerd Meijer via llvm-dev

unread,
Mar 5, 2020, 5:50:55 AM3/5/20
to Russell Gallop via llvm-dev, Tom Stellard
This is cool stuff.

Just wanted to share a very minor inconvenience: I wish I could hide/collapse the "Lint: Pre-merge checks" boxes, like you can with review comments. Looks like I can't do that at the moment, which makes some parts difficult to read.

Thanks for working on this.

From: llvm-dev <llvm-dev...@lists.llvm.org> on behalf of Russell Gallop via llvm-dev <llvm...@lists.llvm.org>
Sent: 06 February 2020 20:49
To: Tom Stellard <tste...@redhat.com>
Cc: llvm-dev <llvm...@lists.llvm.org>
Subject: Re: [llvm-dev] RFC: Using GitHub Actions for CI testing on the release/* branches
 
Reply all
Reply to author
Forward
0 new messages