Skip to content

Commit

Permalink
Merge pull request #52 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
tblCRCTool Integration candidate: 2021-06-22
  • Loading branch information
astrogeco authored Jun 24, 2021
2 parents 9761ab5 + 93c0fa6 commit 86c54bb
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 8 deletions.
63 changes: 60 additions & 3 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL Analysis"

on:
push:
pull_request:
branches:
- main
pull_request:

env:
SIMULATION: native
Expand All @@ -13,8 +13,23 @@ env:
BUILDTYPE: release

jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
check-for-duplicates:
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:
CodeQL-Security-Build:
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15

Expand All @@ -38,7 +53,7 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: c
queries: +security-extended, security-and-quality
config-file: nasa/cFS/.github/codeql/codeql-security.yml@main

# Setup the build system
- name: Set up for build
Expand All @@ -53,3 +68,45 @@ jobs:

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

CodeQL-Coding-Standard-Build:
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
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: tools/tblCRCTool

- name: Check versions
run: git submodule

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: c
config-file: nasa/cFS/.github/codeql/codeql-coding-standard.yml@main

# 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 tools/tblCRCTool/

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ This lab application is a ground utility to generate binary table CRCs for cFS.

## Version Notes

### Development Build: 1.2.0-rc1+dev33

- Add printf conversion casts to fix Raspberry-Pi4 compilation error
- Cast ssize_t to long and uint32 to unsigned long for printf.
- This matches the %d and %lX conversions, respectively.
- Implement Coding Standard in CodeQL
- See <https://github.com/nasa/tblCRCTool/pull/52> and <https://github.com/nasa/cFS/pull/270>

### Development Build: 1.2.0-rc1+dev25

- Fix #43, Add Testing Tools to the Security Policy
- Fix #36 #38 #40 #41, Check lseek return and exit/error processing updates
- Add Testing Tools to the Security Policy
- Check lseek return and exit/error processing updates
- See <https://github.com/nasa/tblCRCTool/pull/89>

### Development Build: 1.2.0-rc1+dev19
Expand Down
4 changes: 2 additions & 2 deletions cfe_ts_crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ int main(int argc, char **argv)

/* print the size/CRC results */
printf("\nTable File Name: %s\nTable Size: %ld Bytes\nExpected TS Validation CRC: "
"0x%08X\n\n",
argv[1], fileSize, fileCRC);
"0x%08lX\n\n",
argv[1], (long)fileSize, (unsigned long)fileCRC);

/* Close file and check*/
if (close(fd) != 0)
Expand Down
2 changes: 1 addition & 1 deletion cfe_ts_crc_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_TS_CRC_BUILD_NUMBER 25 /*!< @brief Number of commits since baseline */
#define CFE_TS_CRC_BUILD_NUMBER 33 /*!< @brief Number of commits since baseline */
#define CFE_TS_CRC_BUILD_BASELINE \
"v1.2.0+dev" /*!< @brief Development Build: git tag that is the base for the current */

Expand Down

0 comments on commit 86c54bb

Please sign in to comment.