mudlet/.github/workflows/codeql-analysis.yml
dependabot[bot] ff6bd8755a
Infrastructure: Bump lukka/get-cmake from 4.4.0 to 4.4.2 (#9729)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.4.0
to 4.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lukka/get-cmake/releases">lukka/get-cmake's
releases</a>.</em></p>
<blockquote>
<h2>CMake v4.4.2</h2>
<p>The <code>get-cmake</code> action downloads and caches CMake and
Ninja on your workflows. Versions can be specified using <a
href="https://docs.npmjs.com/about-semantic-versioning">semantic
versioning ranges</a> using <a
href="https://github.com/lukka/get-cmake/blob/latest/action.yml#L13"><code>cmakeVersion</code></a>
and <a
href="https://github.com/lukka/get-cmake/blob/latest/action.yml#L16"><code>ninjaVersion</code></a>
inputs.</p>
<p>Changes:</p>
<ul>
<li><code>latest</code> is now using CMake version <code>v4.4.2</code>,
use this one-liner e.g.:
<code>uses: lukka/get-cmake@latest</code></li>
</ul>
<p>Enjoy!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fffaaafeea"><code>fffaaaf</code></a>
New CMake version(s): cmake-v4.4.2</li>
<li><a
href="4a7d025fc6"><code>4a7d025</code></a>
New CMake version(s): cmake-v4.4.1</li>
<li><a
href="06fec8f1da"><code>06fec8f</code></a>
Bump actions/checkout from 5 to 7</li>
<li>See full diff in <a
href="https://github.com/lukka/get-cmake/compare/v4.4.0...v4.4.2">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vadim Peretokin <vperetokin@hey.com>
2026-08-08 13:34:03 +02:00

176 lines
6 KiB
YAML

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [development, main]
schedule:
- cron: '0 7 * * 3'
workflow_dispatch:
jobs:
analyze:
name: ${{matrix.buildname}}
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: cpp
buildname: 'CodeQL'
qt: '6.9.0'
triplet: x64-linux
compiler: gcc_64
gcc_compiler_version: 10
os: ubuntu-latest
env:
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.7z
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
submodules: recursive
- name: (Windows) Install Qt
uses: jurplel/install-qt-action@v4
if: runner.os == 'Windows'
with:
version: ${{matrix.qt}}
dir: ${{runner.workspace}}
arch: win64_mingw73
cache: true
modules: qt5compat qtmultimedia
- name: (Linux/macOS) Install Qt
uses: jurplel/install-qt-action@v4
if: runner.os == 'Linux' || runner.os == 'macOS'
with:
version: ${{matrix.qt}}
dir: ${{runner.workspace}}
cache: true
modules: qt5compat qtmultimedia
- name: Restore Boost cache
uses: actions/cache@v6
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
key: boost
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
if [ "$OS" == "Windows_NT" ]; then
# fix up paths to be forward slashes consistently
BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g')
fi
mkdir -p $BOOST_ROOT
curl --progress-bar --location --output $BOOST_ROOT/download.7z $BOOST_URL
7z -o$BOOST_ROOT x $BOOST_ROOT/download.7z -y -bd
cd $BOOST_ROOT && cp -r boost-*/* .
rm -rf boost-*/* download.7z
shell: bash
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.37.6
with:
config-file: ./.github/codeql/codeql-config.yml
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: security-extended, security-and-quality
- name: Use CMake 3.30.3
uses: lukka/get-cmake@v4.4.2
- name: (Linux) Install Lua via GitHub Actions
uses: leafo/gh-actions-lua@v13
if: runner.os == 'Linux'
with:
luaVersion: "5.1.5"
buildCache: false
- name: (Linux) Install Luarocks via GitHub Actions
uses: leafo/gh-actions-luarocks@v6
if: runner.os == 'Linux'
- name: (Linux) Install dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
# Install all required dependencies
# liblua5.1-0-dev is needed for CMake to find Lua headers/library
sudo apt-get install libsecret-1-dev ccache pkg-config pcre2-utils expect libzip-dev libglu1-mesa-dev libpulse-dev g++-${{matrix.gcc_compiler_version}} \
libassimp-dev libpcre2-dev libpugixml-dev libsqlite3-dev libyajl-dev libhunspell-dev liblua5.1-0-dev libonig-dev libboost-dev qtkeychain-qt6-dev -y
# switch to GCC that supports C++20 while retaining support for older OS's
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{matrix.gcc_compiler_version}} ${{matrix.gcc_compiler_version}}
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{matrix.gcc_compiler_version}} ${{matrix.gcc_compiler_version}}
sudo update-alternatives --set gcc /usr/bin/gcc-${{matrix.gcc_compiler_version}}
sudo update-alternatives --set g++ /usr/bin/g++-${{matrix.gcc_compiler_version}}
echo "CCACHE_DIR=${{runner.workspace}}/ccache" >> $GITHUB_ENV
# Install lua-yajl early to generate translation statistics
luarocks install --local lua-yajl
# Allow stats generation script to see location of lua-yajl
eval "$(luarocks path --local --lua-version "5.1")"
echo "LUA_PATH=$LUA_PATH" >> $GITHUB_ENV
echo "LUA_CPATH=$LUA_CPATH" >> $GITHUB_ENV
- name: (Linux/macOS) Set build info
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
${{github.workspace}}/CI/validate_deployment.sh
${{github.workspace}}/CI/set-build-info.sh
- name: Build Mudlet
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{github.workspace}}/CMakeLists.txt'
buildDirectory: '${{runner.workspace}}/b/ninja'
cmakeAppendedArgs: >-
-G Ninja
-DCMAKE_PREFIX_PATH=${{ env.QT_PREFIX != '' && env.QT_PREFIX || env.MINGW_BASE_DIR }}
env:
NINJA_STATUS: '[%f/%t %o/sec] '
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.37.6
with:
category: "/language:${{ matrix.language }}"
upload: false
output: sarif-results
- name: Filter out 3rdparty dependencies
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-3rdparty/**
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v4.37.6
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif