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

cFS bundle Integration candidate: 2021-03-30 #227

Merged
merged 7 commits into from
Apr 2, 2021
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
23 changes: 18 additions & 5 deletions .github/workflows/build-cfs-deprecated.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
name: "Deprecated Build, Test, and Run"

# Run every time a new commit pushed to main or for pull requests
# Run every time a new commit pushed or for pull requests
on:
push:
branches:
- main

pull_request:

env:
SIMULATION: native
OMIT_DEPRECATED: false

jobs:

#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'

# Set the job key. The key is displayed as the job name
# when a job name is not provided

build-cfs:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
name: Build
runs-on: ubuntu-18.04

Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/build-cfs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: Build, Test, and Run [OMIT_DEPRECATED=true]

# Run every time a new commit pushed to main or for pull requests
# Run every time a new commit pushed or for pull requests
on:
push:
branches:
- main

pull_request:

env:
SIMULATION: native
OMIT_DEPRECATED: true

jobs:

#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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-cfs:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
name: Build
runs-on: ubuntu-18.04

Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Changelog

# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Run Changelog
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issuesLabel: "### Closed issues"
breakingLabel: "### Breaking changes"
enhancementLabel: "### Implemented enhancements"
bugsLabel: "### Fixed bugs"
deprecatedLabel: "### Deprecated"
removedLabel: "### Removed"
securityLabel: "### Security fixes"
pullRequests: false
author: false

- name: "Upload changelog"
uses: actions/upload-artifact@v1.0.0
with:
name: "Changelog"
path: CHANGELOG.md

23 changes: 23 additions & 0 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,63 @@ env:
BUILDTYPE: release

jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'


CodeQL-Build:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15

steps:
# Checks out a copy of your repository
- name: Checkout code
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Check versions
if: ${{ !steps.skip-workflow.outputs.skip }}
run: |
git log -1 --pretty=oneline
git submodule

- name: Initialize CodeQL
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/init@v1
with:
languages: c
config-file: ./.github/codeql/codeql-config.yml

# Setup the build system
- name: Copy sample_defs
if: ${{ !steps.skip-workflow.outputs.skip }}
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs

# Setup the build system
- name: Make Install
if: ${{ !steps.skip-workflow.outputs.skip }}
run: make

# Run CodeQL
- name: Perform CodeQL Analysis
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/analyze@v1
24 changes: 18 additions & 6 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
name: Static Analysis

# Run this workflow every time a new commit pushed to your repository
# Run this workflow every time a new commit pushed to your repository and for pull requests
on:
push:
branches:
- main

pull_request:

jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'

static-analysis:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
name: Run cppcheck
runs-on: ubuntu-18.04

Expand All @@ -19,8 +32,7 @@ jobs:
matrix:
cppcheck: [bundle, cfe, osal, psp]

steps:

steps:
- name: Install cppcheck
run: sudo apt-get install cppcheck -y

