-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (56 loc) · 1.46 KB
/
ci.yml
File metadata and controls
72 lines (56 loc) · 1.46 KB
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
65
66
67
68
69
70
71
72
name: C++ Professional CI
# When should the workflow run?
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
CXX: clang++
CC: clang
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
clang-tidy \
clang-format \
llvm \
ninja-build \
cppcheck \
python3-pip \
libgtest-dev
pip3 install flawfinder
- name: Install Snyk
uses: snyk/actions/setup@master
- name: Cache CMake dependencies
uses: actions/cache@v3
with:
path: build/_deps
key: ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cmake-
- name: Configure CMake
run: make reconfig
- name: Clang-Tidy Check
run: make lint
- name: Cppcheck Analysis
run: make analyze
- name: Flawfinder Security Scan
run: make security-code
- name: Build and Test
run: make test
- name: Generate Coverage Report
run: make coverage
- name: Verify Code Formatting
run: make check-format
- name: Snyk Dependency Scan
if: env.SNYK_TOKEN != ''
run: make security-check