Continuous Integration - nasa/gunns GitHub Wiki

This page describes the CI jobs (currently in the GitHub workflows) and how to keep them happy.

We currently only run all jobs on commits, and don't have any regularly scheduled jobs. Some of the jobs depend on Trick, which can change between our commits and cause the jobs to fail -- just be aware that a failure of these jobs on your commit isn't necessarily your fault, but could be caused by a change to Trick.

Unit Tests

This runs the unit tests, with Valgrind and LCOV, for most of the C & C++ code in the repository. The tests that are run are listed in the test/make_all_ut.sh script. See Unit Testing for more information about the unit tests.

This job does not depend on Trick.

This CI job is defined by the .github/workflows/unit_tests.yml file.

Unit Tests (ASan)

This runs the unit tests, with AddressSanitizer, for most of the C & C++ code in the repository. The tests that are run are listed in the test/make_all_ut_asan.sh script. See Unit Testing for more information about the unit tests.

This job does not depend on Trick.

This CI job is defined by the .github/workflows/unit_tests_asan.yml file.

Test Trick Sim

This builds and runs the sims/SIM_test Trick simulation. This tests the basic functionality of GUNNS networks, the Health & Status system, and GunnsDraw code auto-generation in a Trick sim. It is never intended to be a comprehensive test of the entire repository, but should catch major problems with Trick or the GUNNS core code & base classes.

This job depends on Trick.

This CI job is defined by the .github/workflows/sim_test.yml file.

Trick Library Dependencies

This tests that each C++ class can be compiled by itself into a Trick sim, and properly declares all of its code dependencies for Trick to include. This doesn't use the compiled libraries, such as lib/trick_if. Rather, this tests Trick's ability to compile and build code directly into the simulation, using the 'LIBRARY DEPENDENCY' keywords in the Trick-compatible code. This should reduce the missing library dependency errors in Trick sims.

Not all C++ classes are included. By default, we start with the list of files that are included in the compiled libraries. We subtract the files listed in sims/SIM_class_test_compile/class_ignore_list.py -- this skips things like abstract classes that can't be directly instantiated. If you add such a new class, you'll need to add it to this list to avoid failing the test.

Also, by default this test assumes that classes are named the same as their file, and they have default no-argument constructors. Exceptions to this rule are handled by the sims/SIM_class_test_compile/class_custom_construction.py file. If you add a new class that has a different name from its file, or doesn't have a default no-argument constructor (as is common with 'spotter' classes), then add a section to the python dictionary in that file to inform the test how to instantiate your class.

It takes a long time to run this on the whole repo, but you can save time by running the test sim for individual classes. Use the sims/SIM_class_test_compile/test_class.sh script - just supply your class path/file name as an argument.

This job depends on Trick.

This CI job is defined by the .github/workflows/lib_deps.yml file.