-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ArielSAdamsNASA-fix-382-reuse-workflows' into main
- Loading branch information
Showing
9 changed files
with
198 additions
and
84 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
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,21 @@ | ||
# Start with all the queries in the codeql/cpp-queries pack. | ||
- queries: . | ||
from: codeql/cpp-queries | ||
# Restrict to only the queries with the following ID patterns. | ||
- include: | ||
id: | ||
# Regular expression matching all query IDs that start with `cpp/jpl-c/` | ||
# This covers all queries in the `JPL_C` directory, | ||
# but matching on query ID is more stable. | ||
- /cpp/jpl-c/*/ | ||
# Specific JSF queries, identified by query ID. | ||
# MISRA Rule 9-5-1 | ||
- cpp/jsf/av-rule-153 | ||
# MISRA Rule 5-18-1 | ||
- cpp/jsf/av-rule-168 | ||
# MISRA 6-2-2 | ||
- cpp/jsf/av-rule-202 | ||
# MISRA Rule 5-14-1 | ||
- cpp/jsf/av-rule-165 | ||
# MISRA Rule 5-3-2 | ||
- cpp/jsf/av-rule-173 |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,11 @@ | ||
name: Reuse CodeQl Analysis | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
|
||
jobs: | ||
codeql: | ||
name: CodeQL Analysis | ||
uses: nasa/cFS/.github/workflows/codeql-build.yml@main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Format Check | ||
|
||
# Run on all push and pull requests | ||
on: | ||
push: | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. | ||
check-for-duplicates: | ||
runs-on: ubuntu-latest | ||
# Map a step output to a job output | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
concurrent_skipping: 'same_content' | ||
skip_after_successful_duplicate: 'true' | ||
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' | ||
|
||
format-checker: | ||
name: Run format check | ||
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. | ||
needs: check-for-duplicates | ||
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} | ||
runs-on: ubuntu-18.04 | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Install format checker | ||
run: | | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' | ||
sudo apt-get update && sudo apt-get install clang-format-10 | ||
- name: Checkout bundle | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: nasa/cFS | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: repo | ||
|
||
- name: Generate format differences | ||
run: | | ||
cd repo | ||
find . -name "*.[ch]" -exec clang-format-10 -i -style=file {} + | ||
git diff > $GITHUB_WORKSPACE/style_differences.txt | ||
- name: Archive Static Analysis Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: style_differences | ||
path: style_differences.txt | ||
|
||
- name: Error on differences | ||
run: | | ||
if [[ -s style_differences.txt ]]; | ||
then | ||
cat style_differences.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Reuse Static Analysis | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
static-analysis: | ||
name: Static Analysis | ||
uses: nasa/cFS/.github/workflows/static-analysis.yml@main |
Oops, something went wrong.