Skip to content

Commit 911b078

Browse files
Merge branch 'gabime:v1.x' into v1.x
2 parents f1fe6e9 + b18a234 commit 911b078

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+917
-694
lines changed

.github/workflows/coverity_scan.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: coverity-linux
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
coverity_scan:
10+
runs-on: ubuntu-latest
11+
name: Coverity Scan
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y curl build-essential cmake pkg-config libsystemd-dev
19+
20+
- name: Download Coverity Tool
21+
run: |
22+
curl -s -L --output coverity_tool.tgz "https://scan.coverity.com/download/linux64?token=${{ secrets.COVERITY_TOKEN }}&project=gabime%2Fspdlog"
23+
mkdir coverity_tool
24+
tar -C coverity_tool --strip-components=1 -xf coverity_tool.tgz
25+
echo "$PWD/coverity_tool/bin" >> $GITHUB_PATH
26+
27+
- name: Build with Coverity
28+
run: |
29+
mkdir build && cd build
30+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17
31+
cd ..
32+
cov-build --dir cov-int make -C build -j4
33+
34+
- name: Submit results to Coverity
35+
run: |
36+
tar czf cov-int.tgz cov-int
37+
response=$(curl --silent --show-error --fail \
38+
--form email="${{ secrets.EMAIL }}" \
39+
--form token="${{ secrets.COVERITY_TOKEN }}" \
40+
41+
--form version="GitHub PR #${{ github.event.pull_request.number }}" \
42+
--form description="CI run for PR" \
43+
https://scan.coverity.com/builds?project=gabime%2Fspdlog)
44+
45+
echo "$response"
46+
47+
if echo "$response" | grep -qi "Build successfully submitted"; then
48+
echo "Coverity upload succeeded"
49+
else
50+
echo "Coverity upload failed or was rejected"
51+
exit 1
52+
fi

0 commit comments

Comments
 (0)