From fab3b2939086118ec39e63c16e8f021bc20e9771 Mon Sep 17 00:00:00 2001 From: pionere Date: Mon, 26 Aug 2024 12:30:09 +0200 Subject: [PATCH] use manual build to improve CodeQL-coverage --- .github/workflows/code-ql.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/code-ql.yml b/.github/workflows/code-ql.yml index 0eab2455c66..037646234e2 100644 --- a/.github/workflows/code-ql.yml +++ b/.github/workflows/code-ql.yml @@ -37,7 +37,8 @@ jobs: matrix: include: - language: c-cpp - build-mode: autobuild + #build-mode: autobuild + build-mode: manual - language: java-kotlin build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. - language: python @@ -75,15 +76,20 @@ jobs: # to build your code. # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - if: matrix.build-mode == 'manual' + - name: Create Build Environment + if: matrix.build-mode == 'manual' + run: > + sudo apt-get update && + sudo apt install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 pkg-config-mingw-w64-i686 libz-mingw-w64-dev gettext dpkg-dev wget git sudo && + sudo rm /usr/i686-w64-mingw32/lib/libz.dll.a && + sudo Packaging/windows/mingw-prep.sh + + - name: Build + if: matrix.build-mode == 'manual' shell: bash run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 + cmake -S. -Bbuild -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE=../CMake/mingwcc.toolchain.cmake + cmake --build build -j $(nproc) --target package - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3