Skip to content

Commit

Permalink
Merge branch 'main' into fix-286-documentation-duplicate-check
Browse files Browse the repository at this point in the history
  • Loading branch information
ArielSAdamsNASA authored Jul 7, 2021
2 parents 2db017a + d59861a commit 58917a9
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 40 deletions.
16 changes: 2 additions & 14 deletions .github/codeql/codeql-coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,5 @@ name: "CodeQL Coding Standard Configuration File"
disable-default-queries: true

queries:
- name: JPL Rules
uses: github/codeql/cpp/ql/src/JPL_C@main
- name: MISRA Rule 9-5-1
uses: github/codeql/cpp/ql/src/jsf/4.20 Unions and Bit Fields/AV Rule 153.ql@main
- name: MISRA Rule 5-18-1
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 168.ql@main
- name: MISRA 6-2-2
uses: github/codeql/cpp/ql/src/jsf/4.25 Expressions/AV Rule 202.ql@main
- name: MISRA Rule 5-14-1
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql@main
- name: MISRA Rule 5-3-2
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql@main
- name: MISRA Rule 7-5-2
uses: github/codeql/cpp/ql/src/jsf/4.22 Pointers and References/AV Rule 173.ql@main
- name: jsf Rules
uses: github/codeql/cpp/ql/src/jsf@main
63 changes: 63 additions & 0 deletions .github/workflows/JSF.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "CodeQL JSF Analysis"

on:
push:
pull_request:

env:
SIMULATION: native
ENABLE_UNIT_TESTS: true
OMIT_DEPRECATED: true
BUILDTYPE: release

jobs:
CodeQL-JSF-Build:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
runs-on: ubuntu-18.04

steps:
# Checks out a copy of your repository
- name: Checkout code
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Check versions
if: ${{ !steps.skip-workflow.outputs.skip }}
run: |
git log -1 --pretty=oneline
git submodule
- name: Checkout codeql code
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: actions/checkout@v2
with:
repository: github/codeql
submodules: true
path: codeql

- name: Initialize CodeQL
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/init@v1
with:
languages: c
config-file: ArielSAdamsNASA/cFS/.github/codeql/codeql-coding-standard.yml@main

# Setup the build system
- name: Copy sample_defs
if: ${{ !steps.skip-workflow.outputs.skip }}
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make Install
if: ${{ !steps.skip-workflow.outputs.skip }}
run: make

# Run CodeQL
- name: Perform CodeQL Analysis
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/analyze@v1
61 changes: 35 additions & 26 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,39 +72,43 @@ jobs:
build-usersguide:
# Name the Job
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Users Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
persist-credentials: false

# Setup the build system
- name: Copy Files
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make Prep
# Setup the build system
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Make Prep
run: make prep

- name: Install Dependencies
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Install Dependencies
run: sudo apt-get install doxygen graphviz -y

- name: Build Usersguide
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Build Usersguide
run: |
make usersguide > make_usersguide_stdout.txt 2> make_usersguide_stderr.txt
mv build/doc/warnings.log usersguide_warnings.log
- name: Archive Users Guide Build Logs
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Archive Users Guide Build Logs
uses: actions/upload-artifact@v2
with:
name: Users Guide Artifacts
Expand All @@ -113,15 +117,16 @@ jobs:
make_usersguide_stderr.txt
usersguide_warnings.log
- name: Error Check
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Error Check
run: |
if [[ -s make_usersguide_stderr.txt ]]; then
cat make_usersguide_stderr.txt
exit -1
fi
- name: Warning Check
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Warning Check
run: |
if [[ -s usersguide_warnings.log ]]; then
cat usersguide_warnings.log
Expand Down Expand Up @@ -165,40 +170,43 @@ jobs:

build-osalguide:
# Name the Job
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Osal Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
persist-credentials: false

# Setup the build system
- name: Copy Files
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make Prep
# Setup the build system
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Make Prep
run: make prep

- name: Install Dependencies
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Install Dependencies
run: sudo apt-get install doxygen graphviz -y

- name: Build OSAL Guide
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Build OSAL Guide
run: |
make osalguide > make_osalguide_stdout.txt 2> make_osalguide_stderr.txt
mv build/doc/osalguide/osal-apiguide-warnings.log osal-apiguide-warnings.log
- name: Archive Osal Guide Build Logs
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Archive Osal Guide Build Logs
uses: actions/upload-artifact@v2
with:
name: OSAL Guide Artifacts
Expand All @@ -208,27 +216,28 @@ jobs:
osal-apiguide-warnings.log
- name: Error Check
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Error Check
run: |
if [[ -s make_osalguide_stderr.txt ]]; then
cat make_osalguide_stderr.txt
exit -1
fi
- name: Warning Check
- if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: Warning Check
run: |
if [[ -s osal-apiguide-warnings.log ]]; then
cat osal-apiguide-warnings.log
exit -1
fi
pdf-osalguide:
needs: build-osalguide
# Name the Job
name: PDF Osal Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04

steps:
- name: PDF generation installs
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
Expand Down
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<body>
<h1>Hello World</h1>
<p>I'm hosted with GitHub Pages.</p>
</body>
</html>

0 comments on commit 58917a9

Please sign in to comment.