Skip to content

Set IMGUI_VERSION_TAG to v1.92.8-docking for C.I. #100

Set IMGUI_VERSION_TAG to v1.92.8-docking for C.I.

Set IMGUI_VERSION_TAG to v1.92.8-docking for C.I. #100

name: 'CodeQL'
env:
LIBRARIES_BRANCH: libraries-OS-COMPILER
NCINE_SOURCE_BRANCH: BRANCH_NAME
IMGUI_VERSION_TAG: 2af6dd9694288e6befe1edb7ce25510911693c22
on:
push:
branches:
- master
- main
workflow_dispatch:
jobs:
Analyze:
strategy:
fail-fast: false
runs-on: 'ubuntu-24.04'
steps:
- name: 'Checkout Code'
uses: actions/checkout@v6
- name: 'Initialize CodeQL'
uses: github/codeql-action/init@v4
with:
languages: 'cpp'
- run: |
# Install nCine Build Dependencies
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libopengl-dev libegl1-mesa-dev libglvnd-dev libxext-dev libxrandr-dev libwayland-dev
# Download nCine-libraries and project data
OS=linux
CC=gcc
BRANCH_NAME=$(git describe --tags --exact-match 2> /dev/null || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD)
LIBRARIES_BRANCH=`echo $LIBRARIES_BRANCH | sed 's/OS/'"$OS"'/'`
LIBRARIES_BRANCH=`echo $LIBRARIES_BRANCH | sed 's/COMPILER/'"$CC"'/'`
cd ..
git clone https://github.com/nCine/nCine-libraries-artifacts.git
cd nCine-libraries-artifacts
git checkout $LIBRARIES_BRANCH
LIBRARIES_FILE=$(ls -t | head -n 1) && tar xpzf $LIBRARIES_FILE
mv nCine-external ..
cd ..
rm -rf nCine-libraries-artifacts
git clone https://github.com/$GITHUB_REPOSITORY-data.git
# Download nCine source and data
BuildType=Debug
NCINE_SOURCE_BRANCH=`echo $NCINE_SOURCE_BRANCH | sed 's/BRANCH_NAME/'"$BRANCH_NAME"'/'`
git clone https://github.com/nCine/nCine-data.git
git clone https://github.com/nCine/nCine.git --branch $NCINE_SOURCE_BRANCH
# CMake Configuration and Make of nCine as a static library
cd nCine
CMAKE_ARGS="-B ../nCine-build-$BuildType -D CMAKE_BUILD_TYPE=$BuildType -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=$IMGUI_VERSION_TAG -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_SCENEGRAPH=OFF -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF"
CMAKE_ARGS="$CMAKE_ARGS -D CMAKE_PREFIX_PATH=$(pwd)/../nCine-external"
cmake $CMAKE_ARGS
cd ..
make -j $(getconf _NPROCESSORS_ONLN) -C nCine-build-Debug
# CMake Configuration and Make
PROJECT_NAME=${GITHUB_REPOSITORY##*/}
cd $PROJECT_NAME
cmake -B ../$PROJECT_NAME-build-$BuildType -D CMAKE_BUILD_TYPE=$BuildType -D nCine_DIR=$(pwd)/../nCine-build-$BuildType -D CMAKE_PREFIX_PATH=$(pwd)/../nCine-external
make -j $(getconf _NPROCESSORS_ONLN) -C ../$PROJECT_NAME-build-$BuildType
- name: 'Perform CodeQL Analysis'
uses: github/codeql-action/analyze@v4