Expand Down
25 changes: 24 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ So you'd like to contribute to cFS? Below are some guidelines for contributors t
* [Pull Requests](#pull-requests)
* [Discussions and Questions](#discussions-and-questions)

[Writing High-Quality Code](#writing-high-quality-code)

[Getting Started](#getting-started)

## Code of Conduct
Expand Down Expand Up @@ -94,6 +96,27 @@ Follow GitHub's fork-branch-pull request pattern.
4. The project team will label the issue and evaluate the pull request in the weekly configuration control board (CCB) meeting. For more information, visit [The cFS CCB Process.](https://github.com/nasa/cFS/wiki/The-cFS-CCB-Process)
5. If the pull request is accepted, it will be merged into cFS.

## Writing High-Quality Code

1. Follow cFS code conventions (formatting, symbol naming, file naming, etc). Do *not* change/reformat existing code, except to address your changes.
- The cFS submodules uses the Format Check workflow to ensure users follow the [clang-format-10](https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormat.html) style.
- The [cFS_IdentifierNamingConvention document](https://github.com/nasa/cFE/blob/main/docs/cFS_IdentifierNamingConvention.md) provides a simple naming convention guide for cFE/cFS for commands and telemetry that simplifies the EDS to ground telemetry and commands database conversion.
- The [cFE Application Developers Guide](https://github.com/nasa/cFE/blob/main/docs/cFE%20Application%20Developers%20Guide.md) contains code conventions such as naming conventions for header files.

2. For any new API's, add unit tests to cover nominal and off-nominal conditions.

3. Add/edit stubs to the unit test codebase for any new/modified functions.

4. For any changes to existing API's, alter the unit tests to cover the changes (and remove tests made irrelevant due to your changes).

5. Review the static code analyses results.
- Push code changes to the appropriate forked repository.
- Go to the Actions tab and enable GitHub Actions Workflow. The CodeQL Analyis and Static Analysis will be triggered for all pushed code.
- Review these workflows for any warnings or errors.
- Once successful, create a pull request.

For more information on our GitHub Action Workflows, view our [Security Policy](https://github.com/nasa/cFS/security/policy).

## Getting Started
Before you begin, search through the open issues in each submodule to ensure that your ticket is relevant, not redundant, nor in conflict with other tickets:
* [cFS Bundle Issues](https://github.com/nasa/cfs/issues)
Expand All @@ -115,4 +138,4 @@ Before you begin, search through the open issues in each submodule to ensure tha

If your bug or feature hasn't been reported or requested before, create a new issue in the appropriate repository. If it you find a similar issue, please add a comment on it with your experience or input.

Please ensure that your name is associated with your github profile before contributing.
Please ensure that your name is associated with your github profile before contributing.
2 changes: 1 addition & 1 deletion apps/ci_lab
2 changes: 1 addition & 1 deletion apps/sch_lab
2 changes: 1 addition & 1 deletion apps/to_lab
2 changes: 1 addition & 1 deletion cfe
Submodule cfe updated 165 files
2 changes: 1 addition & 1 deletion osal
Submodule osal updated 42 files
+11 −0 README.md
+0 −6 src/examples/tasking-example/tasking-example.c
+0 −28 src/os/inc/common_types.h
+1 −1 src/os/inc/osapi-dir.h
+1 −0 src/os/inc/osapi-error.h
+4 −0 src/os/inc/osapi-select.h
+1 −12 src/os/inc/osapi-task.h
+1 −1 src/os/inc/osapi-version.h
+14 −13 src/os/portable/os-impl-bsd-select.c
+1 −1 src/os/portable/os-impl-posix-dirs.c
+1 −1 src/os/shared/inc/os-shared-task.h
+1 −11 src/os/shared/src/osapi-common.c
+1 −1 src/os/shared/src/osapi-idmap.c
+1 −4 src/os/shared/src/osapi-printf.c
+3 −3 src/os/shared/src/osapi-queue.c
+15 −0 src/os/shared/src/osapi-select.c
+0 −19 src/os/shared/src/osapi-task.c
+1 −0 src/os/vxworks/src/os-impl-console.c
+12 −1 src/os/vxworks/src/os-impl-symtab.c
+1 −1 src/os/vxworks/src/os-impl-tasks.c
+2 −2 src/os/vxworks/src/os-impl-timebase.c
+0 −4 src/tests/CMakeLists.txt
+0 −3 src/tests/bin-sem-flush-test/bin-sem-flush-test.c
+0 −2 src/tests/bin-sem-test/bin-sem-test.c
+0 −2 src/tests/bin-sem-timeout-test/bin-sem-timeout-test.c
+0 −3 src/tests/count-sem-test/count-sem-test.c
+2 −4 src/tests/file-api-test/file-api-test.c
+0 −3 src/tests/mutex-test/mutex-test.c
+0 −2 src/tests/osal-core-test/osal-core-test.c
+0 −2 src/tests/queue-test/queue-test.c
+0 −2 src/tests/sem-speed-test/sem-speed-test.c
+355 −1 src/unit-test-coverage/portable/src/coveragetest-bsd-sockets.c
+0 −12 src/unit-test-coverage/shared/src/coveragetest-task.c
+10 −1 src/unit-test-coverage/ut-stubs/src/arpa-inet-stubs.c
+17 −2 src/unit-test-coverage/ut-stubs/src/osapi-select-impl-stubs.c
+45 −0 src/unit-test-coverage/ut-stubs/src/sys-socket-stubs.c
+1 −0 src/unit-test-coverage/vxworks/adaptors/inc/ut-adaptor-symtab.h
+8 −0 src/unit-test-coverage/vxworks/adaptors/src/ut-adaptor-symtab.c
+27 −1 src/unit-test-coverage/vxworks/src/coveragetest-symtab.c
+0 −114 src/unit-tests/oscore-test/ut_oscore_task_test.c
+0 −1 src/unit-tests/oscore-test/ut_oscore_test.c
+0 −25 src/ut-stubs/osapi-utstub-task.c