Skip to content

Commit 6eab264

Browse files
committed
Coverity Scan Automation
1. Add GitHub action to run a Coverity scan on dispatch.
1 parent 1b8e0be commit 6eab264

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Coverity scan master branch
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build_wolfssl:
8+
name: Build wolfSSL
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 4
11+
steps:
12+
- name: Checking cache for wolfSSL
13+
uses: actions/cache@v4
14+
id: cache-wolfssl
15+
with:
16+
path: build-dir
17+
key: wolfssh-coverity-wolfssl
18+
lookup-only: true
19+
20+
- name: Build wolfSSL
21+
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
22+
uses: wolfSSL/actions-build-autotools-project@v1
23+
with:
24+
repository: wolfSSL/wolfssl
25+
ref: master
26+
path: wolfssl
27+
configure: --enable-all
28+
check: false
29+
install: true
30+
31+
coverity:
32+
needs: build_wolfssl
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checking out wolfSSH
36+
uses: actions/checkout@v4
37+
with:
38+
ref: master
39+
40+
- name: Checking cache for wolfssl
41+
uses: actions/cache@v4
42+
with:
43+
path: build-dir
44+
key: wolfssh-coverity-wolfssl
45+
fail-on-cache-miss: true
46+
47+
- name: Configure wolfSSH
48+
run: |
49+
./autogen.sh
50+
./configure --with-wolfssl=build-dir --enable-all
51+
52+
- name: Check secrets
53+
env:
54+
token_var: ${{ secrets.COVERITY_SCAN_TOKEN_WOLFSSH }}
55+
email_var: ${{ secrets.COVERITY_SCAN_EMAIL }}
56+
run: |
57+
token_len=${#token_var}
58+
echo "$token_len"
59+
email_len=${#email_var}
60+
echo "$email_len"
61+
62+
- uses: vapier/coverity-scan-action@v1
63+
with:
64+
build_language: 'cxx'
65+
project: "wolfSSL/wolfssh"
66+
token: ${{ secrets.COVERITY_SCAN_TOKEN_WOLFSSH }}
67+
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
68+
command: "make"

0 commit comments

Comments
 (0)