Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerin-of-the-Toast committed Aug 1, 2022
2 parents ce66458 + 6b19368 commit a763e8c
Show file tree
Hide file tree
Showing 1,320 changed files with 689,942 additions and 393,153 deletions.
16 changes: 2 additions & 14 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -46,39 +46,27 @@ modernize-*,\
performance-*,\
readability-*,\
-readability-braces-around-statements,\
-bugprone-infinite-loop,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
-bugprone-redundant-branch-condition,\
-clang-analyzer-core.CallAndMessage,\
-clang-analyzer-deadcode.DeadStores,\
-misc-misplaced-const,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-modernize-avoid-bind,\
-modernize-avoid-c-arrays,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-default-member-init,\
-modernize-use-override,\
-performance-no-automatic-move,\
-performance-trivially-destructible,\
-performance-unnecessary-value-param,\
-readability-convert-member-functions-to-static,\
-readability-else-after-return,\
-readability-function-cognitive-complexity,\
-readability-implicit-bool-conversion,\
-readability-magic-numbers,\
-readability-make-member-function-const,\
-readability-named-parameter,\
-readability-qualified-auto,\
-readability-redundant-access-specifiers,\
-readability-use-anyofallof,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test|tools).*'
FormatStyle: none
CheckOptions:
- key: cata-large-inline-function.MaxStatements
value: 5
- key: cata-text-style.EscapeUnicode
value: 0
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
Expand Down
6 changes: 6 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
- "**/CMakeLists.txt"
- "**/*.cmake"

"Code: Infrastructure / Style / Static Analysis":
- .astylerc
- .clang-tidy
- .editorconfig
- .lgtm.yml

"Crafting / Construction / Recipes":
- "**/recipes/**/*"
- data/json/construction.json
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/astyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ jobs:

- name: Display Corrections
if: failure()
run: git diff
run: git diff --color

- name: 'suggester / astyle'
uses: reviewdog/action-suggester@v1
if: failure()
with:
tool_name: 'astyle formatter'
8 changes: 7 additions & 1 deletion .github/workflows/json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ jobs:
run: make style-all-json-parallel RELEASE=1
- name: Display Corrections
if: failure()
run: git diff
run: git diff --color

