annotate .github/workflows/coverity.yml @ 29928:0c52f8114e16 v9.0.0302

patch 9.0.0302: CI for Coverity is bothered by deprecation warnings Commit: https://github.com/vim/vim/commit/75e9a6693e8d0126b5fff42203bfba9428cd19ae Author: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Sun Aug 28 17:59:05 2022 +0100 patch 9.0.0302: CI for Coverity is bothered by deprecation warnings Problem: CI for Coverity is bothered by deprecation warnings. Solution: Ignore deprecation warnings. (closes https://github.com/vim/vim/issues/11002)
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Aug 2022 19:00:10 +0200
parents 032cc5280408
children 5b94b8c82687
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
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 jobs:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 scan:
29857
a0a446bc3aea patch 9.0.0267: Coverity workflow still uses Ubuntu 18.04
Bram Moolenaar <Bram@vim.org>
parents: 29060
diff changeset
9 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
10
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 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
13 CFLAGS: -Wno-deprecated-declarations
25531
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 DEBIAN_FRONTEND: noninteractive
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 steps:
29060
a8c0c5865e73 patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents: 28927
diff changeset
17 - name: Checkout repository from github
a8c0c5865e73 patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents: 28927
diff changeset
18 uses: actions/checkout@v3
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 - name: Download Coverity
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 mkdir cov-scan
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 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
25 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 - name: Install packages
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 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
31 autoconf \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 gettext \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 libcanberra-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 libperl-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 python-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 python3-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 liblua5.3-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 lua5.3 \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 ruby-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 tcl-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 libgtk2.0-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 desktop-file-utils \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 libtool-bin \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 libsodium-dev
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 - name: Set up environment
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 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
49 (
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 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
52 ) >> $GITHUB_ENV
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 - name: Configure
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 ./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
57 # 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
58 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
59 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
60
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 - name: Build/scan vim
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 cov-build --dir cov-int make -j${NPROC}
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 - name: Submit results
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 tar zcf cov-scan.tgz cov-int
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 curl --form token=$TOKEN \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 --form email=$EMAIL \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 --form file=@cov-scan.tgz \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 --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
72 --form description="Automatic GHA scan" \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 'https://scan.coverity.com/builds?project=vim'
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}