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-latest strategy: matrix: language: [ 'cpp' ] steps: - uses: actions/checkout@v6 with: submodules: true - name: Initialize CodeQL if: ${{ github.event.inputs.runCodeQL }} uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} config-file: ./.github/codeql/codeql-config.yml - name: Install deps run: | sudo apt update sudo apt install -y libfontconfig1-dev libfreetype-dev libxml2-dev libssl-dev libjpeg-dev libpng-dev libtiff-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@v4 with: category: "/language:${{matrix.language}}"