[PATCH v2] CI: Coverity tweaks

Andrew Cooper posted 1 patch 2 years, 2 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220221111454.2925-1-andrew.cooper3@citrix.com
.github/workflows/coverity.yml | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
[PATCH v2] CI: Coverity tweaks
Posted by Andrew Cooper 2 years, 2 months ago
 * Use workflow_dispatch to allow manual creation of the job.
 * Use parallel builds; the workers have two vCPUs.  Also, use the build-*
   targets rather than the ones which expand to dist-*.
 * 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>

v2:
 * Merge with existing command:
---
 .github/workflows/coverity.yml | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 9d04b56fd31d..427fb86f947f 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,11 +32,11 @@ jobs:
 
     - name: Pre build stuff
       run: |
-        make mini-os-dir
+        make -j`nproc` mini-os-dir
 
     - uses: vapier/coverity-scan-action@v1
       with:
-        command: make xen tools && make -C extras/mini-os/
+        command: make -j`nproc` build-xen build-tools && make -j`nproc` -C extras/mini-os/
         project: XenProject
         email: ${{ secrets.COVERITY_SCAN_EMAIL }}
         token: ${{ secrets.COVERITY_SCAN_TOKEN }}
-- 
2.11.0


Re: [PATCH v2] CI: Coverity tweaks
Posted by Roger Pau Monné 2 years, 2 months ago
On Mon, Feb 21, 2022 at 11:14:54AM +0000, Andrew Cooper wrote:
>  * Use workflow_dispatch to allow manual creation of the job.

I guess such manual creation requires some kind of superpower
credentials on the github repo?

>  * Use parallel builds; the workers have two vCPUs.  Also, use the build-*
>    targets rather than the ones which expand to dist-*.
>  * 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>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

Re: [PATCH v2] CI: Coverity tweaks
Posted by Andrew Cooper 2 years, 2 months ago
On 21/02/2022 11:22, Roger Pau Monné wrote:
> On Mon, Feb 21, 2022 at 11:14:54AM +0000, Andrew Cooper wrote:
>>  * Use workflow_dispatch to allow manual creation of the job.
> I guess such manual creation requires some kind of superpower
> credentials on the github repo?

I'd expect its open to project members.

>>  * Use parallel builds; the workers have two vCPUs.  Also, use the build-*
>>    targets rather than the ones which expand to dist-*.
>>  * 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>
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks,

~Andrew