Skip to content

Commit b539e7a

Browse files
authored
CI-CD Updates (FreeRTOS#162)
* 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 0e67b12 commit b539e7a

12 files changed

+223
-352
lines changed

.github/.cSpellWords.txt

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CBMC
2+
CBOR
3+
CMOCK
4+
CMock
5+
Cmock
6+
Coverity
7+
DCMOCK
8+
DNDEBUG
9+
DUNITY
10+
Doesnt
11+
LLHTTP
12+
MISRA
13+
MQTT
14+
Misra
15+
Wunused
16+
abcdefghijk
17+
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopq
18+
cbmc
19+
cbor
20+
cmock
21+
coverity
22+
ctest
23+
lcov
24+
llhttp
25+
lmnopqrstuvw
26+
misra
27+
sinclude
28+
utest

.github/workflows/ci.yml

+61-21
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Clone This Repo
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616
- name: Build
1717
run: |
1818
sudo apt-get install -y lcov
@@ -21,11 +21,10 @@ jobs:
2121
-DCMAKE_BUILD_TYPE=Debug \
2222
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG'
2323
make -C build/ all
24-
- name: Test
25-
run: |
26-
cd build/
27-
ctest -E system --output-on-failure
28-
cd ..
24+
25+
- name: Run CTests
26+
run: ctest --test-dir build -E system --output-on-failure
27+
2928
- name: Run Coverage
3029
run: |
3130
make -C build/ coverage
@@ -35,49 +34,54 @@ jobs:
3534
- name: Check Coverage
3635
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main
3736
with:
38-
path: ./build/coverage.info
37+
coverage-file: ./build/coverage.info
38+
3939
complexity:
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v3
4343
- name: Check complexity
4444
uses: FreeRTOS/CI-CD-Github-Actions/complexity@main
4545
with:
4646
path: ./
47+
4748
doxygen:
4849
runs-on: ubuntu-latest
4950
steps:
50-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
5152
- name: Run doxygen build
5253
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
5354
with:
5455
path: ./
56+
5557
spell-check:
5658
runs-on: ubuntu-latest
5759
steps:
5860
- name: Clone This Repo
59-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
6062
- name: Run spellings check
6163
uses: FreeRTOS/CI-CD-Github-Actions/spellings@main
6264
with:
6365
path: ./
66+
6467
formatting:
6568
runs-on: ubuntu-20.04
6669
steps:
67-
- uses: actions/checkout@v2
70+
- uses: actions/checkout@v3
6871
- name: Check formatting
6972
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
7073
with:
7174
path: ./
75+
7276
ssot-check:
7377
runs-on: ubuntu-latest
7478
steps:
7579
- name: Checkout this repo
76-
uses: actions/checkout@v2
80+
uses: actions/checkout@v3
7781
with:
7882
path: current
7983
- name: Checkout coreMQTT
80-
uses: actions/checkout@v2
84+
uses: actions/checkout@v3
8185
with:
8286
ref: main
8387
repository: FreeRTOS/coreMQTT
@@ -93,12 +97,13 @@ jobs:
9397
else
9498
exit 0
9599
fi
100+
96101
git-secrets:
97102
runs-on: ubuntu-latest
98103
steps:
99-
- uses: actions/checkout@v2
104+
- uses: actions/checkout@v3
100105
- name: Checkout awslabs/git-secrets
101-
uses: actions/checkout@v2
106+
uses: actions/checkout@v3
102107
with:
103108
repository: awslabs/git-secrets
104109
ref: master
@@ -109,22 +114,57 @@ jobs:
109114
run: |
110115
git-secrets --register-aws
111116
git-secrets --scan
117+
112118
memory_statistics:
113119
runs-on: ubuntu-latest
114120
steps:
115-
- uses: actions/checkout@v2
121+
- uses: actions/checkout@v3
116122
with:
117-
submodules: 'recursive'
123+
submodules: "recursive"
118124
- name: Install Python3
119-
uses: actions/setup-python@v2
125+
uses: actions/setup-python@v3
120126
with:
121-
python-version: '3.11.0'
127+
python-version: "3.11.0"
122128
- name: Measure sizes
123129
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@main
124130
with:
125-
config: .github/memory_statistics_config.json
126-
check_against: docs/doxygen/include/size_table.md
131+
config: .github/memory_statistics_config.json
132+
check_against: docs/doxygen/include/size_table.md
133+
134+
link-verifier:
135+
runs-on: ubuntu-latest
136+
steps:
137+
- uses: actions/checkout@v3
138+
- name: Check Links
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main
142+
with:
143+
path: ./
144+
145+
verify-manifest:
146+
runs-on: ubuntu-latest
147+
steps:
148+
- uses: actions/checkout@v3
149+
with:
150+
submodules: true
151+
fetch-depth: 0
152+
153+
# At time of writing the gitmodules are set not to pull
154+
# Even when using fetch submodules. Need to run this command
155+
# To force it to grab them.
156+
- name: Perform Recursive Clone
157+
shell: bash
158+
run: git submodule update --checkout --init --recursive
159+
160+
- name: Run manifest verifier
161+
uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main
162+
with:
163+
path: ./
164+
fail-on-incorrect-version: true
165+
127166
proof_ci:
167+
if: ${{ github.event.pull_request }}
128168
runs-on: cbmc_ubuntu-latest_64-core
129169
steps:
130170
- name: Set up CBMC runner

.github/workflows/formatting.yml

+23
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/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020
with:
2121
ref: ${{ github.event.inputs.commit_id }}
2222
- name: Configure git identity
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install ZIP tools
5454
run: sudo apt-get install zip unzip
5555
- name: Checkout code
56-
uses: actions/checkout@v2
56+
uses: actions/checkout@v3
5757
with:
5858
ref: ${{ github.event.inputs.commit_id }}
5959
path: coreHTTP

MISRA.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ _Ref 21.13.1_
9292
- MISRA Rule 21.13 flags any value passed into a ctype.h function that isn't cast
9393
as an unsigned char. Thorough testing by use of our CBMC proofs shows that adding
9494
the cast to ( unsigned char ) inside of the toupper() call has potential to lead
95-
to errors. Due to this we supress this warning for our use case.
95+
to errors. Due to this we suppress this warning for our use case.

0 commit comments

Comments
 (0)