- name: 'suggester / JSON'
uses: reviewdog/action-suggester@v1
if: failure()
with:
tool_name: 'JSON formatter'
6 changes: 5 additions & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ concurrency:
# - CMAKE=1
# - LOCALIZE=0
# - LTO=1
# - LIBBACKTRACE=1 (on Linux and Windows)
# - Tests with important mods enabled (Magiclysm)
# - A clang-tidy run
# - SANITIZE=address,undefined
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
cmake: 0
localize: 1
test-stage: 1
native: linux64
native: linux64
archive-success: basic-build
dont_skip_data_only_changes: 1
title: Basic Build and Test (Clang 6, Ubuntu, Curses)
Expand All @@ -103,6 +104,7 @@ jobs:
localize: 1
gold: 1
lto: 1
libbacktrace: 1
native: linux64
title: GCC 9, Curses, LTO
# ~850MB in a clean build
Expand Down Expand Up @@ -165,6 +167,7 @@ jobs:
tiles: 1
sound: 1
localize: 1
libbacktrace: 1
title: GCC 11, Ubuntu cross-compile to MinGW-Win64, Tiles, Sound
ldflags: -static-libgcc -static-libstdc++
mxe_target: x86_64-w64-mingw32.static.gcc11
Expand Down Expand Up @@ -209,6 +212,7 @@ jobs:
NATIVE: ${{ matrix.native }}
GOLD: ${{ matrix.gold }}
LTO: ${{ matrix.lto }}
LIBBACKTRACE: ${{ matrix.libbacktrace }}
RELEASE: ${{ matrix.release }}
ARCHIVE_SUCCESS: ${{ matrix.archive-success }}
CCACHE_LIMIT: ${{ matrix.ccache_limit }}
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/update-tilesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ jobs:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
runs-on: ubuntu-latest
steps:
- name: "Generate PR body/tileset update changelog"
id: pr-changelog
run: |
printf '#### Summary\nNone\n\nAutomatic tilesets updates in:\n\nhttps://github.com/I-am-Erk/CDDA-Tilesets\n' >> pr-body
gh release view -R I-am-Erk/CDDA-Tilesets --json body --jq .body >> pr-body
printf 'https://github.com/pixel-32/CDDA-tileset\n' >> pr-body
gh release view -R pixel-32/CDDA-tileset --json body --jq .body >> pr-body
sed -i "s/## What's Changed/**What's Changed**/g" pr-body
sed -i '/Full Changelog/d' pr-body
CHANGELOG=$(cat pr-body)
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=pr-body::$CHANGELOG"
rm -f pr-body
- uses: actions/checkout@v3
- name: "Get current date"
uses: 1466587594/get-current-time@v2
Expand All @@ -37,18 +55,12 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: |
Routine Tileset updates on ${{ steps.current-date.outputs.formattedTime }}
Routine tileset updates on ${{ steps.current-date.outputs.formattedTime }}
committer: casswedson <[email protected]>
author: casswedson <[email protected]>
token: ${{ secrets.TX_PR_CREATOR }}
branch: tileset-updates
delete-branch: true
base: master
title: Routine Tileset updates on ${{ steps.current-date.outputs.formattedTime }}
body: |
#### Summary
None
Automatic tilesets updates from latest release in
<https://github.com/I-am-Erk/CDDA-Tilesets>
<https://github.com/pixel-32/CDDA-tileset>
title: Routine tileset updates on ${{ steps.current-date.outputs.formattedTime }}
body: ${{ steps.pr-changelog.outputs.pr-body }}
14 changes: 14 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,17 @@ source_lang = en
type = PO
minimum_perc = 0

[o:cataclysm-dda-translators:p:cataclysm-dda:r:credits-master]
file_filter = data/credits/<lang>.credits
source_file = data/credits/en.credits
source_lang = en
type = TXT
minimum_perc = 20

[o:cataclysm-dda-translators:p:cataclysm-dda:r:motd-master]
file_filter = data/motd/<lang>.motd
source_file = data/motd/en.motd
source_lang = en
type = TXT
minimum_perc = 20

12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# make LOCALIZE=0
# Disable backtrace support, not available on all platforms
# make BACKTRACE=0
# Use libbacktrace. Only has effect if BACKTRACE=1. (currently only for MinGW builds)
# Use libbacktrace. Only has effect if BACKTRACE=1. (currently only for MinGW and Linux builds)
# make LIBBACKTRACE=1
# Compile localization files for specified languages
# make localization LANGUAGES="<lang_id_1>[ lang_id_2][ ...]"
Expand Down Expand Up @@ -398,7 +398,11 @@ ifeq ($(RELEASE), 1)
OTHERS += $(RELEASE_FLAGS)
DEBUG =
ifndef DEBUG_SYMBOLS
DEBUGSYMS =
ifeq ($(LIBBACKTRACE), 1)
DEBUGSYMS = -g1
else
DEBUGSYMS =
endif
endif
DEFINES += -DRELEASE
# Check for astyle or JSON regressions on release builds.
Expand Down Expand Up @@ -780,16 +784,14 @@ ifeq ($(TARGETSYSTEM),WINDOWS)
LDFLAGS += -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion
ifeq ($(BACKTRACE),1)
LDFLAGS += -ldbghelp
ifeq ($(LIBBACKTRACE),1)
LDFLAGS += -lbacktrace
endif
endif
endif

ifeq ($(BACKTRACE),1)
DEFINES += -DBACKTRACE
ifeq ($(LIBBACKTRACE),1)
DEFINES += -DLIBBACKTRACE
LDFLAGS += -lbacktrace
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Cataclysm: Dark Days Ahead is a turn-based survival game set in a post-apocalypt
<img src="https://repology.org/badge/vertical-allrepos/cataclysm-dda.svg" alt="Packaging Status" align="right">
</a>

