-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (52 loc) · 1.73 KB
/
ci-c.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
name: Build and test C
on:
push:
branches: [ main, oldstable, stable ]
pull_request:
branches: [ main, oldstable, stable ]
jobs:
c-format-check:
name: Check C Source Code Formatting
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Check Source Format
run: |
clang-format -i -style=file src/*.c
git diff --exit-code
tests:
name: Unit Tests
runs-on: 'ubuntu-latest'
container: ${{ vars.SELF_HOSTED_REGISTRY }}/community/gvm-libs:edge
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/install-dependencies-action
- name: Configure and Compile boreas
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make install
scan-build:
name: Scan-build with clang
runs-on: 'ubuntu-latest'
container: ${{ vars.SELF_HOSTED_REGISTRY }}/community/gvm-libs:edge
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/install-dependencies-action
- name: Install clang tools
run: |
apt update
apt install --no-install-recommends -y clang clang-tools
rm -rf /var/lib/apt/lists/*
- name: Configure and Scan Build boreas
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
scan-build -o ~/scan-build-report cmake --build build
- name: Upload scan-build report
if: failure()
uses: actions/upload-artifact@v4
with:
name: scan-build-report
path: ~/scan-build-report/
retention-days: 7