Skip to content

Move codeql to a separate job #10

Move codeql to a separate job

Move codeql to a separate job #10

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

Check failure on line 17 in .github/workflows/build-and-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 17
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