[![Build Status](https://travis-ci.org/CleverRaven/Cataclysm-DDA.svg?branch=master)](https://travis-ci.org/CleverRaven/Cataclysm-DDA)
[![General build matrix](https://github.com/CleverRaven/Cataclysm-DDA/actions/workflows/matrix.yml/badge.svg)](https://github.com/CleverRaven/Cataclysm-DDA/actions/workflows/matrix.yml)
[![Coverage Status](https://coveralls.io/repos/github/CleverRaven/Cataclysm-DDA/badge.svg?branch=master)](https://coveralls.io/github/CleverRaven/Cataclysm-DDA?branch=master)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/CleverRaven/Cataclysm-DDA.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/CleverRaven/Cataclysm-DDA/context:cpp)
[![Open Source Helpers](https://www.codetriage.com/cleverraven/cataclysm-dda/badges/users.svg)](https://www.codetriage.com/cleverraven/cataclysm-dda)
Expand Down
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ version_header_path=./../src/version.h

# This property controls which compileSdkVersion should be used
# You can override this from the command line by passing "-Poverride_compileSdkVersion=#"
override_compileSdkVersion=29
override_compileSdkVersion=30

# This property controls which minSdkVersion should be used
# You can override this from the command line by passing "-Poverride_minSdkVersion=#"
override_minSdkVersion=14

# This property controls which targetSdkVersion should be used
# You can override this from the command line by passing "-Poverride_targetSdkVersion=#"
override_targetSdkVersion=29
override_targetSdkVersion=30

# This property controls which ndkBuildAppPlatform should be used
# You can override this from the command line by passing "-Poverride_ndkBuildAppPlatform=#"
Expand Down
3 changes: 2 additions & 1 deletion build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ then
-DCMAKE_BUILD_TYPE="$build_type" \
-DTILES=${TILES:-0} \
-DSOUND=${SOUND:-0} \
-DLIBBACKTRACE=${LIBBACKTRACE:-0} \
"${cmake_extra_opts[@]}" \
..
if [ -n "$CATA_CLANG_TIDY" ]
Expand Down Expand Up @@ -213,7 +214,7 @@ then
# fills the log with nonsense.
TERM=dumb ./gradlew assembleExperimentalRelease -Pj=$num_jobs -Plocalize=false -Pabi_arm_32=false -Pabi_arm_64=true -Pdeps=/home/travis/build/CleverRaven/Cataclysm-DDA/android/app/deps.zip
else
make -j "$num_jobs" RELEASE=1 CCACHE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0
make -j "$num_jobs" RELEASE=1 CCACHE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0 LIBBACKTRACE="$LIBBACKTRACE"

export ASAN_OPTIONS=detect_odr_violation=1
export UBSAN_OPTIONS=print_stacktrace=1
Expand Down
11 changes: 9 additions & 2 deletions build-scripts/requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]]; then
fi

set -x
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
$travis_retry sudo apt-get --yes install parallel
if [[ "$LIBBACKTRACE" == "1" ]]; then
git clone https://github.com/ianlancetaylor/libbacktrace.git
(
cd libbacktrace
git checkout 4d2dd0b172f2c9192f83ba93425f868f2a13c553
./configure
make -j$(nproc)
sudo make install
)
fi

if [ -n "${CODE_COVERAGE}" ]; then
Expand Down
5 changes: 5 additions & 0 deletions data/core/tips.json
Original file line number Diff line number Diff line change
Expand Up @@ -678,5 +678,10 @@
"type": "snippet",
"category": "tip",
"text": [ "The higher up you are, the farther you can see on the overmap." ]
},
{
"type": "snippet",
"category": "tip",
"text": [ "Nobody wants to buy filthy underwear. Wash your clothes to get a better price for them." ]
}
]
Loading

0 comments on commit a763e8c

Please sign in to comment.