Skip to content

Commit 39912fc

Browse files
BrianSiposbillvbjeronstone
committed
Initial public commit.
Co-authored-by: Bill Van Besien <Bill.Van.Besien@jhuapl.edu> Co-authored-by: Stone, Joshua E. <joshua.stone@jhuapl.edu>
0 parents  commit 39912fc

139 files changed

Lines changed: 21496 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Taken from https://github.com/nasa/cFS/blob/main/.clang-format
2+
---
3+
Language: Cpp
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: true
7+
AlignConsecutiveDeclarations: true
8+
AlignConsecutiveMacros: true
9+
AlignEscapedNewlines: Left
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllArgumentsOnNextLine: true
13+
AllowAllParametersOfDeclarationOnNextLine: true
14+
AllowShortBlocksOnASingleLine: Empty
15+
AllowShortCaseLabelsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: Empty
17+
AllowShortIfStatementsOnASingleLine: false
18+
AllowShortLoopsOnASingleLine: false
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: false
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BreakBeforeBinaryOperators: NonAssignment # changed from cFS
24+
BreakBeforeBraces: Custom # changed to allow extern C blocks
25+
BraceWrapping:
26+
AfterCaseLabel: true
27+
AfterControlStatement: true
28+
AfterEnum: true
29+
AfterExternBlock: false
30+
AfterFunction: true
31+
AfterNamespace: true
32+
AfterStruct: true
33+
AfterUnion: true
34+
BeforeCatch: true
35+
BeforeElse: true
36+
BeforeWhile: true
37+
SplitEmptyFunction: false
38+
39+
BreakBeforeTernaryOperators: true
40+
BreakStringLiterals: true
41+
ColumnLimit: 120
42+
CommentPragmas: ''
43+
ContinuationIndentWidth: 4
44+
Cpp11BracedListStyle: false # different than cFS
45+
DerivePointerAlignment: false
46+
DisableFormat: false
47+
ExperimentalAutoDetectBinPacking: false
48+
ForEachMacros: []
49+
IncludeBlocks: Preserve
50+
IncludeCategories: []
51+
IncludeIsMainRegex: '$'
52+
IndentCaseLabels: true
53+
IndentExternBlock: NoIndent
54+
IndentPPDirectives: None
55+
IndentWidth: 4
56+
KeepEmptyLinesAtTheStartOfBlocks: true
57+
MacroBlockBegin: ''
58+
MacroBlockEnd: ''
59+
MaxEmptyLinesToKeep: 1
60+
PackConstructorInitializers: Never # more strict than cFS
61+
PenaltyBreakAssignment: 2
62+
PenaltyBreakBeforeFirstCallParameter: 19
63+
PenaltyBreakComment: 300
64+
PenaltyBreakFirstLessLess: 120
65+
PenaltyBreakString: 1000
66+
PenaltyExcessCharacter: 1000000
67+
PenaltyReturnTypeOnItsOwnLine: 60
68+
PointerAlignment: Right
69+
ReflowComments: true
70+
SortIncludes: false # more strict than cFS
71+
SpaceAfterCStyleCast: false
72+
SpaceBeforeAssignmentOperators: true
73+
SpaceBeforeParens: ControlStatements
74+
SpaceInEmptyParentheses: false
75+
SpaceBeforeCpp11BracedList: true
76+
SpacesBeforeTrailingComments: 1
77+
SpacesInCStyleCastParentheses: false
78+
SpacesInParentheses: false
79+
SpacesInSquareBrackets: false
80+
Standard: c++11
81+
TabWidth: 8
82+
UseTab: Never
83+
...
84+

.cproject

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
3+
<storageModule moduleId="org.eclipse.cdt.core.settings">
4+
<cconfiguration id="org.eclipse.cdt.core.default.config.302974096">
5+
<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="org.eclipse.cdt.core.default.config.302974096" moduleId="org.eclipse.cdt.core.settings" name="Configuration">
6+
<externalSettings/>
7+
<extensions/>
8+
</storageModule>
9+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
10+
</cconfiguration>
11+
</storageModule>
12+
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
13+
<pathentry excluding="**/CMakeFiles/**" kind="out" path="build"/>
14+
</storageModule>
15+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
16+
</cproject>

.github/workflows/build-test.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build and run tests
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
push:
6+
branches:
7+
- main
8+
pull_request: {} # any target
9+
10+
jobs:
11+
unit-test:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
- name: Set up OS
19+
run: >
20+
sudo apt-get update && sudo apt-get install -y
21+
cmake ninja-build ruby build-essential
22+
libssl-dev
23+
valgrind gcovr xmlstarlet
24+
- name: ccache
25+
uses: hendrikmuhs/ccache-action@v1.2
26+
with:
27+
create-symlink: true
28+
- name: Prep
29+
run: ./deps.sh && ./prep.sh -DBUILD_DOCS=OFF
30+
- name: Build
31+
run: ./build.sh
32+
- name: Test
33+
run: ./build.sh check
34+
- name: Collect coverage
35+
run: ./build.sh coverage
36+
- name: Archive coverage
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: unit-test-coverage
40+
path: build/default/coverage*
41+
- name: Report coverage
42+
run: |
43+
SRC_COV_PERC=$(xmlstarlet sel -t -v 'floor(/coverage/packages/package[@name="src"]/@line-rate * 100)' -n build/default/coverage-xml.xml)
44+
echo "Source coverage: ${SRC_COV_PERC}%" >> $GITHUB_STEP_SUMMARY
45+
46+
mock-bpa-test:
47+
runs-on: ubuntu-22.04
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
with:
52+
submodules: recursive
53+
- name: Set up OS
54+
run: >
55+
sudo apt-get update && sudo apt-get install -y
56+
cmake ninja-build ruby build-essential
57+
libssl-dev
58+
valgrind gcovr xmlstarlet
59+
- name: ccache
60+
uses: hendrikmuhs/ccache-action@v1.2
61+
with:
62+
create-symlink: true
63+
- name: Prep
64+
run: ./deps.sh && ./prep.sh -DBUILD_DOCS=OFF
65+
- name: Build
66+
run: ./build.sh
67+
- name: Install
68+
run: ./build.sh install
69+
- name: Test Prep
70+
run: |
71+
sudo apt-get update && sudo apt-get install -y \
72+
python3 python3-pip
73+
pip3 install --upgrade pip
74+
pip3 install -r mock-bpa-test/requirements.txt
75+
- name: Test
76+
run: python3 -m pytest mock-bpa-test --capture=no --log-cli-level=debug
77+
- name: Collect coverage
78+
run: ./build.sh coverage
79+
- name: Archive coverage
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: mock-bpa-test-coverage
83+
path: build/default/coverage*
84+
- name: Report coverage
85+
run: |
86+
SRC_COV_PERC=$(xmlstarlet sel -t -v 'floor(/coverage/packages/package[@name="src"]/@line-rate * 100)' -n build/default/coverage-xml.xml)
87+
echo "Source coverage: ${SRC_COV_PERC}%" >> $GITHUB_STEP_SUMMARY

