Mercurial > vim
annotate .github/workflows/coverity.yml @ 36064:b8d25846181a
runtime(doc): use mkdir -p to save a command
Commit: https://github.com/vim/vim/commit/7c8bbc6d28387e5c73f049663ace0c3829f9e128
Author: Ughur Alakbarov <58857108+ugur-a@users.noreply.github.com>
Date: Sat Aug 31 16:12:39 2024 +0200
runtime(doc): use mkdir -p to save a command
closes: https://github.com/vim/vim/issues/15599
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ughur Alakbarov <58857108+ugur-a@users.noreply.github.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 31 Aug 2024 16:15:05 +0200 |
parents | f8623bd12e17 |
children |
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: |
32286
dd85b8e05559
patch 9.0.1474: CI runs with old version of Ubuntu and tools
Bram Moolenaar <Bram@vim.org>
parents:
31225
diff
changeset
|
12 runs-on: ubuntu-22.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 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 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
|
17 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
|
18 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 steps: |
29060
a8c0c5865e73
patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents:
28927
diff
changeset
|
20 - 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
|
21 if: env.TOKEN |
33244
db65486d8d75
CI: Bump actions/checkout from 3 to 4 (#13072)
Christian Brabandt <cb@256bit.org>
parents:
33063
diff
changeset
|
22 uses: actions/checkout@v4 |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
23 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 - 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
|
25 if: env.TOKEN |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 run: | |
31225
39d22d78ce92
patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents:
31207
diff
changeset
|
27 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
|
28 mkdir cov-scan |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 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
|
30 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 - 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
|
32 if: env.TOKEN |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 run: | |
32286
dd85b8e05559
patch 9.0.1474: CI runs with old version of Ubuntu and tools
Bram Moolenaar <Bram@vim.org>
parents:
31225
diff
changeset
|
34 sudo apt-get update && sudo apt-get install -y \ |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 autoconf \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 gettext \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 libcanberra-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 libperl-dev \ |
32286
dd85b8e05559
patch 9.0.1474: CI runs with old version of Ubuntu and tools
Bram Moolenaar <Bram@vim.org>
parents:
31225
diff
changeset
|
39 python2-dev \ |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 python3-dev \ |
32286
dd85b8e05559
patch 9.0.1474: CI runs with old version of Ubuntu and tools
Bram Moolenaar <Bram@vim.org>
parents:
31225
diff
changeset
|
41 liblua5.4-dev \ |
dd85b8e05559
patch 9.0.1474: CI runs with old version of Ubuntu and tools
Bram Moolenaar <Bram@vim.org>
parents:
31225
diff
changeset
|
42 lua5.4 \ |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 ruby-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 tcl-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 libgtk2.0-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 desktop-file-utils \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
47 libtool-bin \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
48 libsodium-dev |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
49 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
50 - 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
|
51 if: env.TOKEN |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
52 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
53 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
|
54 ( |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
55 echo "NPROC=$(getconf _NPROCESSORS_ONLN)" |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
56 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
|
57 ) >> $GITHUB_ENV |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 - 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
|
60 if: env.TOKEN |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
61 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
62 ./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
|
63 # 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
|
64 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
|
65 sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk |
35238
f8623bd12e17
CI: disable -O2 for Coverity after v9.1.0429
Christian Brabandt <cb@256bit.org>
parents:
33244
diff
changeset
|
66 # -O2 gives false warning and turns it into an error: |
f8623bd12e17
CI: disable -O2 for Coverity after v9.1.0429
Christian Brabandt <cb@256bit.org>
parents:
33244
diff
changeset
|
67 # warning: function may return address of local variable [-Wreturn-local-addr] |
f8623bd12e17
CI: disable -O2 for Coverity after v9.1.0429
Christian Brabandt <cb@256bit.org>
parents:
33244
diff
changeset
|
68 sed -i 's/-O2 \?//' src/auto/config.mk |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
69 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
70 - 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
|
71 if: env.TOKEN |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
72 run: | |
31225
39d22d78ce92
patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents:
31207
diff
changeset
|
73 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
|
74 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
75 - 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
|
76 if: env.TOKEN |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
77 run: | |
31225
39d22d78ce92
patch 9.0.0946: CI: Error in Coverity flow is not reported
Bram Moolenaar <Bram@vim.org>
parents:
31207
diff
changeset
|
78 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
|
79 curl --form token=$TOKEN \ |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
80 --form email=$EMAIL \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
81 --form file=@cov-scan.tgz \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
82 --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
|
83 --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
|
84 '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
|
85 env: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
86 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} |