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