libusb icon indicating copy to clipboard operation
libusb copied to clipboard

Travis-CI and Coverity Scan for libusb project

Open mcuee opened this issue 2 years ago • 20 comments

We have the link to travis-ci.org: https://travis-ci.org/github/libusb/libusb And it says the following.

Since June 15th, 2021, the building on travis-ci.org is ceased. Please use travis-ci.com from now on.

Shall we just disable it?

mcuee avatar Jan 22 '23 23:01 mcuee

I suppose you mean the build status badge link in README? Yes, until someone sets up something on travis-ci.com we can remove that badge. The same goes for Coverity, it was only run 9 months ago.

Appveyor works fine, just a little annoying that it goes red in case one of the jobs experiences an internal error, which seems to often happen during artifact uploading.

tormodvolden avatar Jan 23 '23 07:01 tormodvolden

@tormodvolden

Yes. I mean the build status badge link in README. Since we already have github action for Linux and macOS, I think we can remove the badge link.

We can probably remove the configuration file as well. https://github.com/libusb/libusb/blob/master/.travis.yml

As for Coverity, it is only triggered manually. I have invited you to be an owner of Coverity libusb project.

mcuee avatar Jan 23 '23 08:01 mcuee

If it makes it easier for someone to get Travis-CI going again, I think we can leave the config file. I don't know if there are any advantages with Travis-CI, but it is good to have alternatives.

Thanks for the invite, but I have no plans to pick up on that. Maybe @benzea is interested?

tormodvolden avatar Jan 24 '23 13:01 tormodvolden

@tormodvolden Okay, so we will just remove the badge for now.

mcuee avatar Jan 25 '23 01:01 mcuee

@LudovicRousseau

Just wondering if you can help to get Travis-CI going agin and help to submit for Coverity run. Thanks.

mcuee avatar Jan 25 '23 01:01 mcuee

@benzea

Just wonder if you are interested in Coverity for libusb project. Thanks.

mcuee avatar Jan 25 '23 01:01 mcuee

@mcuee unfortunately I changed jobs, so I am not the RedHat downstream for the libusb package anymore.

benzea avatar Jan 25 '23 14:01 benzea

I suggest to move away from Travis-CI and use github actions instead.

I just submitted a new Coverity scan: 1 bug fixed. @mcuee I think you are an admin for the Coverity libusb project. You can submit new builds yourself. No?

LudovicRousseau avatar Jan 25 '23 17:01 LudovicRousseau

@benzea

No problem. Thanks for the help for the libusb project.

mcuee avatar Jan 26 '23 11:01 mcuee

@LudovicRousseau

Thanks for the help. I have the account but I have not figured out the way to submit for Coverity scan yet. I will try it later.

mcuee avatar Jan 26 '23 11:01 mcuee

@mcuee unfortunately I changed jobs, so I am not the RedHat downstream for the libusb package anymore.

@benzea We hope you can stay involved with libusb, also as a volunteer! Your help is very much appreciated.

tormodvolden avatar Jan 26 '23 11:01 tormodvolden

I can try, feel free to CC me on issues for me to have a look (I have unwatched the repo as a whole, too much noise overall with all the non-linux backends).

benzea avatar Jan 26 '23 13:01 benzea

To submit a new build to Coverity I use this coverity.sh script:

#!/bin/bash

set -e
set -x
source coverity.config

export LANG=C
VERSION=$(git log -1 | grep commit | cut --fields=2 --delimiter=' ')

# generate files
make clean
rm -rf {,coverity/}cov-int
cov-build --dir cov-int make $MAKEFLAGS
tar czvf project.tgz cov-int

curl \
	--form token=$TOKEN \
	--form email=$EMAIL \
	--form [email protected] \
	--form version=$VERSION \
	--form description=$DESCRIPTION \
	https://scan.coverity.com/builds?project=$PROJECT

The file coverity.conf contains:

PROJECT=libusb-libusb
TOKEN=xxxxxxxx
EMAIL=your email for coverity
DESCRIPTION=libusb

You can see the project token at https://scan.coverity.com/projects/libusb-libusb?tab=project_settings

LudovicRousseau avatar Jan 27 '23 16:01 LudovicRousseau

Out of curiosity: So you upload a full tarball? Can't it pull from a git repo like these other CI services? What is cov-build?

tormodvolden avatar Jan 27 '23 17:01 tormodvolden

AFAIK Coverity does not build the software, you have to install a special toolchain (i.e. cov-build) to rebuild the software and submit it. Maybe it is possible to do something else. It is just how I do it for "my" projects.

LudovicRousseau avatar Jan 27 '23 18:01 LudovicRousseau

@LudovicRousseau

Can we adopt the approach here from @pbatard for the rufus project for coverity scan? https://github.com/pbatard/rufus/blob/master/.github/workflows/coverity.yml

mcuee avatar Jan 28 '23 01:01 mcuee

@mcuee it should be possible. Just do it :-)

I am not convinced we should submit a new Coverity check for each commit.

LudovicRousseau avatar Jan 28 '23 11:01 LudovicRousseau

@mcuee it should be possible. Just do it :-)

I am not convinced we should submit a new Coverity check for each commit.

I agree. It should only be manually triggered.

mcuee avatar Jan 28 '23 12:01 mcuee

hidapi has Coverity check for Windows, macOS and Linux. https://github.com/libusb/hidapi/blob/master/.github/workflows/checks.yml

@Youw

Just wondering if you can help here. Thanks.

mcuee avatar Feb 14 '24 23:02 mcuee

I can help with the advice/review/etc. if someone volunteers to get it done :)

Youw avatar Feb 15 '24 10:02 Youw