Skip to content

Commit

Permalink
Merge branch 'master' into eggs_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SuddenEyePuncture authored Jul 4, 2021
2 parents 2559b22 + 6616372 commit 4376c55
Show file tree
Hide file tree
Showing 1,128 changed files with 62,235 additions and 30,376 deletions.
69 changes: 53 additions & 16 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
# this codebase and we do not intend to fix. The disabled checks appearing
# thereafter in a separate alphabetical list have yet to be triaged. We may
# fix their errors or recategorise them as checks we don't care about.
#
# Comments on the checks we have decided are not worthwhile:
#
# * cert-dcl21-cpp (postfix operator++ and operator-- should return const objects)
# This is an unconventional code style, and conflicts with
# readability-const-return-type.
#
# * cert-env33-c (calls to system, popen)
# Unlikely to catch bugs, and using system is convenient for portability.
#
# * cert-err58-cpp (exceptions from static variable declarations)
# We have lots of memory allocations in static variable declarations, and
# that's fine.
#
# * modernize-use-auto
# We prefer an almost-always-avoid-auto style.
#
# * modernize-use-trailing-return-type
# An arbitrary style convention we haven't adopted.
#
# * readability-braces-around-statements
# Covered by astyle and buggy in clang-tidy 8. Can enable once we have a newer
# clang-tidy.

Checks: "\
bugprone-*,\
cata-*,\
Expand All @@ -21,34 +45,47 @@ modernize-*,\
-modernize-use-trailing-return-type,\
performance-*,\
readability-*,\
-readability-braces-around-statements,\
-bugprone-branch-clone,\
-bugprone-infinite-loop,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
-bugprone-unused-return-value,\
-cert-err34-c,\
-cert-flp30-c,\
-cert-msc30-c,\
-cert-msc32-c,\
-cert-msc50-cpp,\
-cert-msc51-cpp,\
-bugprone-redundant-branch-condition,\
-bugprone-reserved-identifier,\
-bugprone-signed-char-misuse,\
-bugprone-sizeof-expression,\
-bugprone-unhandled-self-assignment,\
-cert-dcl37-c,\
-cert-dcl51-cpp,\
-cert-oop54-cpp,\
-cert-str34-c,\
-clang-analyzer-core.CallAndMessage,\
-clang-analyzer-deadcode.DeadStores,\
-misc-misplaced-const,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-misc-redundant-expression,\
-modernize-avoid-bind,\
-modernize-avoid-c-arrays,\
-modernize-loop-convert,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-default-member-init,\
-modernize-use-emplace,\
-performance-inefficient-vector-operation,\
-performance-noexcept-move-constructor,\
-performance-implicit-conversion-in-loop,\
-performance-inefficient-string-concatenation,\
-performance-type-promotion-in-math-fn,\
-modernize-use-override,\
-performance-no-automatic-move,\
-performance-trivially-destructible,\
-performance-unnecessary-value-param,\
-readability-braces-around-statements,\
-readability-avoid-const-params-in-decls,\
-readability-convert-member-functions-to-static,\
-readability-else-after-return,\
-readability-function-size,\
-readability-function-cognitive-complexity,\
-readability-implicit-bool-conversion,\
-readability-isolate-declaration,\
-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).*'
Expand Down
20 changes: 18 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@

**Opening a new issue?** Please read [ISSUES.md](../ISSUES.md) first.

