Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI for deploy docs, warnings, and simplify #61

Merged
merged 2 commits into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 42 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,54 @@
os: linux
dist: bionic
sudo: required
language:
- c
language: c
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- cmake cppcheck doxygen lcov graphviz
env:
global:
- SIMULATION=native
- ENABLE_UNIT_TESTS=true
matrix:
- DEPLOY_DIR=$TRAVIS_BUILD_DIR/deploy
jobs:
- BUILDTYPE=release OMIT_DEPRECATED=true
- BUILDTYPE=release OMIT_DEPRECATED=false
- BUILDTYPE=debug OMIT_DEPRECATED=true
- BUILDTYPE=debug OMIT_DEPRECATED=false

before_install:
- sudo apt-get install cppcheck doxygen lcov graphviz
# Build the pdfs and copy to the deploy directory
before_deploy:
- sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- mkdir $DEPLOY_DIR
- cd $TRAVIS_BUILD_DIR/build/doc/users_guide/latex
- make > build.txt
astrogeco marked this conversation as resolved.
Show resolved Hide resolved
- cp refman.pdf $DEPLOY_DIR/cFE_Users_Guide.pdf
- cd $TRAVIS_BUILD_DIR/build/doc/osalguide/latex
- make > build.txt
- cp refman.pdf $DEPLOY_DIR/OSAL_Users_Guide.pdf
- cd $TRAVIS_BUILD_DIR

# Deploy documentation to github pages
deploy:
provider: pages:git
cleanup: false
token: $GITHUB_TOKEN # Set in personal repository, as a secure variable
keep_history: false
local_dir: $DEPLOY_DIR
on:
condition: $BUILDTYPE = release && $OMIT_DEPRECATED = false
edge: true

script:
# Check versions
- cppcheck --version
# Setup standard permissive build
- cp cfe/cmake/Makefile.sample Makefile
- cp -r cfe/cmake/sample_defs sample_defs
- sed -i 's/undef OSAL_DEBUG_PERMISSIVE_MODE/define OSAL_DEBUG_PERMISSIVE_MODE/g' sample_defs/default_osconfig.h
# Static code analysis
# Below is intent but fails - exit code bug in cppcheck 1.82
# - cppcheck --force --inline-suppr --quiet --error-exitcode=1 .
Expand Down Expand Up @@ -59,6 +78,7 @@ script:
cat make_doc_stderr.txt
exit -1
fi
# Eventually enforce no doxygen warnings
- make usersguide > make_usersguide_stdout.txt 2> make_usersguide_stderr.txt
- |
if [[ -s make_usersguide_stderr.txt ]]; then
Expand All @@ -67,6 +87,13 @@ script:
cat make_usersguide_stderr.txt
exit -1
fi
- |
if [[ -s build/doc/warnings.log ]]; then
echo "You must fix doxygen warnings for \"usersguide\" before submitting a pull request"
echo ""
cat build/doc/warnings.log
exit -1
fi
- make osalguide > make_osalguide_stdout.txt 2> make_osalguide_stderr.txt
- |
if [[ -s make_osalguide_stderr.txt ]]; then
Expand All @@ -75,7 +102,13 @@ script:
cat make_osalguide_stderr.txt
exit -1
fi
# Eventually enforce no doxygen warnings
- |
if [[ -s build/doc/warnings.log ]]; then
echo "You must fix doxygen warnings for \"osalguide\" before submitting a pull request"
echo ""
cat build/doc/warnings.log
exit -1
fi
# List cpu1 for core binary
- ls build/exe/cpu1/
# Start cFE (pipe output to file), pause, send reset command, check outputs
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,22 @@ Copy in the default makefile and definitions:
cp cfe/cmake/Makefile.sample Makefile
cp -r cfe/cmake/sample_defs sample_defs

If running on a standard linux build as a normal user, define OSAL_DEBUG_PERMISSIVE_MODE for best effort message queue depth and task priorities.

sed -i 's/undef OSAL_DEBUG_PERMISSIVE_MODE/define OSAL_DEBUG_PERMISSIVE_MODE/g' sample_defs/default_osconfig.h

## Build and Run

The cFS Framework including sample applications will build and run on the pc-linux platform support package (should run on most Linux distributions), via the steps described in https://github.com/nasa/cFE/tree/master/cmake/README.md. Quick-start is below:

To prep, compile, and run (from cFS directory above):
To prep, compile, and run on the host (from cFS directory above) as a normal user (best effort message queue depth and task priorities):

make prep
make SIMULATION=native prep
make
make install
cd build/exe/cpu1/
./core-cpu1

Should see startup messages, and CFE_ES_Main entering OPERATIONAL state. Note the code must be executed from the build/exe/cpu1 directory to find the startup script and shared objects.

Note: The steps above are for a debug, permissive mode build and includes deprecated elements. For a release build, recommendation is `make BUILDTYPE=release OMIT_DEPRECATED=true prep`. Unit tests can be added with `ENABLE_UNIT_TESTS=true`, run with `make test`, and coverage reported with `make lcov`.

## Send commands, receive telemetry

The cFS-GroundSystem tool can be used to send commands and receive telemetry (see https://github.com/nasa/cFS-GroundSystem/tree/master/Guide-GroundSystem.txt, the Guide-GroundSystem.txt). Note it depends on PyQt4 and PyZMQ:
Expand Down