Skip to content

Commit 7c80e21

Browse files
authored
CI-CD-Updates (#145)
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Add in bot formatting action
1 parent 6ea7919 commit 7c80e21

25 files changed

+640
-1215
lines changed

.github/.cSpellWords.txt

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
ADDR
2+
ATcmd
3+
Blox
4+
C
5+
CATM
6+
CBMC
7+
CCID
8+
CCLK
9+
CEDRXS
10+
CEREG
11+
CFUN
12+
CG
13+
CGMI
14+
CGMM
15+
CGMR
16+
CGP
17+
CGSN
18+
CIMI
19+
CLK
20+
CMOCK
21+
CPIN
22+
CPINREADY
23+
CRSM
24+
Cbmc
25+
Cmock
26+
Coverity
27+
Cp
28+
Cpsms
29+
DNDEBUG
30+
EDRX
31+
EDRXS
32+
EFHPLM
33+
Edrx
34+
Ftesting
35+
HPLMN
36+
HSDPA
37+
HSDPAHSUPA
38+
HSUPA
39+
Hplmn
40+
IMEI
41+
IMSI
42+
Imsi
43+
MISRA
44+
MQTT
45+
MSI
46+
Misra
47+
Mockv
48+
Mockx
49+
NBIOT
50+
PKTIO
51+
PSMSettings
52+
Pkio
53+
Pktio
54+
Plmn
55+
Psreg
56+
QCCID
57+
QCFG
58+
QIND
59+
QIOPEN
60+
QIRD
61+
QIURC
62+
QP
63+
QPSMS
64+
QSIMSTAT
65+
Quectel
66+
RDYY
67+
RSRP
68+
RSRQ
69+
Rssi
70+
UTRAN
71+
WCDMA
72+
atlib
73+
cbmc
74+
cgreg
75+
cid
76+
coverity
77+
creg
78+
ctest
79+
eidrx
80+
iccid
81+
imei
82+
lcov
83+
misra
84+
nwscanseq
85+
onse
86+
pdpdeact
87+
pkio
88+
pktios
89+
plantuml
90+
plmn
91+
rsrp
92+
rsrq
93+
sinr
94+
sms
95+
ublox
96+
utest
97+
utrhf
98+
utrhfgdghfg

.github/workflows/ci.yml

Lines changed: 77 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
name: CI Checks
2+
env:
3+
bashPass: \033[32;1mPASSED -
4+
bashInfo: \033[33;1mINFO -
5+
bashFail: \033[31;1mFAILED -
6+
bashEnd: \033[0m
27
on:
38
push:
49
branches: ["**"]
@@ -10,70 +15,91 @@ jobs:
1015
runs-on: ubuntu-latest
1116
steps:
1217
- name: Clone This Repo
13-
uses: actions/checkout@v2
14-
- name: Build
18+
uses: actions/checkout@v3
19+
- env:
20+
stepName: Build Unit Tests
1521
run: |
22+
# ${{ env.stepName }}
23+
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
24+
1625
sudo apt-get install -y lcov
1726
cmake -S test -B build/ \
1827
-G "Unix Makefiles" \
1928
-DCMAKE_BUILD_TYPE=Debug \
2029
-DBUILD_CLONE_SUBMODULES=ON \
2130
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG'
31+
2232
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
2942
run: |
43+
# ${{ env.stepName }}
44+
echo -e "::group::${{ env.bashInfo }} Build Coverage Target ${{ env.bashEnd }}"
45+
# Build the coverage target
3046
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::"
3353
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
54+
echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
3455
- name: Check Coverage
3556
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main
3657
with:
37-
path: ./build/coverage.info
58+
coverage-file: ./build/coverage.info
59+
3860
complexity:
3961
runs-on: ubuntu-latest
4062
steps:
41-
- uses: actions/checkout@v2
63+
- uses: actions/checkout@v3
4264
- name: Check complexity - Common
4365
uses: FreeRTOS/CI-CD-Github-Actions/complexity@main
4466
with:
4567
path: ./
68+
4669
doxygen:
4770
runs-on: ubuntu-latest
4871
steps:
49-
- uses: actions/checkout@v2
72+
- uses: actions/checkout@v3
5073
- name: Run doxygen build
5174
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
5275
with:
5376
path: ./
77+
5478
spell-check:
5579
runs-on: ubuntu-latest
5680
steps:
5781
- name: Clone This Repo
58-
uses: actions/checkout@v2
82+
uses: actions/checkout@v3
5983
- name: Run spellings check
6084
uses: FreeRTOS/CI-CD-Github-Actions/spellings@main
6185
with:
6286
path: ./
87+
6388
formatting:
64-
runs-on: ubuntu-latest
89+
runs-on: ubuntu-20.04
6590
steps:
66-
- uses: actions/checkout@v2
91+
- uses: actions/checkout@v3
6792
- name: Check formatting
6893
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
6994
with:
7095
path: ./
96+
7197
git-secrets:
7298
runs-on: ubuntu-latest
7399
steps:
74-
- uses: actions/checkout@v2
100+
- uses: actions/checkout@v3
75101
- name: Checkout awslabs/git-secrets
76-
uses: actions/checkout@v2
102+
uses: actions/checkout@v3
77103
with:
78104
repository: awslabs/git-secrets
79105
ref: master
@@ -84,22 +110,49 @@ jobs:
84110
run: |
85111
git-secrets --register-aws
86112
git-secrets --scan
113+
87114
memory_statistics:
88115
runs-on: ubuntu-latest
89116
steps:
90-
- uses: actions/checkout@v2
117+
- uses: actions/checkout@v3
91118
with:
92-
submodules: 'recursive'
119+
submodules: "recursive"
93120
- name: Install Python3
94-
uses: actions/setup-python@v2
121+
uses: actions/setup-python@v3
95122
with:
96-
python-version: '3.11.0'
123+
python-version: "3.11.0"
97124
- name: Measure sizes
98125
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@main
99126
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+
102154
proof_ci:
155+
if: ${{ github.event.pull_request }}
103156
runs-on: cbmc_ubuntu-latest_64-core
104157
steps:
105158
- name: Set up CBMC runner

.github/workflows/formatting.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Format Pull Request Files
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
env:
8+
bashPass: \033[32;1mPASSED -
9+
bashInfo: \033[33;1mINFO -
10+
bashFail: \033[31;1mFAILED -
11+
bashEnd: \033[0m
12+
13+
jobs:
14+
Formatting:
15+
name: Run Formatting Check
16+
if: ${{ github.event.issue.pull_request }} &&
17+
( ( github.event.comment.body == '/bot run uncrustify' ) ||
18+
( github.event.comment.body == '/bot run formatting' ) )
19+
runs-on: ubuntu-20.04
20+
steps:
21+
- name: Apply Formatting Fix
22+
uses: FreeRTOS/CI-CD-Github-Actions/formatting-bot@main
23+
id: check-formatting

.github/workflows/memory_statistics.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
name: Calculate object sizes
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
13-
submodules: 'recursive'
13+
submodules: "recursive"
1414
- name: Measure sizes
1515
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@main
1616
with:
17-
config: .github/memory_statistics_config.json
17+
config: .github/memory_statistics_config.json
1818
- name: Upload table
1919
uses: actions/upload-artifact@v2
2020
with:
2121
name: size_table
22-
path: size_table.md
22+
path: size_table.md

0 commit comments

Comments
 (0)