Skip to content

Commit

Permalink
Merge branch 'main' into feature/rotten-blood
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Aug 19, 2024
2 parents b410e60 + bc852f2 commit e6d9b88
Show file tree
Hide file tree
Showing 939 changed files with 868,337 additions and 4,924 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/analysis-qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: Analysis - Qodana

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

# - name: Install Linux Dependencies
# run: >
# sudo apt-get update && sudo apt-get install ccache
# linux-headers-$(uname -r)
# - name: CCache
# uses: hendrikmuhs/ccache-action@main
# with:
# max-size: "1G"
# key: ccache-qodana

# - name: Restore artifacts and install vcpkg
# id: vcpkg-step
# run: |
# vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ')
# echo "vcpkg commit ID: $vcpkgCommitId"
# echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV
# - name: Get vcpkg commit id from vcpkg.json
# uses: lukka/run-vcpkg@main
# with:
# vcpkgGitURL: "https://github.com/microsoft/vcpkg.git"
# vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}

# - name: Get latest CMake and ninja
# uses: lukka/get-cmake@main

# - name: Run CMake
# uses: lukka/run-cmake@main
# with:
# configurePreset: linux-debug

# - name: Qodana Scan
# run: |
# docker run \
# -v $(pwd):/data/project/ \
# -v $(pwd):$(pwd) \
# -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \
# jetbrains/qodana-clang:2024.1-eap \
# --compile-commands ./build/linux-debug/compile_commands.json

- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,qodana-base.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ endif()

set(VCPKG_FEATURE_FLAGS "versions")
set(VCPKG_BUILD_TYPE "release")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)



# *****************************************************************************
# Project canary
Expand Down
16 changes: 14 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,21 @@
"description": "Build Debug Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"DEBUG_LOG": "ON",
"SPEED_UP_BUILD_UNITY": "OFF",
"ASAN_ENABLED": "ON"
"SPEED_UP_BUILD_UNITY": "OFF"
}
},
{
"name": "linux-debug-asan",
"inherits": "linux-release",
"displayName": "Linux - Debug Build",
"description": "Build Debug Mode With ASAN Enable",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"DEBUG_LOG": "ON",
"ASAN_ENABLED": "ON",
"SPEED_UP_BUILD_UNITY": "OFF"
}
},
{
Expand Down
44 changes: 36 additions & 8 deletions cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ option(BUILD_STATIC_LIBRARY "Build using static libraries" OFF)
option(SPEED_UP_BUILD_UNITY "Compile using build unity for speed up build" ON)
option(USE_PRECOMPILED_HEADER "Compile using precompiled header" ON)

# === TOGGLE_BIN_FOLDER ===
if(TOGGLE_BIN_FOLDER)
log_option_enabled("TOGGLE_BIN_FOLDER")
else()
log_option_disabled("TOGGLE_BIN_FOLDER")
endif(TOGGLE_BIN_FOLDER)

# === TOGGLE_BIN_FOLDER ===
if(OPTIONS_ENABLE_OPENMP)
log_option_enabled("OPTIONS_ENABLE_OPENMP")
else()
log_option_disabled("OPTIONS_ENABLE_OPENMP")
endif(OPTIONS_ENABLE_OPENMP)

# === DEBUG LOG ===
# cmake -DDEBUG_LOG=ON ..
if(DEBUG_LOG)
add_definitions(-DDEBUG_LOG=ON)
log_option_enabled("DEBUG LOG")
else()
log_option_disabled("DEBUG LOG")
endif(DEBUG_LOG)

# === ASAN ===
if(ASAN_ENABLED)
log_option_enabled("asan")
Expand All @@ -87,7 +110,7 @@ else()
log_option_disabled("asan")
endif()

# Build static libs
# === BUILD_STATIC_LIBRARY ===
if(BUILD_STATIC_LIBRARY)
log_option_enabled("STATIC_LIBRARY")

Expand All @@ -102,14 +125,19 @@ else()
log_option_disabled("STATIC_LIBRARY")
endif()

# === DEBUG LOG ===
# cmake -DDEBUG_LOG=ON ..
if(DEBUG_LOG)
add_definitions(-DDEBUG_LOG=ON)
log_option_enabled("DEBUG LOG")
# === SPEED_UP_BUILD_UNITY ===
if(SPEED_UP_BUILD_UNITY)
log_option_enabled("SPEED_UP_BUILD_UNITY")
else()
log_option_disabled("DEBUG LOG")
endif(DEBUG_LOG)
log_option_disabled("SPEED_UP_BUILD_UNITY")
endif(SPEED_UP_BUILD_UNITY)

# === USE_PRECOMPILED_HEADER ===
if(USE_PRECOMPILED_HEADER)
log_option_enabled("USE_PRECOMPILED_HEADER")
else()
log_option_disabled("USE_PRECOMPILED_HEADER")
endif(USE_PRECOMPILED_HEADER)

# *****************************************************************************
# Compiler Options
Expand Down
1 change: 1 addition & 0 deletions data-canary/scripts/actions/other/fluids.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function fluid.onUse(player, item, fromPosition, target, toPosition, isHotkey)
item:transform(item:getId(), 0)
end
end

return true
end

Expand Down
Loading

0 comments on commit e6d9b88

Please sign in to comment.