11name : CI Checks
2+ env :
3+ bashPass : \033[32;1mPASSED -
4+ bashInfo : \033[33;1mINFO -
5+ bashFail : \033[31;1mFAILED -
6+ bashEnd : \033[0m
27on :
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
0 commit comments