-
Notifications
You must be signed in to change notification settings - Fork 16
98 lines (83 loc) · 2.47 KB
/
main.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Canonical Ltd.
# Copyright 2024 Intel Corporation
name: Main workflow
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
clang-format:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'core'
exclude: '(kmod)' # Exclude "kmod" dir because of different format
- check: 'protobuf'
exclude: '' # Nothing to exclude
- check: 'sample_plugin/modules'
exclude: '' # Nothing to exclude
- check: 'sample_plugin/protobuf'
exclude: '' # Nothing to exclude
steps:
- uses: actions/checkout@v4
- name: Clang-format check
uses: jidicula/[email protected]
with:
clang-format-version: '12'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
check-spelling:
name: Markdown spellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Spelling
uses: rojopolis/[email protected]
with:
config_path: .spellcheck.yml
task_name: Markdown
hadolint:
name: hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dockerfile linter
uses: hadolint/[email protected]
# For now, ignoring:
# DL3008 warning: Pin versions in apt get install (e.g., apt-get install <package>=<version>)
with:
dockerfile: env/Dockerfile
ignore: DL3008
hadolint-cndp:
name: hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dockerfile linter
uses: hadolint/[email protected]
# For now, ignoring:
# DL3008 warning: Pin versions in apt get install (e.g., apt-get install <package>=<version>); and
# DL3013 warning: Pin versions in pip (e.g., pip install <package>==<version>)
with:
dockerfile: env/Dockerfile-cndp
ignore: DL3008,DL3013
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: reuse lint
uses: fsfe/reuse-action@v3
fossa-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: FOSSA scan
uses: fossa-contrib/fossa-action@v3
with:
fossa-api-key: 0c3bbcdf20e157bbd487dae173751b28