git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] How to fix 'static-analysis' build on Ubuntu 20.04
@ 2022-08-22 15:19 Derrick Stolee
  2022-08-22 22:26 ` SZEDER Gábor
  0 siblings, 1 reply; 3+ messages in thread
From: Derrick Stolee @ 2022-08-22 15:19 UTC (permalink / raw)
  To: Git Mailing List

While preparing my latest series, I noticed that the GitHub Actions CI
builds were cancelling the 'static-analysis' job because of a brownout of
Ubuntu 18.04. We are recommended to upgrade to 20.04.

However, we explicitly chose 18.04 in d051ed77ee6
(.github/workflows/main.yml: run static-analysis on bionic, 2021-02-08)
because coccinelle was not available in 20.04. It still isn't available
since I tried the basic update and it failed [1]

[1] https://github.com/gitgitgadget/git/runs/7955077955?check_suite_focus=true#step:3:98

Does anyone have an idea of how to install coccinelle on this newer
version? Should we try compiling it from source for this job? Should we
consider moving off of coccinelle and onto a different tool?

Thanks,
-Stolee

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Question] How to fix 'static-analysis' build on Ubuntu 20.04
  2022-08-22 15:19 [Question] How to fix 'static-analysis' build on Ubuntu 20.04 Derrick Stolee
@ 2022-08-22 22:26 ` SZEDER Gábor
  2022-08-23 17:30   ` Derrick Stolee
  0 siblings, 1 reply; 3+ messages in thread
From: SZEDER Gábor @ 2022-08-22 22:26 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: Git Mailing List

On Mon, Aug 22, 2022 at 11:19:11AM -0400, Derrick Stolee wrote:
> While preparing my latest series, I noticed that the GitHub Actions CI
> builds were cancelling the 'static-analysis' job because of a brownout of
> Ubuntu 18.04. We are recommended to upgrade to 20.04.
> 
> However, we explicitly chose 18.04 in d051ed77ee6
> (.github/workflows/main.yml: run static-analysis on bionic, 2021-02-08)
> because coccinelle was not available in 20.04. It still isn't available
> since I tried the basic update and it failed [1]
> 
> [1] https://github.com/gitgitgadget/git/runs/7955077955?check_suite_focus=true#step:3:98
> 
> Does anyone have an idea of how to install coccinelle on this newer
> version? 

Containers?  I've built Docker containers from most recent Coccinelle
versions and used to use them in my custom Travis CI build jobs; the
version included in Ubuntu 18.04 is rather old, and apparently it
doesn't catch some transformations that later versions do [1].  I'm
sure it's somehow possible to use such containers in GitHub Actions as
well.

> Should we try compiling it from source for this job?

It's not that difficult to build Coccinelle from source once you
figure out its OCaml dependencies...  And luckily those dependencies
seem to be rather stable: we can pass the same dozen or so package
names to 'apt-get' to install all its build dependencies both on
ubuntu:18.04 and :20.04 base images.

However, installing dependencies and building Coccinelle takes almost
5 minutes on my machine; I don't think we'd want to add that much
overhead to every CI build.

> Should we
> consider moving off of coccinelle and onto a different tool?

Is there any other comparable tool out there?!


[1] https://public-inbox.org/git/20220822213408.662482-1-szeder.dev@gmail.com/
    a6a01e7d8a (promisor-remote: fix xcalloc() argument order, 2022-08-22)
    d2c4e6292a (builtin rebase: use oideq(), 2019-04-06)
    7762f44ee0 (builtin rebase: use FREE_AND_NULL, 2019-04-06)
[2] In a sequential build; alas parallel builds always fail.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Question] How to fix 'static-analysis' build on Ubuntu 20.04
  2022-08-22 22:26 ` SZEDER Gábor
@ 2022-08-23 17:30   ` Derrick Stolee
  0 siblings, 0 replies; 3+ messages in thread
From: Derrick Stolee @ 2022-08-23 17:30 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: Git Mailing List

On 8/22/2022 6:26 PM, SZEDER Gábor wrote:
> On Mon, Aug 22, 2022 at 11:19:11AM -0400, Derrick Stolee wrote:
>> While preparing my latest series, I noticed that the GitHub Actions CI
>> builds were cancelling the 'static-analysis' job because of a brownout of
>> Ubuntu 18.04. We are recommended to upgrade to 20.04.
>>
>> However, we explicitly chose 18.04 in d051ed77ee6
>> (.github/workflows/main.yml: run static-analysis on bionic, 2021-02-08)
>> because coccinelle was not available in 20.04. It still isn't available
>> since I tried the basic update and it failed [1]
>>
>> [1] https://github.com/gitgitgadget/git/runs/7955077955?check_suite_focus=true#step:3:98
>>
>> Does anyone have an idea of how to install coccinelle on this newer
>> version? 
> 
> Containers?  I've built Docker containers from most recent Coccinelle
> versions and used to use them in my custom Travis CI build jobs; the
> version included in Ubuntu 18.04 is rather old, and apparently it
> doesn't catch some transformations that later versions do [1].  I'm
> sure it's somehow possible to use such containers in GitHub Actions as
> well.
> 
>> Should we try compiling it from source for this job?
> 
> It's not that difficult to build Coccinelle from source once you
> figure out its OCaml dependencies...  And luckily those dependencies
> seem to be rather stable: we can pass the same dozen or so package
> names to 'apt-get' to install all its build dependencies both on
> ubuntu:18.04 and :20.04 base images.

These are both good ideas to consider if we need to in the future,
but it turns out that we can jump over 20.04 to 22.04 and that has
the correct feeds to install Coccinelle. I submitted an update [1].

[1] https://lore.kernel.org/git/pull.1334.git.1661275691795.gitgitgadget@gmail.com

> However, installing dependencies and building Coccinelle takes almost
> 5 minutes on my machine; I don't think we'd want to add that much
> overhead to every CI build.
> 
>> Should we
>> consider moving off of coccinelle and onto a different tool?
> 
> Is there any other comparable tool out there?!

I didn't have one in mind, but maybe someone else did? You make me
think that there is not, which isn't surprising.

Thanks,
-Stolee

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-23 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 15:19 [Question] How to fix 'static-analysis' build on Ubuntu 20.04 Derrick Stolee
2022-08-22 22:26 ` SZEDER Gábor
2022-08-23 17:30   ` Derrick Stolee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).