Skip to content

Commit

Permalink
Fix nasa#212, Add unit test workflow
Browse files Browse the repository at this point in the history
Splits build-run job into two separate jobs, adds test and converage job
  • Loading branch information
chillfig committed Mar 24, 2022
1 parent b950c9d commit 4fb49c7
Show file tree
Hide file tree
Showing 39 changed files with 701 additions and 3,250 deletions.
79 changes: 76 additions & 3 deletions .github/workflows/build-cfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ on:
env:
SIMULATION: native
OMIT_DEPRECATED: true
ENABLE_UNIT_TESTS: false
ENABLE_UNIT_TESTS: true
CTEST_OUTPUT_ON_FAILURE: true
REPO_NAME: ${{ github.event.repository.name }}

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
runs-on: ubuntu-18.04
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
Expand All @@ -25,13 +27,30 @@ jobs:
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

build-run:
build-cf-omit-deprecated-true:
name: Build
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
buildtype: [debug, release]

# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}

steps:
- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/*
key: build-${{ github.run_number }}-${{ matrix.buildtype }}

- name: Checkout bundle
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -60,6 +79,28 @@ jobs:

- name: Make Install
run: make install

run-cf-omit-deprecated-true:
name: Run
needs: build-cf-omit-deprecated-true
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
buildtype: [debug, release]

# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}

steps:
- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/*
key: build-${{ github.run_number }}-${{ matrix.buildtype }}

- name: Run cFS
run: |
Expand All @@ -83,4 +124,36 @@ jobs:
exit -1
fi
working-directory: ./build/exe/cpu1/

tests-and-coverage-omit-deprecated-true:
name: Run Unit Tests and Check Coverage
needs: run-cf-omit-deprecated-true
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
buildtype: [debug, release]

# Set the type of machine to run on
env:
BUILDTYPE: ${{ matrix.buildtype }}
ENABLE_UNIT_TESTS: true

steps:
- name: Install Dependencies
run: sudo apt-get install lcov -y

- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/*
key: build-${{ github.run_number }}-${{ matrix.buildtype }}

- name: Run Tests
run: make test

- name: Check Coverage
run: make lcov

12 changes: 12 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Format Check

# Run on all push and pull requests
on:
push:
pull_request:

jobs:
format-check:
name: Run format check
uses: nasa/cFS/.github/workflows/format-check.yml@main

12 changes: 12 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Static Analysis

# Run on all push and pull requests
on:
push:
pull_request:

jobs:
static-analysis:
name: Run cppcheck
uses: nasa/cFS/.github/workflows/static-analysis.yml@main

68 changes: 26 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,36 @@
core Flight System (cFS) CFDP Application (CF)
======================================================
#core Flight System (cFS) CFDP Application (CF)

Open Source Release Readme
==========================
## Introduction

CF Release 3.0.0
The CFDP application (CF) is a core Flight System (cFS) application
that is a plug in to the Core Flight Executive (cFE) component of the cFS.

Date: 09/28/2021
CF is a cFS application for providing CFDP (CCSDS File Delivery Protocol) CCSDS 727.0-B-5 compliant
services. Its primary function is to provide file receive and transmit
functionality to this protocol. It works by mapping CFDP PDUs on and off cFS's
software bus.

Introduction
-------------
The CFDP application (CF) is a core Flight System (cFS) application
that is a plug in to the Core Flight Executive (cFE) component of the cFS.
The CF application is written in C and depends on the cFS Operating System
Abstraction Layer (OSAL) and cFE components. There is additional CF application
specific configuration information contained in the application user's guide.

CF 3.0 is a cFS application for providing CFDP (CCSDS File Delivery Protocol)
services. Its primary function is to provide file receive and transmit
functionality to this protocol. It works by mapping CFDP PDUs on and off cFS's
software bus.
User's guide information can be generated using Doxygen (from top mission directory):
```
make prep
make -C build/docs/cf-usersguide cf-usersguide
```

The CF application is written in C and depends on the cFS Operating System
Abstraction Layer (OSAL) and cFE components. There is additional CF application
specific configuration information contained in the application user's guide.

Developer's guide information can be generated using Doxygen:
doxygen cf_doxygen_config.txt
## Software Required

cFS Framework (cFE, OSAL, PSP)

Software Included
------------------
An integrated bundle including the cFE, OSAL, and PSP can
be obtained at https://github.com/nasa/cfs

CFDP application (CF) 3.0.0
## About cFS


Software Required
------------------

cFS Caelum

Note: An integrated bundle including the cFE, OSAL, and PSP can
be obtained at https://github.com/nasa/cfs

About cFS
----------
The cFS is a platform and project independent reusable software framework and
set of reusable applications developed by NASA Goddard Space Flight Center.
This framework is used as the basis for the flight software for satellite data
systems and instruments, but can be used on other embedded systems. More
information on the cFS can be found at http://cfs.gsfc.nasa.gov

EOF
The cFS is a platform and project independent reusable software framework and
set of reusable applications developed by NASA Goddard Space Flight Center.
This framework is used as the basis for the flight software for satellite data
systems and instruments, but can be used on other embedded systems. More
information on the cFS can be found at http://cfs.gsfc.nasa.gov
Loading

0 comments on commit 4fb49c7

Please sign in to comment.