diff mbox series

[3/3] CI: Coverity tweaks

Message ID 20220221100254.13661-4-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series Misc coverity fixes and tweaks | expand

Commit Message

Andrew Cooper Feb. 21, 2022, 10:02 a.m. UTC
* Use workflow_dispatch to allow manual creation of the job.
 * Use parallel builds.  The workers have two vCPUs.
 * Shrink the dependency list further.  build-essential covers make and gcc,
   while bridge-utils and iproute2 are runtime dependencies not build
   dependencies.  Alter bzip2 to libbz2-dev.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 .github/workflows/coverity.yml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Roger Pau Monné Feb. 21, 2022, 10:37 a.m. UTC | #1
On Mon, Feb 21, 2022 at 10:02:54AM +0000, Andrew Cooper wrote:
>  * Use workflow_dispatch to allow manual creation of the job.
>  * Use parallel builds.  The workers have two vCPUs.
>  * Shrink the dependency list further.  build-essential covers make and gcc,
>    while bridge-utils and iproute2 are runtime dependencies not build
>    dependencies.  Alter bzip2 to libbz2-dev.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Roger Pau Monné <roger.pau@citrix.com>
> ---
>  .github/workflows/coverity.yml | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
> index 9d04b56fd31d..6e7b81e74f72 100644
> --- a/.github/workflows/coverity.yml
> +++ b/.github/workflows/coverity.yml
> @@ -2,6 +2,7 @@ name: Coverity Scan
>  
>  # We only want to test official release code, not every pull request.
>  on:
> +  workflow_dispatch:
>    schedule:
>      - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC
>  
> @@ -11,11 +12,11 @@ jobs:
>      steps:
>      - name: Install build dependencies
>        run: |
> -        sudo apt-get install -y wget git gawk bridge-utils \
> -          iproute2 bzip2 build-essential \
> -          make gcc zlib1g-dev libncurses5-dev iasl \
> -          libbz2-dev e2fslibs-dev git-core uuid-dev ocaml \
> -          ocaml-findlib xz-utils libyajl-dev \
> +        sudo apt-get install -y wget git gawk \
> +          libbz2-dev build-essential \
> +          zlib1g-dev libncurses5-dev iasl \
> +          libbz2-dev e2fslibs-dev uuid-dev ocaml \
> +          ocaml-findlib libyajl-dev \
>            autoconf libtool liblzma-dev \
>            python3-dev golang python-dev libsystemd-dev
>  
> @@ -31,7 +32,7 @@ jobs:
>  
>      - name: Pre build stuff
>        run: |
> -        make mini-os-dir
> +        make -j`nproc` mini-os-dir
>  
>      - uses: vapier/coverity-scan-action@v1
>        with:
> @@ -39,3 +40,4 @@ jobs:
>          project: XenProject
>          email: ${{ secrets.COVERITY_SCAN_EMAIL }}
>          token: ${{ secrets.COVERITY_SCAN_TOKEN }}
> +        command: make -j`nproc` build

There's already a 'command:' parameter set just before 'project:'. Are
we OK with using plain build?

If so we would have to disable docs build and stubdom? We don't want
to analyze all the newlib &c that's build as part of stubdoms?

Anyway, the switch from `make xen tools && make -C extras/mini-os/`
to `make build` needs to be explained in the commit message IMO.

