robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
20f44076dc
master
1name : coverity 2on : 3schedule : 4- cron : '10 0 * * *' # Run every day at 00:10 5workflow_dispatch : 6 7permissions : 8contents : read 9 10jobs : 11scan : 12runs-on : ubuntu-latest 13steps : 14- name : Check for the Coverity Scan token 15env : 16TOKEN : ${{ secrets.COVERITY_SCAN_TOKEN }} 17: ${{ secrets.COVERITY_SCAN_EMAIL }} 18run : | 19if [[ -n "$TOKEN" && -n "EMAIL" ]]; then 20echo "have_coverity_token=yes" >> $GITHUB_ENV 21fi 22 23- if : env.have_coverity_token 24uses : actions/checkout@v7.0.1 25with : 26persist-credentials : false 27 28- if : env.have_coverity_token 29uses : ./.github/actions/setup 30 31- if : env.have_coverity_token 32name : Download Coverity 33run : | 34wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=neovim%2Fneovim" -O coverity_tool.tgz 35mkdir cov-scan 36tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan 37env : 38TOKEN : ${{ secrets.COVERITY_SCAN_TOKEN }} 39 40- if : env.have_coverity_token 41name : Build dependencies 42run : make deps 43 44- if : env.have_coverity_token 45name : Build/scan neovim 46run : | 47env PATH=$(pwd)/cov-scan/bin:$PATH cov-build --dir cov-int make 48 49- if : env.have_coverity_token 50name : Submit results 51run : | 52tar zcf cov-scan.tgz cov-int 53curl --form token=$TOKEN \ 54--form email=$EMAIL \ 55--form file=@cov-scan.tgz \ 56--form version="$(git rev-parse HEAD)" \ 57--form description="Daily GHA scan" \ 58'https://scan.coverity.com/builds?project=neovim%2Fneovim' 59env : 60TOKEN : ${{ secrets.COVERITY_SCAN_TOKEN }} 61: ${{ secrets.COVERITY_SCAN_EMAIL }}