Skip to content

CodeQL + package Ubuntu 22.04 Qt6 MuPDF #4

CodeQL + package Ubuntu 22.04 Qt6 MuPDF

CodeQL + package Ubuntu 22.04 Qt6 MuPDF #4

name: "CodeQL + package Ubuntu 22.04 Qt6 MuPDF"
on:
# First try this out and run it only manually.
workflow_dispatch
# This is the default config:
#push:
# branches: [ main ]
#pull_request:
# # The branches below must be a subset of the branches above
# branches: [ main ]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Install Dependencies
run: >
sudo apt-get update -y;
sudo apt-get install -y --no-install-recommends
cmake
zlib1g-dev
libmupdf-dev
libmujs-dev
libgumbo-dev
libfreetype-dev
libharfbuzz-dev
libjpeg-dev
libopenjp2-7-dev
libjbig2dec0-dev
libqt6svg6-dev
qt6-multimedia-dev
libqt6opengl6-dev
libgl1-mesa-dev
qt6-tools-dev
qt6-tools-dev-tools
qt6-l10n-tools
- name: Configure
run: >
cmake
-B build_dir
-DUBUNTU_VERSION=22.04
-DUSE_MUPDF=ON
-DUSE_POPPLER=OFF
-DUSE_QTPDF=OFF
-DUSE_EXTERNAL_RENDERER=OFF
-DLINK_MUJS=ON
-DLINK_GUMBO=ON
-DUSE_TRANSLATIONS=ON
-DQT_VERSION_MAJOR=6
-DQT_VERSION_MINOR=2
-DGIT_VERSION=OFF
-DCMAKE_BUILD_TYPE='Release'
-DCPACK_GENERATOR='DEB;'
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
-DINSTALL_LICENSE=OFF
- name: Build
run: cmake --build build_dir
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Archive performance analysis report
uses: actions/upload-artifact@v4
with:
name: codeql-report.sarif
path: /home/runner/work/BeamerPresenter/results/cpp.sarif
- name: Package
run: cpack --config build_dir/CPackConfig.cmake
- name: Archive debian package
uses: actions/upload-artifact@v4
with:
name: beamerpresenter-mupdf-qt6-x86_64.deb
path: /home/runner/work/BeamerPresenter/BeamerPresenter/beamerpresenter-mupdf-qt6-x86_64.deb