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

Add contributing tips #2704

Merged
merged 6 commits into from
May 17, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ saveop
sbb
SBF
SBINDIR
sbt
scatterometer
schem
schematron
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ build-fprime-automatic*
/ci-venv/
/ci-logs*
/ci-Framework-logs*
/ci-Ref-logs*
TesterBase.*
GTestBase.*
**/DefaultDict/serializable/*
Expand Down
48 changes: 47 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ get the submission moving forward.
### Automated Checks on Reference Repositories

Some of the above-mentioned automated checks run on reference applications that are not part of the core F´ repository, such as our [tutorial repositories](https://github.com/fprime-community#tutorials). This serves two main purposes: running more tests, and making sure our suite of reference applications and tutorials do not go out-of-date.
Because of this pattern, users who submit a pull request which introduces breaking changes on _how_ F´ is used in those external repositories will need to submit associated pull requests to introduce a fix on said external repositories.
Because of this pattern, users who submit a pull request which introduces breaking changes on _how_ F´ is used in those external repositories will need to submit associated pull requests to introduce a fix on said external repositories.

The checks are configured to run on the `devel` branch of each external repository, but will prioritize the branch `pr-<PR_NUMBER>` if it exists, with `PR_NUMBER` being the number of the pull request that has been opened in nasa/fprime.

Expand Down Expand Up @@ -150,3 +150,49 @@ tools this can increase the effort required to review a submission. Be careful w
The automatic checking system will run all our unit tests and integration tests across several systems. However, this
process will take time. Try to run the unit tests locally during development before submitting a PR and use the
automatic checks as a safety net.

The tests can be run using the following commands:

```bash
# Go into the fprime directory
cp MY_FPRIME_DIRECTORY

# Run CI tests on fprime
./ci/tests/Framework.bash

# Run CI tests on the reference application
./ci/tests/Ref.bash

# Run the static analyzer with the basic configuration
# Purge unit test directory
fprime-util purge
# Generate the build files for clang-tidy. Make sure clang-tidy is installed.
fprime-util generate --ut -DCMAKE_CXX_CLANG_TIDY=clang-tidy-12
# Build fprime with the static analyzer
fprime-util build --all --ut -j16

# Run the static analyzer with additional flight code checks
# Purge release directory
fprime-util purge
# Generate the build files for clang-tidy. Make sure clang-tidy is installed.
fprime-util generate -DCMAKE_CXX_CLANG_TIDY="clang-tidy-12;--config-file=$PWD/release.clang-tidy"
# Build fprime with the static analyzer
fprime-util build --all -j16
```

## Development with modified FPP version

In case FPP needs to be locally changed, first uninstall all `fprime-fpp-*` `pip` packages, and install FPP
using the procedure mentioned in the [FPP readme](https://github.com/nasa/fpp/blob/main/compiler/README.adoc).

Then, `fprime-util generate` needs to be run using `-DFPRIME_SKIP_TOOLS_VERSION_CHECK=1`

For example, to generate and build F´:
```bash
# Go into the fprime directory
cp MY_FPRIME_DIRECTORY
# Generate the build files without checking the FPP version
fprime-util generate -DFPRIME_SKIP_TOOLS_VERSION_CHECK=1
# Build the project
fprime-util build -j4
```