Mercurial > vim
annotate .github/workflows/coverity.yml @ 31008:91d0f3f87e8c v9.0.0839
patch 9.0.0839: test may fail depending on sequence of events
Commit: https://github.com/vim/vim/commit/69a8bb8dc13571102537762b047747cc36b53d5d
Author: Yee Cheng Chin <ychin.git@gmail.com>
Date: Sun Nov 6 12:25:47 2022 +0000
patch 9.0.0839: test may fail depending on sequence of events
Problem: Test may fail depending on sequence of events.
Solution: Accept error codes in either order. (Yee Cheng Chin,
closes #11510)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Nov 2022 13:30:04 +0100 |
parents | 5b94b8c82687 |
children | 1fcabfdd0547 |
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 |
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 |
a8c0c5865e73
patch 8.2.5052: CI checkout step title is a bit cryptic
Bram Moolenaar <Bram@vim.org>
parents:
28927
diff
changeset
|
21 uses: actions/checkout@v3 |
25531
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
22 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
23 - name: Download Coverity |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 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
|
26 mkdir cov-scan |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 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
|
28 env: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
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 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 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
|
34 autoconf \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 gettext \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 libcanberra-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 libperl-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 python-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 python3-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 liblua5.3-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 lua5.3 \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 ruby-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 tcl-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 libgtk2.0-dev \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 desktop-file-utils \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 libtool-bin \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
47 libsodium-dev |
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 - name: Set up environment |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
50 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
51 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
|
52 ( |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
53 echo "NPROC=$(getconf _NPROCESSORS_ONLN)" |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
54 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
|
55 ) >> $GITHUB_ENV |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
56 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
57 - name: Configure |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 ./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
|
60 # 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
|
61 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
|
62 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
|
63 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
64 - name: Build/scan vim |
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 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
|
67 |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
68 - name: Submit results |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
69 run: | |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
70 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
|
71 curl --form token=$TOKEN \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
72 --form email=$EMAIL \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
73 --form file=@cov-scan.tgz \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
74 --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
|
75 --form description="Automatic GHA scan" \ |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
76 '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
|
77 env: |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
78 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |
8a8847008e27
patch 8.2.3302: Coverity is not run from github
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
79 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} |