annotate .github/workflows/coverity.yml @ 29877:032cc5280408 v9.0.0277

patch 9.0.0277: Coverity CI: update-alternatives not needed with Ubuntu 20.04 Commit: https://github.com/vim/vim/commit/c361842f1479a7f7f3e65bfb0e188f2e5d38336e Author: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Fri Aug 26 15:48:55 2022 +0100 patch 9.0.0277: Coverity CI: update-alternatives not needed with Ubuntu 20.04 Problem: Coverity CI: update-alternatives not needed with Ubuntu 20.04. Solution: Remove update-alternatives for Lua. (closes https://github.com/vim/vim/issues/10987)
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Aug 2022 17:00:04 +0200
parents a0a446bc3aea
children 0c52f8114e16
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
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 DEBIAN_FRONTEND: noninteractive
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 steps:
29060
a8c0c5865e73 patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents: 28927
diff changeset
16 - 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
17 uses: actions/checkout@v3
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 - name: Download Coverity
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 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
22 mkdir cov-scan
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 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
24 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 - name: Install packages
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 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
30 autoconf \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 gettext \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 libcanberra-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 libperl-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 python-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 python3-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 liblua5.3-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 lua5.3 \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 ruby-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 tcl-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 libgtk2.0-dev \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 desktop-file-utils \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 libtool-bin \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 libsodium-dev
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 - name: Set up environment
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 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
48 (
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 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
51 ) >> $GITHUB_ENV
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 - name: Configure
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 ./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
56 # 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
57 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
58 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
59
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 - name: Build/scan vim
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 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
63
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 - name: Submit results
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 run: |
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 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
67 curl --form token=$TOKEN \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 --form email=$EMAIL \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 --form file=@cov-scan.tgz \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 --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
71 --form description="Automatic GHA scan" \
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 '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
73 env:
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
8a8847008e27 patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}