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

Fix #175, CodeQL Action Workflow #165

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: "CodeQL Configuration File"

queries:
- uses: security-and-quality
- uses: security-extended
59 changes: 59 additions & 0 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "CodeQL Analysis"

on:
push:
astrogeco marked this conversation as resolved.
Show resolved Hide resolved
branches:
- main
pull_request:

env:
SIMULATION: native
ENABLE_UNIT_TESTS: true
OMIT_DEPRECATED: true

jobs:

CodeQL-Build:

strategy:
matrix:
buildtype: [debug, release]
astrogeco marked this conversation as resolved.
Show resolved Hide resolved

runs-on: ubuntu-18.04
env:
BUILDTYPE: ${{ matrix.buildtype }}
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true

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

# Setup the build system
- name: Copy sample_defs
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs

# Setup the build system
- name: Make Install
run: make install

- name: List cpu1
run: ls build/exe/cpu1/

- name: Run cFS
run: |
./core-cpu1 > cFS_startup_cpu1.txt &
sleep 30
../host/cmdUtil --endian=LE --pktid=0x1806 --cmdcode=2 --half=0x0002
working-directory: ./build/exe/cpu1/

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