-
Notifications
You must be signed in to change notification settings - Fork 791
54 lines (49 loc) · 1.91 KB
/
coverity-scan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Coverity scan
# Controls when the action will run.
on:
# Run this action on a schedule (we're allowed a maximum of two per day)
schedule:
- cron: '0 18 * * SUN' # Sunday at 18:00 UTC
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
coverity:
runs-on: ubuntu-22.04
if: github.repository == 'OSGeo/PROJ'
steps:
- uses: actions/checkout@v4
- name: Install Libraries
run: |
sudo apt-get update
sudo apt-get install --allow-unauthenticated curl libcurl4-gnutls-dev libtiff-dev sqlite3 libsqlite3-dev g++ make cmake
- name: Configure PROJ
run: |
cmake . -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=OSGeo%2Fproj.4" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Build with cov-build
run: |
pwd
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-build --dir cov-int make -j$(nproc)
- name: Submit to Coverity Scan
run: |
tar czvf proj.tgz cov-int
curl \
--form project=OSGeo%2Fproj.4 \
--form token=$TOKEN \
--form [email protected] \
--form [email protected] \
--form version=master \
--form description="`git rev-parse --abbrev-ref HEAD` `git rev-parse --short HEAD`" \
https://scan.coverity.com/builds?project=OSGeo%2Fproj.4
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}