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

PSP Integration candidate: 2021-02-02 #250

Merged
merged 9 commits into from
Feb 16, 2021
56 changes: 56 additions & 0 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "CodeQL Analysis"

on:
push:
pull_request:

env:
SIMULATION: native
ENABLE_UNIT_TESTS: true
OMIT_DEPRECATED: true
BUILDTYPE: release

jobs:

CodeQL-Build:
runs-on: ubuntu-18.04
timeout-minutes: 15

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Checkout submodule
uses: actions/checkout@v2
with:
path: psp

- name: Check versions
run: git submodule

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: c
queries: +security-extended, security-and-quality

# Setup the build system
- name: Set up for build
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
make prep

# Build the code
- name: Build
run: |
make psp-pc-linux
make native/default_cpu1/psp/unit-test-coverage/
make native/default_cpu1/psp/ut-stubs/

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
53 changes: 53 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Format Check

# Run on main push and pull requests
on:
push:
branches:
- main
pull_request:

jobs:

static-analysis:
name: Run format check
runs-on: ubuntu-18.04
timeout-minutes: 15

steps:

- name: Install format checker
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
sudo apt-get update && sudo apt-get install clang-format-10

- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS

- name: Checkout
uses: actions/checkout@v2
with:
path: repo

- name: Generate format differences
run: |
cd repo
find . -name "*.[ch]" -exec clang-format-10 -i -style=file {} +
git diff > $GITHUB_WORKSPACE/style_differences.txt

- name: Archive Static Analysis Artifacts
uses: actions/upload-artifact@v2
with:
name: style_differences
path: style_differences.txt

- name: Error on differences
run: |
if [[ -s style_differences.txt ]];
then
cat style_differences.txt
exit -1
fi
1 change: 1 addition & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
static-analysis:
name: Run cppcheck
runs-on: ubuntu-18.04
timeout-minutes: 15

strategy:
fail-fast: false
Expand Down
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Travis-CI: [![Build Status](https://travis-ci.com/nasa/PSP.svg)](https://travis-ci.com/nasa/PSP)
![Static Analysis](https://github.com/nasa/psp/workflows/Static%20Analysis/badge.svg)
![Format Check](https://github.com/nasa/psp/workflows/Format%20Check/badge.svg)

# Core Flight System : Framework : Platform Support Package

Expand All @@ -8,6 +9,14 @@ This is a collection of APIs abstracting platform specific functionality to be l

## Version History

### Development Build: 1.5.0-rc1+dev68

- Updates continuous integration workfow by adding static analysis with timeout and code format check. Adds status badges to ReadMe and removes old TravisCI artifacts.
- Adds CodeQL analysis to continuous integration
- Apply standard formatting to psp codebase. Only changes whitespace.
- Adds missing "+dev" to development version output
- See <https://github.com/nasa/PSP/pull/250>

### Development Build: 1.5.0-rc1+dev58

- Add `Security.md` with instructions on reporting vulnerabilities.
Expand Down Expand Up @@ -41,7 +50,7 @@ This is a collection of APIs abstracting platform specific functionality to be l

### Development Build: 1.5.0-rc1+dev30

- PR #212 - Use event callback mechanism to invoke pthread_setname_np() such that the OS kernel is informed of the OSAL task name. `/proc` filesystem on Linux now has actual task name, instead of all being core-cpu1. The `pthread_setname_np` API requires `_GNU_SOURCE` to be defined when compiling - this can be local to PSP.
- - Use event callback mechanism to invoke pthread_setname_np() such that the OS kernel is informed of the OSAL task name. `/proc` filesystem on Linux now has actual task name, instead of all being core-cpu1. The `pthread_setname_np` API requires `_GNU_SOURCE` to be defined when compiling - this can be local to PSP.
- Set REVISION to "99" to indicate development version
- See <https://github.com/nasa/PSP/pull/213>

Expand Down
Loading