Skip to content

build-linux

build-linux #376

Workflow file for this run

name: build-linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
ctestArgs:
description: 'CTest arguments'
runCodeQL:
description: 'Run CodeQL analysis'
type: boolean
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
language: [ 'cpp' ]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Initialize CodeQL
if: ${{ github.event.inputs.runCodeQL }}
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
- name: Install deps
run: sudo apt-get install -y libfontconfig1-dev libfreetype-dev libxml2-dev libssl-dev libjpeg-dev libpng-dev libtiff-dev libidn11-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest ${{ github.event.inputs.ctestArgs }}
- name: Perform CodeQL Analysis
if: ${{ github.event.inputs.runCodeQL }}
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"