coverity: trigger scan as a github action
cover coverity: trigger scan as a github action
Hello,
Following series introduces a github workflow to trigger a Coverity Scan. First patch attempts to move the logic currently in osstest into a github action mostly as-is (same build targets).
Second patch removes the build of QEMU, SeaBIOS and OVMF from the Coverity Scan.
Thanks, Roger.
Roger Pau Monne (2):
github: add workflow to run Coverity scans
coverity: do not build QEMU, SeaBIOS or OVMF
.github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml
Signature · 1 line
2.34.1
PATCH 1/2 github: add workflow to run Coverity scans
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml
.github/workflows/coverity.yml new file +35 -0
@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies + run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-dev + - uses: actions/checkout@v2 + - name: Configure Xen + run: | + ./configure + - name: Pre build stuff + run: | + make -C tools/firmware/etherboot all && make mini-os-dir + - uses: vapier/coverity-scan-action@v1 + with: + command: make xen tools && make -C extras/mini-os/ + project: XenProject + email: ${{ secrets.COVERITY_SCAN_EMAIL }} + token: ${{ secrets.COVERITY_SCAN_TOKEN }}
Signature · 1 line
2.34.1
Re: [PATCH 1/2] github: add workflow to run Coverity scans
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies
.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-dev
We dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
.github/workflows/coverity.yml line 23
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2
I think we want
- uses: actions/checkout@v2
with:
ref: staging
Can also fix on commit.
can see that Coverity has done the right thing with this.)
Quoted 12 lines
.github/workflows/coverity.yml new file +12
-0+ - name: Configure Xen + run: | + ./configure + - name: Pre build stuff + run: | + make -C tools/firmware/etherboot all && make mini-os-dir + - uses: vapier/coverity-scan-action@v1 + with: + command: make xen tools && make -C extras/mini-os/ + project: XenProject + email: ${{ secrets.COVERITY_SCAN_EMAIL }} + token: ${{ secrets.COVERITY_SCAN_TOKEN }}
Re: [PATCH 1/2] github: add workflow to run Coverity scans
Quoted 50 lines · Andrew Cooper
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-devWe dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
.github/workflows/coverity.yml line 23
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2I think we want
Quoted 12 lines
- uses: actions/checkout@v2
with:
ref: stagingCan also fix on commit.
can see that Coverity has done the right thing with this.)
Quoted 3 lines
.github/workflows/coverity.yml new file +3
-0+ - name: Configure Xen + run: | + ./configure
On second thoughts, we can probably --disable-docs here, because it's just wasted processing time when all we care about is the C.
~Andrew
Re: [PATCH 1/2] github: add workflow to run Coverity scans
Quoted 60 lines · Andrew Cooper
Quoted 59 lines · Andrew Cooper
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-devWe dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
.github/workflows/coverity.yml line 23
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2I think we want
- uses: actions/checkout@v2
with:
ref: stagingCan also fix on commit.
can see that Coverity has done the right thing with this.)
Quoted 6 lines
Quoted 3 lines
.github/workflows/coverity.yml line 26
Quoted 3 lines
.github/workflows/coverity.yml new file +3
-0+ - name: Configure Xen + run: | + ./configureOn second thoughts, we can probably --disable-docs here, because it's just wasted processing time when all we care about is the C.
We do not build the docs already, because the build command is make xen tools.
Thanks, Roger.
Re: [PATCH 1/2] github: add workflow to run Coverity scans
Can someone please tell me how to remove my email account from this list? Thank you.
Quoted 71 lines · Roger Pau Monné
Quoted 57 lines · Andrew Cooper
Quoted 56 lines · Andrew Cooper
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)create mode 100644
.github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-devWe dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
.github/workflows/coverity.yml line 23
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2I think we want
- uses: actions/checkout@v2
with:
ref: stagingCan also fix on commit.
Quoted 8 lines
Quoted 6 lines
can see that Coverity has done the right thing with this.)
Quoted 3 lines
.github/workflows/coverity.yml new file +3
-0+ - name: Configure Xen + run: | + ./configureOn second thoughts, we can probably --disable-docs here, because it's just wasted processing time when all we care about is the C.
We do not build the docs already, because the build command is
make xen tools.Thanks, Roger.
[unsubscribe from xen-devel] Re: [PATCH 1/2] github: add workflow to run Coverity scans
Quoted 2 lines · Brian Olson
Can someone please tell me how to remove my email account from this list? Thank you.
Use https://lists.xenproject.org/mailman/listinfo/xen-devel to unsubscribe.
~Andrew
Re: [PATCH 1/2] github: add workflow to run Coverity scans
In reply to Roger Pau MonnéQuoted 64 lines · Roger Pau Monne
Quoted 63 lines · Andrew Cooper
Quoted 62 lines · Andrew Cooper
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-devWe dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
.github/workflows/coverity.yml line 23
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2I think we want
- uses: actions/checkout@v2
with:
ref: stagingCan also fix on commit.
can see that Coverity has done the right thing with this.)
Quoted 3 lines
.github/workflows/coverity.yml new file +3
-0+ - name: Configure Xen + run: | + ./configure
Quoted 6 lines
Quoted 2 lines
On second thoughts, we can probably --disable-docs here, because it's just wasted processing time when all we care about is the C.
We do not build the docs already, because the build command is
make xen tools.Thanks, Roger.
Good point.
~Andrew
Re: [PATCH 1/2] github: add workflow to run Coverity scans
In reply to Andrew CooperQuoted 48 lines · Andrew Cooper
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-devWe dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
Quoted 7 lines
.github/workflows/coverity.yml line 23
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2I think we want
- uses: actions/checkout@v2
with:
ref: staging
I've assumed we wanted master as that at least functional per the testing done in osstest. But maybe it's indeed better to use staging in order to catch issues before they reach master.
I'm fine with this.
Thanks, Roger.
Re: [PATCH 1/2] github: add workflow to run Coverity scans
Quoted 49 lines · Roger Pau Monne
Quoted 48 lines · Andrew Cooper
Quoted 33 lines · Roger Pau Monne
Add a workflow that performs a build like it's done by osstest Coverity flight and uploads the result to Coverity for analysis. The build process is exactly the same as the one currently used in osstest, and it's also run at the same time (bi-weekly).
This has one big benefit over using osstest: we no longer have to care about keeping the Coverity tools up to date in osstest.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>--- .github/workflows/coverity.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/coverity.yml.github/workflows/coverity.yml new file +12
-0@@ -0,0 +1,35 @@ +name: Coverity Scan + +# We only want to test official release code, not every pull request. +on: + schedule: + - cron: '18 9 * * WED,SUN' # Bi-weekly at 9:18 UTC + +jobs: + coverity: + runs-on: ubuntu-latest + steps: + - name: Install build dependencies.github/workflows/coverity.yml line 22
Quoted 10 lines
.github/workflows/coverity.yml new file +10
-0+ run: | + sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ + iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ + make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ + libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ + ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ + libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ + libtool libfuse-dev liblzma-dev ninja-build \ + kpartx python3-dev python3-pip golang python-dev libsystemd-devWe dropped gettext as a dependency a few releases ago, and we don't need python3-pip either. Can fix on commit.
Quoted 1 line
.github/workflows/coverity.yml new file +1
-0+ - uses: actions/checkout@v2
Quoted 8 lines
Quoted 5 lines
I think we want
- uses: actions/checkout@v2
with:
ref: stagingI've assumed we wanted master as that at least functional per the testing done in osstest. But maybe it's indeed better to use staging in order to catch issues before they reach master.
IIRC, OSSTest has Coverity following smoke, but these days we're far better are not breaking the build now that Gitlab CI is in place.
But it might be prudent to check that if the build fails, we don't submit a partial result to Coverity.
The difference between staging and master is purely how early we get the report.
~Andrew
PATCH 2/2 coverity: do not build QEMU, SeaBIOS or OVMF
In reply to Roger Pau MonneSuch external projects should have their own Coverity runs, and there's not much point in also making them part of our scan (apart from greatly increasing the amount of code scanned).
Trim the dependencies now that QEMU is not built.
--- .github/workflows/coverity.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
.github/workflows/coverity.yml +11 -11
@@ -11,22 +11,22 @@ jobs: steps: - name: Install build dependencies run: | - sudo apt-get install -y wget git bcc bin86 gawk bridge-utils \ - iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential \ - make gcc libc6-dev libc6-dev-i386 linux-libc-dev zlib1g-dev \ - libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl \ - libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev \ - ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev \ - libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake \ - libtool libfuse-dev liblzma-dev ninja-build \ - kpartx python3-dev python3-pip golang python-dev libsystemd-dev + sudo apt-get install -y wget git gawk bridge-utils \ + iproute2 bzip2 build-essential \ + make gcc zlib1g-dev libncurses5-dev patch iasl \ + libbz2-dev e2fslibs-dev git-core uuid-dev ocaml \ + ocaml-findlib xz-utils gettext libyajl-dev \ + autoconf libtool liblzma-dev \ + python3-dev python3-pip golang python-dev libsystemd-dev - uses: actions/checkout@v2 - name: Configure Xen run: | - ./configure + ./configure --with-system-qemu=/bin/true \ + --with-system-seabios=/bin/true \ + --with-system-ovmf=/bin/true - name: Pre build stuff run: | - make -C tools/firmware/etherboot all && make mini-os-dir + make mini-os-dir - uses: vapier/coverity-scan-action@v1 with: command: make xen tools && make -C extras/mini-os/
Signature · 1 line
2.34.1
Re: [PATCH 2/2] coverity: do not build QEMU, SeaBIOS or OVMF
Quoted 7 lines · Roger Pau Monne
Such external projects should have their own Coverity runs, and there's not much point in also making them part of our scan (apart from greatly increasing the amount of code scanned).
Trim the dependencies now that QEMU is not built.
Signed-off-by Roger Pau Monné <[email protected]>