-
-
Notifications
You must be signed in to change notification settings - Fork 19
64 lines (56 loc) · 2.06 KB
/
coverity.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
55
56
57
58
59
60
61
62
63
64
name: Coverity
on:
repository_dispatch:
types: coverity_scan
schedule:
- cron: '0 0 * * 5' # Weekly at 00:00 UTC
env:
COVERITY_PROJECT: MillhioreBT/forgottenserver-downgrade
COVERITY_EMAIL: sarahelizabetwesker@gmail.com
jobs:
scan:
runs-on: ubuntu-20.04
if: github.repository == 'MillhioreBT/forgottenserver-downgrade'
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: >
sudo apt update -q &&
sudo apt install -yq build-essential lua5.4 libmysqlclient-dev
libboost-system-dev libboost-iostreams-dev
libpugixml-dev libcrypto++-dev libfmt-dev
- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
uses: lukka/get-cmake@latest
- name: Download Coverity Build Tool
run: |
cd ${{ runner.workspace }}
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=$COVERITY_PROJECT" -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: Prepare build
run: |
mkdir build
cd build
cmake ..
- name: Build with cov-build
run: |
export PATH=${{ runner.workspace }}/cov-analysis-linux64/bin:$PATH
cd build
cov-build --dir ${{ runner.workspace }}/cov-int make -j2
- name: Submit the result to Coverity Scan
run: |
cd ${{ runner.workspace }}
tar czvf forgottenserver-downgrade.tgz cov-int
du -hs forgottenserver-downgrade.tgz
curl \
--form project=$COVERITY_PROJECT \
--form token=$TOKEN \
--form email=$COVERITY_EMAIL \
--form file=@forgottenserver-downgrade.tgz \
--form version=$GITHUB_SHA \
https://scan.coverity.com/builds?project=$COVERITY_PROJECT
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}