Skip to content

Commit 506d0a5

Browse files
committed
Merge branch 'main' of https://github.com/nasa/cFS into fix-382-reuse-workflows
2 parents a7ecfc6 + 81227d5 commit 506d0a5

6 files changed

+72
-56
lines changed

.github/codeql/codeql-coding-standard.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,17 @@ name: "CodeQL Coding Standard Configuration File"
33
disable-default-queries: true
44

55
queries:
6-
- name: JPL and MISRA
7-
uses: ./.github/codeql/jpl-misra.qls
6+
- name: JPL Rules
7+
uses: github/codeql/cpp/ql/src/JPL_C@main
8+
- name: MISRA Rule 9-5-1
9+
uses: github/codeql/cpp/ql/src/jsf/4.20 Unions and Bit Fields/AV Rule 153.ql@main
10+
- name: MISRA Rule 5-18-1
11+
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 168.ql@main
12+
- name: MISRA 6-2-2
13+
uses: github/codeql/cpp/ql/src/jsf/4.25 Expressions/AV Rule 202.ql@main
14+
- name: MISRA Rule 5-14-1
15+
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql@main
16+
- name: MISRA Rule 5-3-2
17+
uses: github/codeql/cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql@main
18+
- name: MISRA Rule 7-5-2
19+
uses: github/codeql/cpp/ql/src/jsf/4.22 Pointers and References/AV Rule 173.ql@main

.github/codeql/jpl-misra.qls

-21
This file was deleted.

.github/workflows/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ For the CodeQL GitHub Actions setup, visit https://github.com/github/codeql-acti
3535

