Skip to content

Commit

Permalink
Merge pull request #1619 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
cFE Integration candidate: 2021-06-15
  • Loading branch information
astrogeco authored Jun 16, 2021
2 parents a16c78e + e9fd1a7 commit d03e24e
Show file tree
Hide file tree
Showing 62 changed files with 1,305 additions and 785 deletions.
139 changes: 139 additions & 0 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: "Build cFE Documentation"

on:
push:
pull_request:

env:
SIMULATION: native
BUILDTYPE: debug

jobs:

#Check 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"]'

build-docs:
#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 Dependencies
run: sudo apt-get install doxygen graphviz -y

# Check out the cfs bundle
- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Checkout submodule
uses: actions/checkout@v2
with:
path: cfe

- name: Check versions
run: git submodule

# Setup the build system
- name: Set up for build
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
make prep
- name: Build Docs
run: |
make doc > make_doc_stdout.txt 2> make_doc_stderr.txt
# Upload documentation logs as artifacts
- name: Archive Documentation Build Logs
uses: actions/upload-artifact@v2
with:
name: cFS Docs Artifacts
path: |
make_doc_stdout.txt
make_doc_stderr.txt
- name: Error Check
run: |
if [[ -s make_doc_stderr.txt ]]; then
cat make_doc_stderr.txt
exit -1
fi
build-usersguide:
#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 Dependencies
run: sudo apt-get install doxygen graphviz -y

# Check out the cfs bundle
- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Checkout submodule
uses: actions/checkout@v2
with:
path: cfe

- name: Check versions
run: git submodule

# Setup the build system
- name: Set up for build
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
make prep
- 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
uses: actions/upload-artifact@v2
with:
name: Users Guide Artifacts
path: |
make_usersguide_stdout.txt
make_usersguide_stderr.txt
usersguide_warnings.log
- name: Error Check
run: |
if [[ -s make_usersguide_stderr.txt ]]; then
cat make_usersguide_stderr.txt
exit -1
fi
- name: Warning Check
run: |
if [[ -s usersguide_warnings.log ]]; then
cat usersguide_warnings.log
exit -1
fi
97 changes: 97 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: "Code Coverage Analysis"

on:
push:
pull_request:

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

jobs:

#Check 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"]'

Local-Test-Build:
#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 coverage tools
run: sudo apt-get install lcov -y

# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Checkout submodule
uses: actions/checkout@v2
with:
path: cfe

- name: Check versions
run: git submodule

# Setup the build system
- name: Set up for build
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
make prep
# Build the code
- name: Build
run: |
make -C build/native/default_cpu1/core_api
make -C build/native/default_cpu1/core_private
make -C build/native/default_cpu1/es
make -C build/native/default_cpu1/evs
make -C build/native/default_cpu1/fs
make -C build/native/default_cpu1/msg
make -C build/native/default_cpu1/resourceid
make -C build/native/default_cpu1/sb
make -C build/native/default_cpu1/sbr
make -C build/native/default_cpu1/tbl
make -C build/native/default_cpu1/time
# Initialize lcov and test the code
- name: Test
run: |
lcov --capture --initial --directory build --output-file coverage_base.info
make -C build/native/default_cpu1/core_api test
make -C build/native/default_cpu1/core_private test
make -C build/native/default_cpu1/es test
make -C build/native/default_cpu1/evs test
make -C build/native/default_cpu1/fs test
make -C build/native/default_cpu1/msg test
make -C build/native/default_cpu1/resourceid test
make -C build/native/default_cpu1/sb test
make -C build/native/default_cpu1/sbr test
make -C build/native/default_cpu1/tbl test
make -C build/native/default_cpu1/time test
- name: Calculate Coverage
run: |
lcov --capture --rc lcov_branch_coverage=1 --directory build --output-file coverage_test.info
lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_base.info --add-tracefile coverage_test.info --output-file coverage_total.info
genhtml coverage_total.info --branch-coverage --output-directory lcov
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,29 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob

## Version History

### Development Build: v6.8.0-rc1+dev693

- Add CI workflow to run cFE coverage tests
- Updated FS Read/WriteHeader API return documentation
- Document CFE_ES_RunLoop increment task counter behavior
- standardize on "docs" subdirectory
- Update version description per current design
- Document CFE_TBL_Unregister use-case
- provide CFE assert lock/unlock
- Simplify CFE_FS_SetTimestamp and fix syslog typo
- Removed redundant check/set of CFE_CPU_ID_VALUE
- add time get reference error bit
- Add workflow to build cFE documentation
- Requirements updates
- ES/ResourceID documentation cleanup
- allow multiple sources in add_cfe_coverage_test
- add ES Misc Functional test
- add Mempool functional tests
- Clean/simplify version header and reporting
- doxygen cleanup
- Prepend system log messages with function name
- See <https://github.com/nasa/cFE/pull/1619> and <https://github.com/nasa/cFS/pull/265>

### Development Build: v6.8.0-rc1+dev642

- Update ES verify errors to match
Expand All @@ -34,7 +57,7 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob
- Use OSAL script to generate API guide
- Include verify headers to validate config
- Add doxygen aliases for OSAL parameter/retvals
- See <https://github.com/nasa/cFE/pull/1584> and <https://github.com/nasa/cFS/pull/263/>
- See <https://github.com/nasa/cFE/pull/1584> and <https://github.com/nasa/cFS/pull/263/>

### Development Build: v6.8.0-rc1+dev593

Expand Down
4 changes: 2 additions & 2 deletions cmake/Makefile.sample
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ lcov:

