1
1
name : CI Checks
2
+ env :
3
+ bashPass : \033[32;1mPASSED -
4
+ bashInfo : \033[33;1mINFO -
5
+ bashFail : \033[31;1mFAILED -
6
+ bashEnd : \033[0m
2
7
on :
3
8
push :
4
9
branches : ["**"]
@@ -10,70 +15,91 @@ jobs:
10
15
runs-on : ubuntu-latest
11
16
steps :
12
17
- name : Clone This Repo
13
- uses : actions/checkout@v2
14
- - name : Build
18
+ uses : actions/checkout@v3
19
+ - env :
20
+ stepName : Build Unit Tests
15
21
run : |
22
+ # ${{ env.stepName }}
23
+ echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
24
+
16
25
sudo apt-get install -y lcov
17
26
cmake -S test -B build/ \
18
27
-G "Unix Makefiles" \
19
28
-DCMAKE_BUILD_TYPE=Debug \
20
29
-DBUILD_CLONE_SUBMODULES=ON \
21
30
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG'
31
+
22
32
make -C build/ all
23
- - name : Test
24
- run : |
25
- cd build/
26
- ctest -E system --output-on-failure
27
- cd ..
28
- - name : Run Coverage
33
+
34
+ echo "::endgroup::"
35
+ echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
36
+
37
+ - name : Run Unit Tests
38
+ run : ctest --test-dir build -E system --output-on-failure
39
+
40
+ - env :
41
+ stepName : Line and Branch Coverage Build
29
42
run : |
43
+ # ${{ env.stepName }}
44
+ echo -e "::group::${{ env.bashInfo }} Build Coverage Target ${{ env.bashEnd }}"
45
+ # Build the coverage target
30
46
make -C build/ coverage
31
- declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*")
32
- echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info
47
+
48
+ echo -e "::group::${{ env.bashInfo }} Generate Coverage Report ${{ env.bashEnd }}"
49
+ # Generate coverage report, excluding extra directories
50
+ lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info '*test*' '*CMakeCCompilerId*' '*mocks*'
51
+
52
+ echo "::endgroup::"
33
53
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
54
+ echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
34
55
- name : Check Coverage
35
56
uses : FreeRTOS/CI-CD-Github-Actions/coverage-cop@main
36
57
with :
37
- path : ./build/coverage.info
58
+ coverage-file : ./build/coverage.info
59
+
38
60
complexity :
39
61
runs-on : ubuntu-latest
40
62
steps :
41
- - uses : actions/checkout@v2
63
+ - uses : actions/checkout@v3
42
64
- name : Check complexity - Common
43
65
uses : FreeRTOS/CI-CD-Github-Actions/complexity@main
44
66
with :
45
67
path : ./
68
+
46
69
doxygen :
47
70
runs-on : ubuntu-latest
48
71
steps :
49
- - uses : actions/checkout@v2
72
+ - uses : actions/checkout@v3
50
73
- name : Run doxygen build
51
74
uses : FreeRTOS/CI-CD-Github-Actions/doxygen@main
52
75
with :
53
76
path : ./
77
+
54
78
spell-check :
55
79
runs-on : ubuntu-latest
56
80
steps :
57
81
- name : Clone This Repo
58
- uses : actions/checkout@v2
82
+ uses : actions/checkout@v3
59
83
- name : Run spellings check
60
84
uses : FreeRTOS/CI-CD-Github-Actions/spellings@main
61
85
with :
62
86
path : ./
87
+
63
88
formatting :
64
- runs-on : ubuntu-latest
89
+ runs-on : ubuntu-20.04
65
90
steps :
66
- - uses : actions/checkout@v2
91
+ - uses : actions/checkout@v3
67
92
- name : Check formatting
68
93
uses : FreeRTOS/CI-CD-Github-Actions/formatting@main
69
94
with :
70
95
path : ./
96
+
71
97
git-secrets :
72
98
runs-on : ubuntu-latest
73
99
steps :
74
- - uses : actions/checkout@v2
100
+ - uses : actions/checkout@v3
75
101
- name : Checkout awslabs/git-secrets
76
- uses : actions/checkout@v2
102
+ uses : actions/checkout@v3
77
103
with :
78
104
repository : awslabs/git-secrets
79
105
ref : master
@@ -84,22 +110,49 @@ jobs:
84
110
run : |
85
111
git-secrets --register-aws
86
112
git-secrets --scan
113
+
87
114
memory_statistics :
88
115
runs-on : ubuntu-latest
89
116
steps :
90
- - uses : actions/checkout@v2
117
+ - uses : actions/checkout@v3
91
118
with :
92
- submodules : ' recursive'
119
+ submodules : " recursive"
93
120
- name : Install Python3
94
- uses : actions/setup-python@v2
121
+ uses : actions/setup-python@v3
95
122
with :
96
- python-version : ' 3.11.0'
123
+ python-version : " 3.11.0"
97
124
- name : Measure sizes
98
125
uses : FreeRTOS/CI-CD-Github-Actions/memory_statistics@main
99
126
with :
100
- config : .github/memory_statistics_config.json
101
- check_against : docs/doxygen/include/size_table.md
127
+ config : .github/memory_statistics_config.json
128
+ check_against : docs/doxygen/include/size_table.md
129
+
130
+ link-verifier :
131
+ runs-on : ubuntu-latest
132
+ steps :
133
+ - uses : actions/checkout@v3
134
+ - name : Check Links
135
+ env :
136
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
137
+ uses : FreeRTOS/CI-CD-Github-Actions/link-verifier@main
138
+
139
+ verify-manifest :
140
+ runs-on : ubuntu-latest
141
+ steps :
142
+ - uses : actions/checkout@v3
143
+ with :
144
+ submodules : true
145
+ fetch-depth : 0
146
+
147
+ - name : Run manifest verifier
148
+ uses : FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main
149
+ with :
150
+ path : ./
151
+ fail-on-incorrect-version : true
152
+
153
+
102
154
proof_ci :
155
+ if : ${{ github.event.pull_request }}
103
156
runs-on : cbmc_ubuntu-latest_64-core
104
157
steps :
105
158
- name : Set up CBMC runner
0 commit comments