3636
Our CodeQL action uses a configuration file to use specific queries, which can be found at [.github/codeql](https://github.com/nasa/cFS/tree/main/.github/codeql).
3737

38-
## Static Analysis
39-
[![Static Analysis](https://github.com/nasa/cfs/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/static-analysis.yml)
38+
## Static Analaysis
39+
[![Static Analaysis](https://github.com/nasa/cfs/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/static-analysis.yml)
4040

4141
This action runs a static analysis tool for C/C++ code known as cppcheck. Cppcheck is designed to be able to analyze C/C++ code even if it has non-standard syntax, which is common in embedded projects.
4242

@@ -68,6 +68,6 @@ This action creates a changelog file which documents all the issues in cFS.
6868
The Changelog action runs manually.
6969

7070
## Format Check
71-
[![Format Check](https://github.com/nasa/cfs/actions/workflows/format-check.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/format-check.yml)
71+
[![Format Check](https://github.com/nasa/osal/actions/workflows/format-check.yml/badge.svg)](https://github.com/nasa/osal/actions/workflows/format-check.yml)
7272

7373
This action uses [clang-format-10](https://github.com/nasa/cFS/blob/main/.clang-format) to check for format errors.

.github/workflows/build-documentation.yml

+49-22
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ on:
77

88
env:
99
SIMULATION: native
10+
REPO_NAME: ${{ github.event.repository.name }}
1011

1112
jobs:
12-
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
13+
# Checks for duplicate actions. Skips push actions if there is a matching or
14+
# duplicate pull-request action.
1315
checks-for-duplicates:
1416
runs-on: ubuntu-latest
1517
# Map a step output to a job output
@@ -24,7 +26,8 @@ jobs:
2426
do_not_skip: '["push", "workflow_dispatch", "schedule"]'
2527

2628
build-docs:
27-
#Continue if checks-for-duplicates found no duplicates. Always runs for pull-requests.
29+
# Continue if checks-for-duplicates found no duplicates. Always runs for
30+
# pull-requests.
2831
needs: checks-for-duplicates
2932
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
3033
name: cFE Documentation
@@ -92,7 +95,7 @@ jobs:
9295
cp ./cfe/cmake/Makefile.sample Makefile
9396
cp -r ./cfe/cmake/sample_defs sample_defs
9497
95-
# Setup the build system
98+
# Setup the build system
9699
- name: Make Prep
97100
run: make prep
98101

@@ -126,21 +129,34 @@ jobs:
126129
exit -1
127130
fi
128131
129-
pdf-usersguide:
132+
- name: Cache cFS Build Environment for usersguide
133+
id: cache-bundle
134+
uses: actions/cache@v2
135+
with:
136+
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
137+
key: usersguide-buildnum-${{ github.run_number }}
138+
139+
deploy-usersguide:
130140
needs: build-usersguide
131141
# Name the Job
132-
name: PDF Users Guide
142+
name: Deploy Users Guide
133143
# Set the type of machine to run on
134144
runs-on: ubuntu-18.04
135145

136146
steps:
137-
138-
- name: PDF generation installs
147+
- name: Install Dependencies
139148
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
140149
run: |
141150
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
142151
143-
- name: PDF generation
152+
- name: Cache cFS Build Environment for usersguide
153+
id: cache-bundle
154+
uses: actions/cache@v2
155+
with:
156+
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
157+
key: usersguide-buildnum-${{ github.run_number }}
158+
159+
- name: Generate PDF
144160
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
145161
run: |
146162
set -x
@@ -151,7 +167,7 @@ jobs:
151167
# Could add pandoc and convert to github markdown
152168
# pandoc CFE_Users_Guide.pdf -t gfm
153169
154-
- name: Deploy
170+
- name: Deploy to GitHub
155171
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
156172
uses: JamesIves/github-pages-deploy-action@3.7.1
157173
with:
@@ -164,9 +180,7 @@ jobs:
164180
build-osalguide:
165181
needs: checks-for-duplicates
166182
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
167-
# Name the Job
168183
name: Osal Guide
169-
# Set the type of machine to run on
170184
runs-on: ubuntu-18.04
171185

172186
steps:
@@ -183,7 +197,7 @@ jobs:
183197
cp ./cfe/cmake/Makefile.sample Makefile
184198
cp -r ./cfe/cmake/sample_defs sample_defs
185199
186-
# Setup the build system
200+
# Setup the build system
187201
- name: Make Prep
188202
run: make prep
189203

@@ -204,33 +218,46 @@ jobs:
204218
make_osalguide_stderr.txt
205219
osal-apiguide-warnings.log
206220
207-
- name: Error Check
221+
- name: Check for Errors
208222
run: |
209223
if [[ -s make_osalguide_stderr.txt ]]; then
210224
cat make_osalguide_stderr.txt
211225
exit -1
212226
fi
213227
214-
- name: Warning Check
228+
- name: Check for Warnings
215229
run: |
216230
if [[ -s osal-apiguide-warnings.log ]]; then
217231
cat osal-apiguide-warnings.log
218232
exit -1
219233
fi
220234
221-
pdf-osalguide:
235+
- name: Cache cFS Build Environment for osalguide
236+
id: cache-bundle
237+
uses: actions/cache@v2
238+
with:
239+
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
240+
key: osalguide-buildnum-${{ github.run_number }}
241+
242+
deploy-osalguide:
222243
needs: build-osalguide
223-
# Name the Job
224-
name: PDF Osal Guide
225-
# Set the type of machine to run on
244+
name: Deploy Osal Guide
226245
runs-on: ubuntu-18.04
246+
227247
steps:
228-
- name: PDF generation installs
248+
- name: Install Dependencies
229249
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
230250
run: |
231251
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
232252
233-
- name: PDF generation
253+
- name: Cache cFS Build Environment for osalguide
254+
id: cache-bundle
255+
uses: actions/cache@v2
256+
with:
257+
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
258+
key: osalguide-buildnum-${{ github.run_number }}
259+
260+
- name: Generate PDF
234261
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
235262
run: |
236263
mkdir deploy
@@ -240,12 +267,12 @@ jobs:
240267
# Could add pandoc and convert to github markdown
241268
# pandoc CFE_Users_Guide.pdf -t gfm
242269
243-
- name: Deploy
270+
- name: Deploy to GitHub
244271
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
245272
uses: JamesIves/github-pages-deploy-action@3.7.1
246273
with:
247274
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
248275
BRANCH: gh-pages
249276
FOLDER: deploy
250277
CLEAN: false
251-
SINGLE_COMMIT: true
278+
SINGLE_COMMIT: true

.github/workflows/codeql-build.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CodeQL Analysis
1+
name: "CodeQL Analysis"
22

33
on:
44
workflow_call:
@@ -12,7 +12,7 @@ on:
1212
type: string
1313
default: ''
1414
make:
15-
description: 'Make Code'
15+
description: 'Make Copy'
1616
type: string
1717
default: 'make'
1818
tests:
@@ -60,19 +60,19 @@ jobs:
6060
run: |
6161
git log -1 --pretty=oneline
6262
git submodule
63-
63+
6464
- name: Initialize CodeQL
6565
uses: github/codeql-action/init@v1
6666
with:
6767
languages: c
6868
config-file: nasa/cFS/.github/codeql/codeql-security.yml@main
69-
69+
7070
- name: Copy sample_defs
7171
run: ${{ inputs.sample-defs }}
7272

7373
- name: Make prep
7474
run: ${{ inputs.make-prep }}
75-
75+
7676
- name: Make Install
7777
run: ${{ inputs.make }}
7878

.github/workflows/static-analysis.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Static Analysis
22

3-
# Run on all push and pull requests
43
on:
5-
push:
6-
pull_request:
74
workflow_call:
85
inputs:
96
module:
@@ -72,6 +69,7 @@ jobs:
7269
if: ${{ inputs.module !='bundle' }}
7370
run: |
7471
${{ inputs.cppcheck-code }}
72+
7573
- name: Archive static analysis artifacts
7674
if: ${{ inputs.module !='bundle' }}
7775
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)