Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Aug 27, 2024
1 parent 10c0439 commit 177ad09
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on: [push, pull_request]
#
jobs:
analyze:
name: Analyze (${{ matrix.language }})
name: Analyze (${{ matrix.name }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
Expand All @@ -26,11 +26,11 @@ jobs:
security-events: write

# required to fetch internal or private CodeQL packs
packages: read
#packages: read

# only required for workflows in private repositories
actions: read
contents: read
#actions: read
#contents: read

strategy:
fail-fast: false
Expand All @@ -39,12 +39,26 @@ jobs:
- name: c-cpp (auto)
language: c-cpp
build-mode: autobuild
- name: c-cpp (manual)
- name: c-cpp (win-x86)
language: c-cpp
build-mode: manual
- language: java-kotlin
version: win-x86
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/mingwcc.toolchain.cmake'
- name: c-cpp (win-x64)
language: c-cpp
build-mode: manual
version: win-x64
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/mingwcc64.toolchain.cmake'
- name: c-cpp (linux-x64)
language: c-cpp
build-mode: manual
version: linux-x64
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON -DCMAKE_INSTALL_PREFIX=/usr'
- name: java
language: java-kotlin
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
- language: python
- name: python
language: python
build-mode: none
#- language: ruby
# build-mode: none
Expand Down Expand Up @@ -80,18 +94,30 @@ jobs:
# ℹ️ 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
- name: Create Build Environment
if: matrix.build-mode == 'manual'
if: matrix.version == 'win-x86'
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: Create Build Environment
if: matrix.version == 'win-x64'
run: >
sudo apt-get update &&
sudo apt-get install -y cmake gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 pkg-config-mingw-w64-x86-64 libz-mingw-w64-dev dpkg-dev wget git sudo &&
sudo rm /usr/x86_64-w64-mingw32/lib/libz.dll.a &&
sudo Packaging/windows/mingw-prep.sh
- name: Create Build Environment
if: matrix.version == 'linux-x64'
run: Packaging/nix/debian-host-prep.sh

- name: Build
if: matrix.build-mode == 'manual'
shell: bash
run: |
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 -S. -Bbuild ${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE="Release" && \
cmake --build build -j $(nproc) --target package
- name: Perform CodeQL Analysis
Expand Down

0 comments on commit 177ad09

Please sign in to comment.