diff --git a/.github/workflows/build-cfs-deprecated.yml b/.github/workflows/build-cfs-deprecated.yml index 67a996d4e..b06b96144 100644 --- a/.github/workflows/build-cfs-deprecated.yml +++ b/.github/workflows/build-cfs-deprecated.yml @@ -1,11 +1,8 @@ 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: @@ -13,11 +10,27 @@ env: 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 diff --git a/.github/workflows/build-cfs.yml b/.github/workflows/build-cfs.yml index bbddd1f83..e6ab1fe0d 100644 --- a/.github/workflows/build-cfs.yml +++ b/.github/workflows/build-cfs.yml @@ -1,11 +1,8 @@ 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: @@ -13,8 +10,24 @@ env: 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 diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 000000000..c14f1b73e --- /dev/null +++ b/.github/workflows/changelog.yml @@ -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 + \ No newline at end of file diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index abab28920..e78d43c78 100644 --- a/.github/workflows/codeql-build.yml +++ b/.github/workflows/codeql-build.yml @@ -13,25 +13,45 @@ 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 @@ -39,14 +59,17 @@ jobs: # 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 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index b946a8b7f..06a4aa100 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -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 @@ -19,8 +32,7 @@ jobs: matrix: cppcheck: [bundle, cfe, osal, psp] - steps: - + steps: - name: Install cppcheck run: sudo apt-get install cppcheck -y diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fcc10b36..6b06b69cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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) @@ -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. \ No newline at end of file +Please ensure that your name is associated with your github profile before contributing. diff --git a/apps/ci_lab b/apps/ci_lab index c5714d9cf..306216728 160000 --- a/apps/ci_lab +++ b/apps/ci_lab @@ -1 +1 @@ -Subproject commit c5714d9cf187cebb58f71d8d9a567f4c8745cf86 +Subproject commit 30621672863e99bf2d43488e566d60784bb4e715 diff --git a/apps/sample_app b/apps/sample_app index dac28c05b..1c32ed48c 160000 --- a/apps/sample_app +++ b/apps/sample_app @@ -1 +1 @@ -Subproject commit dac28c05ba1e6aa4228c7d1088fa462d20305071 +Subproject commit 1c32ed48ca358a3fdd55f1bdc9ae0dda61a4f4f7 diff --git a/apps/sch_lab b/apps/sch_lab index f2ed3d20b..4a1b72e5a 160000 --- a/apps/sch_lab +++ b/apps/sch_lab @@ -1 +1 @@ -Subproject commit f2ed3d20b1f4beb243b983aca23aa56e9d6b0193 +Subproject commit 4a1b72e5a3092369b49d5c65f325bc48e1f7f832 diff --git a/apps/to_lab b/apps/to_lab index f4fd9ec5b..17e4fccf6 160000 --- a/apps/to_lab +++ b/apps/to_lab @@ -1 +1 @@ -Subproject commit f4fd9ec5b3d0f795fea7f6d9c9d527b57f9e8919 +Subproject commit 17e4fccf6658a82af01e7b6a03fdca48cfd8c81a diff --git a/cfe b/cfe index 98bc15851..87025c70f 160000 --- a/cfe +++ b/cfe @@ -1 +1 @@ -Subproject commit 98bc15851ebbca83b01947520232ca0cf67a30cf +Subproject commit 87025c70fb6f20d658752e076d125ea63ae586f7 diff --git a/osal b/osal index 97c23c95a..65c584fee 160000 --- a/osal +++ b/osal @@ -1 +1 @@ -Subproject commit 97c23c95ae8af647c2cc0b73b41ceec7750cf448 +Subproject commit 65c584feea04b4c77389667a1e30ae56b4da35ce diff --git a/psp b/psp index 73366d44e..487f8b854 160000 --- a/psp +++ b/psp @@ -1 +1 @@ -Subproject commit 73366d44e5b9394a4f6fd32403f92a365e13c11e +Subproject commit 487f8b854033b328f8a70f70e4436717d1dc223e