Skip to content

Move codeql to a separate job #12

Move codeql to a separate job

Move codeql to a separate job #12

name: Build and test Package
on:
push:
schedule:
- cron: '30 5 * * *'
workflow_dispatch:
inputs:
ref:
description: "Commit hash"
default: ""
jobs:
codeql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{inputs.ref}}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: c-cpp
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: c-cpp
build:
needs: [codeql]
runs-on: ubuntu-latest
container: amazonlinux:2
strategy:
matrix:
build_type: [debug, relwithdebinfo]
steps:
- name: Set up Dev Environment
run: |
yum groupinstall -y "Development Tools"
yum install -y cmake3 valgrind git
- uses: actions/checkout@v3
with:
ref: ${{inputs.ref}}
- name: Build and Test
run: |
cmake3 -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
cd build
make package
make test