Thanks, Roger.
Andrew Cooper Feb. 21, 2022, 10:55 a.m. UTC | #2
On 21/02/2022 10:37, Roger Pau Monné wrote:
> On Mon, Feb 21, 2022 at 10:02:54AM +0000, Andrew Cooper wrote:
>>  * Use workflow_dispatch to allow manual creation of the job.
>>  * Use parallel builds.  The workers have two vCPUs.
>>  * Shrink the dependency list further.  build-essential covers make and gcc,
>>    while bridge-utils and iproute2 are runtime dependencies not build
>>    dependencies.  Alter bzip2 to libbz2-dev.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: Roger Pau Monné <roger.pau@citrix.com>
>> ---
>>  .github/workflows/coverity.yml | 14 ++++++++------
>>  1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
>> index 9d04b56fd31d..6e7b81e74f72 100644
>> --- a/.github/workflows/coverity.yml
>> +++ b/.github/workflows/coverity.yml
>> @@ -2,6 +2,7 @@ name: Coverity Scan
>>  
>>  # We only want to test official release code, not every pull request.
>>  on:
>> +  workflow_dispatch:
>>    schedule:
>>      - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC
>>  
>> @@ -11,11 +12,11 @@ jobs:
>>      steps:
>>      - name: Install build dependencies
>>        run: |
>> -        sudo apt-get install -y wget git gawk bridge-utils \
>> -          iproute2 bzip2 build-essential \
>> -          make gcc zlib1g-dev libncurses5-dev iasl \
>> -          libbz2-dev e2fslibs-dev git-core uuid-dev ocaml \
>> -          ocaml-findlib xz-utils libyajl-dev \
>> +        sudo apt-get install -y wget git gawk \
>> +          libbz2-dev build-essential \
>> +          zlib1g-dev libncurses5-dev iasl \
>> +          libbz2-dev e2fslibs-dev uuid-dev ocaml \
>> +          ocaml-findlib libyajl-dev \
>>            autoconf libtool liblzma-dev \
>>            python3-dev golang python-dev libsystemd-dev
>>  
>> @@ -31,7 +32,7 @@ jobs:
>>  
>>      - name: Pre build stuff
>>        run: |
>> -        make mini-os-dir
>> +        make -j`nproc` mini-os-dir
>>  
>>      - uses: vapier/coverity-scan-action@v1
>>        with:
>> @@ -39,3 +40,4 @@ jobs:
>>          project: XenProject
>>          email: ${{ secrets.COVERITY_SCAN_EMAIL }}
>>          token: ${{ secrets.COVERITY_SCAN_TOKEN }}
>> +        command: make -j`nproc` build
> There's already a 'command:' parameter set just before 'project:'.

Oh, so there is.

> Are
> we OK with using plain build?
>
> If so we would have to disable docs build and stubdom? We don't want
> to analyze all the newlib &c that's build as part of stubdoms?

The problem I was trying to work around there was that xen&tools turn
into *-install so we also spend time shuffling binaries around the build
environment.

What we actually want is:

make -j`nproc` build-xen build-tools && make -j`nproc` -C extras/mini-os/

~Andrew
diff mbox series

Patch

diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 9d04b56fd31d..6e7b81e74f72 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -2,6 +2,7 @@  name: Coverity Scan
 
 # We only want to test official release code, not every pull request.
 on:
+  workflow_dispatch:
   schedule:
     - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC
 
@@ -11,11 +12,11 @@  jobs:
     steps:
     - name: Install build dependencies
       run: |
-        sudo apt-get install -y wget git gawk bridge-utils \
-          iproute2 bzip2 build-essential \
-          make gcc zlib1g-dev libncurses5-dev iasl \
-          libbz2-dev e2fslibs-dev git-core uuid-dev ocaml \
-          ocaml-findlib xz-utils libyajl-dev \
+        sudo apt-get install -y wget git gawk \
+          libbz2-dev build-essential \
+          zlib1g-dev libncurses5-dev iasl \
+          libbz2-dev e2fslibs-dev uuid-dev ocaml \
+          ocaml-findlib libyajl-dev \
           autoconf libtool liblzma-dev \
           python3-dev golang python-dev libsystemd-dev
 
@@ -31,7 +32,7 @@  jobs:
 
     - name: Pre build stuff
       run: |
-        make mini-os-dir
+        make -j`nproc` mini-os-dir
 
     - uses: vapier/coverity-scan-action@v1
       with:
@@ -39,3 +40,4 @@  jobs:
         project: XenProject
         email: ${{ secrets.COVERITY_SCAN_EMAIL }}
         token: ${{ secrets.COVERITY_SCAN_TOKEN }}
+        command: make -j`nproc` build