.github/workflows/codeql.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request: {} # any target
18+
schedule:
19+
- cron: '20 8 * * 4'
20+
21+
jobs:
22+
analyze:
23+
name: Analyze (${{ matrix.language }})
24+
if: false # disabled for private repository
25+
26+
# Runner size impacts CodeQL analysis time. To learn more, please see:
27+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28+
# - https://gh.io/supported-runners-and-hardware-resources
29+
# - https://gh.io/using-larger-runners
30+
# Consider using larger runners for possible analysis time improvements.
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
33+
permissions:
34+
# required for all workflows
35+
security-events: write
36+
37+
# only required for workflows in private repositories
38+
actions: read
39+
contents: read
40+
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
include:
45+
- language: c-cpp
46+
build-mode: manual
47+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
48+
# Use `c-cpp` to analyze code written in C, C++ or both
49+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
50+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
51+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
52+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
53+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
54+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
with:
59+
fetch-depth: 0
60+
submodules: recursive
61+
62+
- name: Prep
63+
if: matrix.build-mode == 'manual'
64+
run: |
65+
sudo apt-get update && sudo apt-get install -y \
66+
cmake ninja-build ruby build-essential \
67+
libssl-dev
68+
./deps.sh
69+
./prep.sh -DBUILD_TESTING=OFF -DTEST_MEMCHECK=OFF -DTEST_COVERAGE=OFF -DBUILD_DOCS=OFF
70+
71+
# Initializes the CodeQL tools for scanning.
72+
- name: Initialize CodeQL
73+
uses: github/codeql-action/init@v3
74+
with:
75+
languages: ${{ matrix.language }}
76+
build-mode: ${{ matrix.build-mode }}
77+
config: |
78+
paths:
79+
- src
80+
- test
81+
- agent-test
82+
83+
- name: Build
84+
if: matrix.build-mode == 'manual'
85+
run: |
86+
./build.sh
87+
88+
- name: Perform CodeQL Analysis
89+
uses: github/codeql-action/analyze@v3
90+
with:
91+
category: "/language:${{matrix.language}}"

.github/workflows/docs.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: API documentation
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
push:
6+
branches:
7+
- main
8+
- 'apl-fy[0-9][0-9]'
9+
pull_request: {} # any target
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
apidoc:
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
submodules: recursive
32+
- name: Set up OS
33+
run: >
34+
sudo apt-get update && sudo apt-get install -y
35+
cmake ninja-build ruby build-essential
36+
libssl-dev
37+
doxygen graphviz plantuml texlive texlive-latex-extra dblatex
38+
- name: Prep
39+
run: ./deps.sh && ./prep.sh -DBUILD_TESTING=OFF -DTEST_MEMCHECK=OFF -DTEST_COVERAGE=OFF -DBUILD_DOCS_API=ON
40+
- name: Build
41+
run: |
42+
./build.sh --target docs-api-html docs-api-pdf
43+
./build.sh install --component docs-api
44+
- name: Compress
45+
working-directory: testroot/usr/share/doc/bsl
46+
run: tar -cf api.tar html *.pdf
47+
- name: Archive
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: bsl-api
51+
path: testroot/usr/share/doc/bsl/api.tar
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
needs: apidoc
58+
# if: github.ref == 'refs/heads/main'
59+
if: false # disabled for private repository
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/download-artifact@v4
63+
with:
64+
name: bsl-api
65+
- name: Decompress
66+
run: tar -xf api.tar
67+
- name: Setup Pages
68+
uses: actions/configure-pages@v3
69+
- name: Upload artifact
70+
uses: actions/upload-pages-artifact@v2
71+
with:
72+
path: testroot/usr/share/doc/bsl/
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v2

.github/workflows/formatting.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Source formatting
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'apl-fy[0-9][0-9]'
8+
pull_request: {} # any target
9+
schedule:
10+
- cron: '20 8 * * 4'
11+
12+
jobs:
13+
check-formatting:
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
submodules: false
21+
- name: Set up OS
22+
run: |
23+
sudo apt-get update && sudo apt-get install -y \
24+
clang-format python3-pip
25+
pip3 install licenseheaders
26+
- name: Check code formatting
27+
run: ./check_format.sh #|| echo "::warning ::Code formatting issues detected"
28+
continue-on-error: true

0 commit comments

Comments
 (0)