Skip to content

Commit 828f353

Browse files
authored
Merge pull request #64 from nasa/integration-candidate
sample_lib Integration candidate: 2021-06-22
2 parents 12c82b5 + 2023352 commit 828f353

File tree

3 files changed

+70
-6
lines changed

3 files changed

+70
-6
lines changed

.github/workflows/codeql-build.yml

+62-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "CodeQL Analysis"
22

33
on:
44
push:
5+
pull_request:
56
branches:
67
- main
7-
pull_request:
88

99
env:
1010
SIMULATION: native
@@ -13,8 +13,67 @@ env:
1313
BUILDTYPE: release
1414

1515
jobs:
16+
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
17+
check-for-duplicates:
18+
runs-on: ubuntu-latest
19+
# Map a step output to a job output
20+
outputs:
21+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
22+
steps:
23+
- id: skip_check
24+
uses: fkirc/skip-duplicate-actions@master
25+
with:
26+
concurrent_skipping: 'same_content'
27+
skip_after_successful_duplicate: 'true'
28+
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
29+
30+
CodeQL-Security-Build:
31+
needs: check-for-duplicates
32+
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
33+
runs-on: ubuntu-18.04
34+
timeout-minutes: 15
35+
36+
steps:
37+
# Checks out a copy of your repository on the ubuntu-latest machine
38+
- name: Checkout bundle
39+
uses: actions/checkout@v2
40+
with:
41+
repository: nasa/cFS
42+
submodules: true
43+
44+
- name: Checkout submodule
45+
uses: actions/checkout@v2
46+
with:
47+
path: apps/sample_lib
48+
49+
- name: Check versions
50+
run: git submodule
51+
52+
- name: Initialize CodeQL
53+
uses: github/codeql-action/init@v1
54+
with:
55+
languages: c
56+
config-file: nasa/cFS/.github/codeql/codeql-security.yml@main
57+
58+
# Setup the build system
59+
- name: Set up for build
60+
run: |
61+
cp ./cfe/cmake/Makefile.sample Makefile
62+
cp -r ./cfe/cmake/sample_defs sample_defs
63+
make prep
64+
65+
# Build the code
66+
- name: Build
67+
run: |
68+
make sample_lib
69+
make native/default_cpu1/apps/sample_lib/unit-test/
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v1
1673

17-
CodeQL-Build:
74+
CodeQL-Coding-Standard-Build:
75+
needs: check-for-duplicates
76+
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
1877
runs-on: ubuntu-18.04
1978
timeout-minutes: 15
2079

@@ -38,7 +97,7 @@ jobs:
3897
uses: github/codeql-action/init@v1
3998
with:
4099
languages: c
41-
queries: +security-extended, security-and-quality
100+
config-file: nasa/cFS/.github/codeql/codeql-coding-standard.yml@main
42101

43102
# Setup the build system
44103
- name: Set up for build

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a
1111

1212
## Version History
1313

14+
### Development Build: v1.2.0-rc1+dev38
15+
16+
- Implement Coding Standard in CodeQL workflow
17+
- See <https://github.com/nasa/sample_lib/pull/64> and <https://github.com/nasa/cFS/pull/270>
18+
1419
### Development Build: v1.2.0-rc1+dev34
1520

1621
- Replace direct ref to ArgPtr with `UT_Hook_GetArgValueByName` macro. Reading the pointer directly is not advised.
@@ -24,8 +29,8 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a
2429

2530
### Development Build: v1.2.0-rc1+dev24
2631

27-
- Fix #46, simplify build to use wrappers and interface libs
28-
- Fix #48, Add Testing Tools to the Security Policy
32+
- Simplify build to use wrappers and interface libs
33+
- Add Testing Tools to the Security Policy
2934
- See <https://github.com/nasa/sample_lib/pull/50>
3035

3136
### Development Build: v1.2.0-rc1+dev10

fsw/src/sample_lib_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
/* Development Build Macro Definitions */
3434

35-
#define SAMPLE_LIB_BUILD_NUMBER 34 /*!< Development Build: Number of commits since baseline */
35+
#define SAMPLE_LIB_BUILD_NUMBER 38 /*!< Development Build: Number of commits since baseline */
3636
#define SAMPLE_LIB_BUILD_BASELINE \
3737
"v1.2.0-rc1" /*!< Development Build: git tag that is the base for the current development */
3838

0 commit comments

Comments
 (0)