Contributing to Cataclysm: Dark Days Ahead is easy — simply fork the repository here on GitHub, make your changes, and then send us a pull request.
**Want an introductory guide for creating game content?** You might want to
read the [Guide to adding new content to CDDA for first time
contributors](https://github.com/CleverRaven/Cataclysm-DDA/wiki/Guide-to-adding-new-content-to-CDDA-for-first-time-contributors)
on the CDDA wiki.

Cataclysm:Dark Days Ahead is released under the Creative Commons Attribution ShareAlike 3.0 license. The code and content of the game is free to use, modify, and redistribute for any purpose whatsoever. See http://creativecommons.org/licenses/by-sa/3.0/ for details.
This means any contribution you make to the project will also be covered by the same license, and this license is irrevocable.

## Guidelines
## Using a good text editor

Most of the Cataclysm: Dark Days Ahead game data is defined in JSON files.
These files are intended to be easy for you to edit, but there are some
pitfalls. Using Windows Notepad can get you into trouble, because it likes to
insert a special character called a BOM at the start of the file, which CDDA
does not want.

If you're going to be editing JSON files consider getting a more fully-featured
editor such as [Notepad++](https://notepad-plus-plus.org/).

## Contributing to GitHub

Contributing to Cataclysm: Dark Days Ahead is easy — simply fork the repository here on GitHub, make your changes, and then send us a pull request.

There are a couple of guidelines we suggest sticking to:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/CBA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
Expand All @@ -16,6 +17,7 @@ on:
pull_request:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Clang-tidy (clang-8, tiles)
name: Clang-tidy (clang-12, tiles)

on:
push:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
Expand All @@ -15,6 +16,7 @@ on:
pull_request:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
Expand All @@ -26,11 +28,11 @@ on:

jobs:
build:
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
env:
CMAKE: 1
CLANG: clang++-8
COMPILER: clang++-8
CLANG: clang++-12
COMPILER: clang++-12
CATA_CLANG_TIDY: plugin
TILES: 1
SOUND: 1
Expand All @@ -41,9 +43,10 @@ jobs:
fetch-depth: 1
- name: install dependencies
run: |
#sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main"
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main"
sudo apt-get update
sudo apt-get install libncursesw5-dev clang-8 libclang-8-dev llvm-8-dev llvm-8-tools \
sudo apt-get install libncursesw5-dev clang-12 libclang-12-dev llvm-12-dev llvm-12-tools \
libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev ccache \
gettext
- name: prepare
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cmake-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
push:
branches:
- master
- 0.F-dev
paths:
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
pull_request:
branches:
- master
- 0.F-dev
paths:
- '**/CMakeLists.txt'
- '**.cmake'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
push:
branches:
- master
- 0.F-dev
paths:
- '**.py'
pull_request:
branches:
- master
- 0.F-dev
paths:
- '**.py'

Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- 0.F-dev
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand All @@ -18,6 +19,7 @@ on:
pull_request:
branches:
- master
- 0.F-dev
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down Expand Up @@ -71,16 +73,27 @@ jobs:
tiles: 1
native: osx
title: Clang 12, macOS 10.15, Tiles
- compiler: g++
os: ubuntu-latest
cmake: 0
tiles: 1
title: GCC, Ubuntu cross-compile to MinGW-Win64, Tiles
ldflags: -static-libgcc -static-libstdc++
mxe_target: i686-w64-mingw32.static
wine: wine
name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
env:
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
MXE_TARGET: ${{ matrix.mxe_target }}
WINE: ${{ matrix.wine }}
OS: ${{ matrix.os }}
TILES: ${{ matrix.tiles }}
SOUND: ${{ matrix.tiles }}
SANITIZE: ${{ matrix.sanitize }}
TEST_STAGE: ${{ matrix.test-stage }}
LDFLAGS: ${{ matrix.ldflags }}
EXTRA_TEST_OPTS: --error-format=github-action
NATIVE: ${{ matrix.native }}
GOLD: ${{ matrix.gold }}
Expand Down Expand Up @@ -132,8 +145,9 @@ jobs:
- name: build and test
run: bash ./build-scripts/build.sh
- name: upload artifacts if failed
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: failure()
with:
name: cata_test
path: tests/cata_test
if-no-files-found: ignore
1 change: 1 addition & 0 deletions .github/workflows/pr-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- master
- 0.F-dev
types: [opened, edited, synchronize]
jobs:
validate:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
mv cataclysmdda-0.E.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz
mv cataclysmdda-0.F.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz
- name: Build CDDA (windows)
if: matrix.mxe != 'none'
env:
Expand All @@ -175,7 +175,7 @@ jobs:
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
mv cataclysmdda-0.E.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
- name: Build CDDA (osx)
if: runner.os == 'macOS'
env:
Expand Down Expand Up @@ -243,9 +243,5 @@ jobs:
run: |
curl --fail --request POST \
--url https://api.github.com/repos/${{ github.repository }}/pages/builds \
--header "Authorization: Bearer $USER_TOKEN" \
--header "Authorization: Bearer ${{ secrets.USER_TOKEN }}" \
--header "Accept: application/vnd.github.v3+json"
env:
# You must create a personal token with repo access as GitHub does
# not yet support server-to-server page builds.
USER_TOKEN: ${{ secrets.USER_TOKEN }}
2 changes: 0 additions & 2 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Disable FIXME query, in DDA it is as likely to be a future feature as a bug.
# Disable "potentially dangerous function" warning like localtime, there is no good alternative and we aren't multithreaded.
queries:
- exclude: cpp/fixme-comment
- exclude: cpp/potentially-dangerous-function
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ os: linux
branches:
only:
- master
- development
- 0.F-dev

# Overall strategy for what sorts of builds to include:
# We want a build for each compiler and each platform.
Expand Down Expand Up @@ -99,7 +99,8 @@ jobs:
- stage: "Platforms and Tidy"
# MXE variant using alternate repository http://mirror.mxe.cc/repos/apt
env: COMPILER=g++ LDFLAGS="-static-libgcc -static-libstdc++" MXE_TARGET="i686-w64-mingw32.static" WINE="wine" TILES=1 SOUND=1
name: "Mingw-w64 Make cross-compile to Windows with Tiles and Sound"
name: "MinGW-Win64 Make cross-compile to Windows with Tiles and Sound"
if: type != pull_request
compiler: gcc
addons: &gcc
apt:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export CCACHE_COMMENTS=1
# Explicitly let 'char' to be 'signed char' to fix #18776
OTHERS += -fsigned-char

VERSION = 0.E
VERSION = 0.F

TARGET_NAME = cataclysm
TILES_TARGET_NAME = $(TARGET_NAME)-tiles
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=28
override_compileSdkVersion=29

# 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=28
override_targetSdkVersion=29

# This property controls which ndkBuildAppPlatform should be used
# You can override this from the command line by passing "-Poverride_ndkBuildAppPlatform=#"
Expand Down
Loading

0 comments on commit 4376c55

Please sign in to comment.