-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1066 from nasa/integration-candidate
cFE Integration Candidate: 2021-01-05
- Loading branch information
Showing
5 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Static Analysis | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
|
||
static-analysis: | ||
name: Run cppcheck | ||
runs-on: ubuntu-18.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cppcheck: [all, cfe] | ||
|
||
steps: | ||
|
||
- name: Install cppcheck | ||
run: sudo apt-get install cppcheck -y | ||
|
||
# Checks out a copy of the cfs bundle | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Run bundle cppcheck | ||
if: ${{matrix.cppcheck =='all'}} | ||
run: cppcheck --force --inline-suppr --quiet . 2> ${{matrix.cppcheck}}_cppcheck_err.txt | ||
|
||
# Run strict static analysis for embedded portions of cfe | ||
- name: cfe strict cppcheck | ||
if: ${{matrix.cppcheck =='cfe'}} | ||
run: | | ||
cppcheck --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope --inconclusive ./fsw/cfe-core/src ./modules 2> ./${{matrix.cppcheck}}_cppcheck_err.txt | ||
- name: Archive Static Analysis Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{matrix.cppcheck}}-cppcheck-err | ||
path: ./*cppcheck_err.txt | ||
|
||
- name: Check for errors | ||
run: | | ||
if [[ -s ${{matrix.cppcheck}}_cppcheck_err.txt ]]; | ||
then | ||
cat ${{matrix.cppcheck}}_cppcheck_err.txt | ||
exit -1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters