Skip to content

ci

ci #24

Workflow file for this run

name: ci
on:
push:
branches: [master]
paths:
- '.github/workflows/ci.yaml'
pull_request:
branches: [master]
types:
- opened
- synchronize
- ready_for_review
paths-ignore:
- '.github/**'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.org'
- 'COPYING'
- 'README.org'
- 'SECURITY.md'
schedule:
- cron: '0 9 * * 5'
jobs:
ci:
permissions:
security-events: write
strategy:
matrix:
build-type: [Debug, Release]
c-compiler: [gcc, clang]
cxx-compiler: [g++, clang++]
exclude:
- c-compiler: gcc
cxx-compiler: clang++
- c-compiler: clang
cxx-compiler: g++
fail-fast: false
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- name: checkout-repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: install-dependencies
run: |
sudo apt-get install -y \
libxcursor-dev \
libxrandr-dev \
libxinerama-dev \
libxi-dev
- name: setup-codeql
uses: github/codeql-action/init@v3
with:
languages: c-cpp
- name: configure
run: |
cmake \
-B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
- name: build
run: cmake --build build
- name: run-codeql
uses: github/codeql-action/analyze@v3
with:
output: codeql-results.d
upload: failure-only
- name: filter-codeql
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-vendor/*
input: codeql-results.d/cpp.sarif
output: codeql-results.d/cpp.sarif
- name: upload-codeql
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: codeql-results.d/cpp.sarif