Move codeql to a separate job #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- 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 |