annotate .github/workflows/coverity.yml @ 31225:39d22d78ce92 v9.0.0946

patch 9.0.0946: CI: Error in Coverity flow is not reported Commit: https://github.com/vim/vim/commit/ad85af5b384d8d36d7bd3e9b4086190d3a40ab15 Author: K.Takata <kentkt@csc.jp> Date: Fri Nov 25 00:57:05 2022 +0000 patch 9.0.0946: CI: Error in Coverity flow is not reported Problem: CI: Error in Coverity flow is not reported. Solution: Use another way to avoid errors in a forked repository. (Ken Takata, closes #11609)
author Bram Moolenaar <Bram@vim.org>
date Fri, 25 Nov 2022 02:00:04 +0100
parents 1fcabfdd0547
children dd85b8e05559
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 name: Coverity
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 on:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 schedule:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 - cron: '42 0 * * *' # Run once per day, to avoid Coverity's submission limits
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 workflow_dispatch:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
30515
5b94b8c82687 patch 9.0.0593: CI actions have too many permissions
Bram Moolenaar <Bram@vim.org>
parents: 29928
diff changeset
7 permissions:
5b94b8c82687 patch 9.0.0593: CI actions have too many permissions
Bram Moolenaar <Bram@vim.org>
parents: 29928
diff changeset
8 contents: read # to fetch code (actions/checkout)
5b94b8c82687 patch 9.0.0593: CI actions have too many permissions
Bram Moolenaar <Bram@vim.org>
parents: 29928
diff changeset
9
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 jobs:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 scan:
29857
a0a446bc3aea patch 9.0.0267: Coverity workflow still uses Ubuntu 18.04
Bram Moolenaar <Bram@vim.org>
parents: 29060
diff changeset
12 runs-on: ubuntu-20.04
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 CC: gcc
29928
0c52f8114e16 patch 9.0.0302: CI for Coverity is bothered by deprecation warnings
Bram Moolenaar <Bram@vim.org>
parents: 29877
diff changeset
16 CFLAGS: -Wno-deprecated-declarations
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 DEBIAN_FRONTEND: noninteractive
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
18 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 steps:
29060
a8c0c5865e73 patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents: 28927
diff changeset
21 - name: Checkout repository from github
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
22 if: env.TOKEN
29060
a8c0c5865e73 patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents: 28927
diff changeset
23 uses: actions/checkout@v3
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 - name: Download Coverity
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
26 if: env.TOKEN
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 run: |
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
28 wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 mkdir cov-scan
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 - name: Install packages
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
33 if: env.TOKEN
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 sudo apt update && sudo apt install -y \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 autoconf \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 gettext \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 libcanberra-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 libperl-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 python-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 python3-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 liblua5.3-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 lua5.3 \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 ruby-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 tcl-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 libgtk2.0-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 desktop-file-utils \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 libtool-bin \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 libsodium-dev
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 - name: Set up environment
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
52 if: env.TOKEN
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 (
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 ) >> $GITHUB_ENV
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 - name: Configure
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
61 if: env.TOKEN
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 ./configure --with-features=huge ${CONFOPT} --enable-fail-if-missing
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 # Append various warning flags to CFLAGS.
25565
62fa7eb84625 patch 8.2.3319: Coverity action on github does not work
Bram Moolenaar <Bram@vim.org>
parents: 25531
diff changeset
65 sed -i -f ci/config.mk.sed src/auto/config.mk
62fa7eb84625 patch 8.2.3319: Coverity action on github does not work
Bram Moolenaar <Bram@vim.org>
parents: 25531
diff changeset
66 sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 - name: Build/scan vim
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
69 if: env.TOKEN
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 run: |
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
71 cov-build --dir cov-int make -j${NPROC}
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 - name: Submit results
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
74 if: env.TOKEN
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 run: |
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
76 tar zcf cov-scan.tgz cov-int
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
77 curl --form token=$TOKEN \
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 --form email=$EMAIL \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 --form file=@cov-scan.tgz \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 --form version="$(git rev-parse HEAD)" \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 --form description="Automatic GHA scan" \
31225
39d22d78ce92 patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents: 31207
diff changeset
82 'https://scan.coverity.com/builds?project=vim'
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}