Mercurial > vim
annotate .github/workflows/coverity.yml @ 25672:ab42c36d1a27 v8.2.3372
patch 8.2.3372: line2byte() value wrong when adding a text property
Commit: https://github.com/vim/vim/commit/cdd8a5e6fe089a3b1370ac940d06fc3cefc6f8f2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 25 16:40:03 2021 +0200
patch 8.2.3372: line2byte() value wrong when adding a text property
Problem: line2byte() value wrong when adding a text property. (Yuto Kimura)
Solution: Adjust length for text property. (closes https://github.com/vim/vim/issues/8772) Also fix it for
deleting a line.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Aug 2021 16:45:03 +0200 |
parents | 62fa7eb84625 |
children | 272a24b53d0c |
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: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 runs-on: ubuntu-18.04 |
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: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 - uses: actions/checkout@v2 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 - name: Download Coverity |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
20 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
|
21 mkdir cov-scan |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
22 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
|
23 env: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 - name: Install packages |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 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
|
29 autoconf \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 gettext \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 libcanberra-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 libperl-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 python-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 python3-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 liblua5.3-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 lua5.3 \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 ruby-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 tcl-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 libgtk2.0-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 desktop-file-utils \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 libtool-bin \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 libsodium-dev |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 - name: Set up environment |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 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
|
47 ( |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
48 echo "NPROC=$(getconf _NPROCESSORS_ONLN)" |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
49 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
|
50 ) >> $GITHUB_ENV |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
51 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
52 - name: Set up system |
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 # Setup lua5.3 manually since its package doesn't provide alternative. |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
55 # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
56 sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
57 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 - name: Configure |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
60 ./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
|
61 # 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
|
62 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
|
63 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
|
64 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
65 - name: Build/scan vim |
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 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
|
68 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
69 - name: Submit results |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
70 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
71 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
|
72 curl --form token=$TOKEN \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
73 --form email=$EMAIL \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
74 --form file=@cov-scan.tgz \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
75 --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
|
76 --form description="Automatic GHA scan" \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
77 '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
|
78 env: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
79 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
80 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} |