doc:
$(MAKE) --no-print-directory -C "$(O)" mission-doc
@/bin/echo -e "\n\nDetail Design: \nfile://$(CURDIR)/$(O)/doc/detaildesign/html/index.html\n"
@/bin/echo -e "\n\nDetail Design: \nfile://$(CURDIR)/$(O)/docs/detaildesign/html/index.html\n"

usersguide:
$(MAKE) --no-print-directory -C "$(O)" cfe-usersguide
@/bin/echo -e "\n\ncFE Users Guide: \nfile://$(CURDIR)/$(O)/doc/users_guide/html/index.html\n"
@/bin/echo -e "\n\ncFE Users Guide: \nfile://$(CURDIR)/$(O)/docs/users_guide/html/index.html\n"

osalguide:
$(MAKE) --no-print-directory -C "$(O)" osalguide
Expand Down
22 changes: 6 additions & 16 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function(add_cfe_coverage_test MODULE_NAME UNIT_NAME TESTCASE_SRC UT_SRCS)
# Compile the source unit(s) under test as a separate library
# This is done so that special coverage-specific compile flags can be used on these files
add_library(${OBJECT_TARGET} OBJECT
${UT_SRCS}
${UT_SRCS} ${ARGN}
)

# Apply the UT_COVERAGE_COMPILE_FLAGS to the units under test
Expand Down Expand Up @@ -611,21 +611,11 @@ function(process_arch SYSVAR)
# This can help with debugging if things go wrong.
message(STATUS "PSP Selection: ${CFE_SYSTEM_PSPNAME}")

# Append the PSP and OSAL selections to the Doxyfile so it will be included
# in the generated documentation automatically.
# Also extract the "-D" options within CFLAGS and inform Doxygen about these
string(REGEX MATCHALL "-D[A-Za-z0-9_=]+" DOXYGEN_DEFINED_MACROS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE "-D" " " DOXYGEN_DEFINED_MACROS "${DOXYGEN_DEFINED_MACROS}")
file(APPEND "${MISSION_BINARY_DIR}/doc/mission-content.doxyfile"
"PREDEFINED += ${DOXYGEN_DEFINED_MACROS}\n"
"INPUT += ${MISSION_SOURCE_DIR}/osal/src/os/${OSAL_SYSTEM_OSTYPE}\n"
"INPUT += ${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}\n"
"INPUT += ${CMAKE_BINARY_DIR}/inc")

# Append to usersguide.doxyfile
file(APPEND "${MISSION_BINARY_DIR}/doc/cfe-usersguide.doxyfile"
"INPUT += ${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}/src\n"
"INPUT += ${CMAKE_BINARY_DIR}/inc")
# Create a documentation content file, with any system-specific doxygen info
# this is done here in arch_build where the CFE_SYSTEM_PSPNAME is known
file(WRITE "${MISSION_BINARY_DIR}/docs/tgtsystem-content-${SYSVAR}.doxyfile"
"INPUT += ${CMAKE_BINARY_DIR}/inc\n"
)

# The PSP and/or OSAL should have defined where to install the binaries.
# If not, just install them in /cf as a default (this can be modified
Expand Down
8 changes: 6 additions & 2 deletions cmake/cfe-common.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Project related configuration options, shared for all cFE doxygen outputs
#---------------------------------------------------------------------------
@INCLUDE_PATH = @MISSION_SOURCE_DIR@
OUTPUT_DIRECTORY = .
ABBREVIATE_BRIEF = "The $name class " \
"The $name widget " \
"The $name file " \
Expand Down Expand Up @@ -55,7 +54,6 @@ GENERATE_DEPRECATEDLIST= YES
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
WARN_NO_PARAMDOC = YES
WARN_LOGFILE = @CMAKE_BINARY_DIR@/doc/warnings.log
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
Expand All @@ -77,6 +75,12 @@ INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/cfe_xref.dox
FILE_PATTERNS = *.c *.cpp *.cc *.C *.h *.hh *.hpp *.H *.dox *.md
RECURSIVE = YES
EXAMPLE_PATTERNS = *

# Exclude coverage tests, stubs and associated framework from the documentation
EXCLUDE_PATTERNS += "*/ut-stubs/*"
EXCLUDE_PATTERNS += "*/ut-coverage/*"
EXCLUDE_PATTERNS += "*/unit-test*/*"

#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions cmake/cfe-usersguide.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/main.dox

# Common definitions, some of which are extended or overridden here.
@INCLUDE = @MISSION_BINARY_DIR@/doc/cfe-common.doxyfile
@INCLUDE = @MISSION_BINARY_DIR@/docs/cfe-common.doxyfile
PROJECT_NAME = "Core Flight Executive Users Guide"
OUTPUT_DIRECTORY = users_guide
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/docs/users_guide
WARN_LOGFILE = @CMAKE_BINARY_DIR@/docs/cfe-usersguide-warnings.log
GENERATE_LATEX = YES

# For purposes of the user guide, reference the "stock" mission configuration
Expand All @@ -17,7 +18,6 @@ GENERATE_LATEX = YES
STRIP_FROM_PATH += @MISSION_SOURCE_DIR@/cfe/cmake/sample_defs
INPUT += @MISSION_SOURCE_DIR@/cfe/cmake/sample_defs

#PREDEFINED
PREDEFINED += @USERGUIDE_PREDEFINED@

# Bring in the cFE header files for the documentation of the various API calls
Expand Down
Loading

0 comments on commit d03e24e

Please sign in to comment.