Skip to content

Commit

Permalink
Merge pull request #6 from CleverRaven/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
faefux authored Aug 27, 2019
2 parents 96a1f06 + f918a14 commit 1602dc1
Show file tree
Hide file tree
Showing 1,069 changed files with 258,829 additions and 153,601 deletions.
28 changes: 2 additions & 26 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Checks: "\
bugprone-*,\
cata-*,\
cert-*,\
-cert-dcl21-cpp,\
-cert-env33-c,\
-cert-err58-cpp,\
clang-diagnostic-*,\
cppcoreguidelines-slicing,\
Expand All @@ -16,68 +18,42 @@ misc-*,\
modernize-*,\
performance-*,\
readability-*,\
-bugprone-integer-division,\
-bugprone-macro-parentheses,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
-bugprone-string-integer-assignment,\
-bugprone-too-small-loop-variable,\
-bugprone-undefined-memory-manipulation,\
-bugprone-unused-return-value,\
-bugprone-use-after-move,\
-cert-dcl21-cpp,\
-cert-dcl50-cpp,\
-cert-dcl58-cpp,\
-cert-dcl59-cpp,\
-cert-env33-c,\
-cert-err34-c,\
-cert-flp30-c,\
-cert-msc30-c,\
-cert-msc32-c,\
-cert-msc50-cpp,\
-cert-msc51-cpp,\
-misc-definitions-in-headers,\
-misc-non-private-member-variables-in-classes,\
-misc-redundant-expression,\
-misc-unconventional-assign-operator,\
-modernize-avoid-c-arrays,\
-modernize-deprecated-headers,\
-modernize-make-unique,\
-modernize-pass-by-value,\
-modernize-raw-string-literal,\
-modernize-return-braced-init-list,\
-modernize-use-auto,\
-modernize-use-default-member-init,\
-modernize-use-emplace,\
-modernize-use-equals-default,\
-modernize-use-equals-delete,\
-modernize-use-override,\
-modernize-use-transparent-functors,\
-performance-for-range-copy,\
-performance-inefficient-vector-operation,\
-performance-move-const-arg,\
-performance-noexcept-move-constructor,\
-performance-implicit-conversion-in-loop,\
-performance-inefficient-algorithm,\
-performance-inefficient-string-concatenation,\
-performance-type-promotion-in-math-fn,\
-performance-unnecessary-value-param,\
-readability-avoid-const-params-in-decls,\
-readability-braces-around-statements,\
-readability-const-return-type,\
-readability-else-after-return,\
-readability-function-size,\
-readability-implicit-bool-conversion,\
-readability-inconsistent-declaration-parameter-name,\
-readability-isolate-declaration,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-non-const-parameter,\
-readability-container-size-empty,\
-readability-redundant-control-flow,\
-readability-redundant-declaration,\
-readability-redundant-preprocessor,\
-readability-redundant-string-init,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test).*'
Expand Down
4 changes: 3 additions & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ staleLabel: stale
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
for your contributions. Please do not \'bump\' or comment on this issue
unless you are actively working on it. Stale issues, and stale issues that
are closed are still considered.
# Comment to post when removing the stale label.
# unmarkComment: >
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: C/C++ CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- name: install dependencies
run: sudo apt-get install libncursesw5-dev
- name: make
run: make
- name: run tests
run: make check
26 changes: 26 additions & 0 deletions .github/workflows/json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: JSON Validation

on:
push:
branches:
- master
paths:
- "*.json"
pull_request:
branches:
- master
paths:
- "*.json"

jobs:
style-json:
name: JSON style check

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- name: JSON style check
run: make style-json
14 changes: 14 additions & 0 deletions .github/workflows/pr-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR Validator
on:
pull_request:
branches:
- master
jobs:
validate:
name: Validate PR
runs-on: ubuntu-latest
steps:
- name: "Validate SUMMARY"
uses: CleverRaven/pr-validator@master
with:
description-regex: '\n\s*`{0,3}SUMMARY: +(None|((Features|Content|Interface|Mods|Balance|Bugfixes|Performance|Infrastructure|Build|I18N) +".*"))`{0,3}\s*\n'
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
addons: &clang38
apt:
packages: ["clang-3.8", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
sources: *apt_sources
sources: [*apt_sources]

# Then build different configurations and targets in parallel.
- stage: "Main Compilers"
Expand All @@ -75,11 +75,12 @@ jobs:
sources: [*apt_sources]

- env: COMPILER=g++-8 CXXFLAGS='-Wno-implicit-fallthrough' TILES=1 SOUND=1 SANITIZE=address
name: "GCC 8 Make build with Tiles, Sound and address sanitization"
name: "GCC 8 Make build with Tiles, Sound, astyle and address sanitization"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev", "astyle"]
sources: *apt_sources

- env: CLANG=clang++-8 SANITIZE=address EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items"
Expand All @@ -99,6 +100,19 @@ jobs:
apt:
packages: ["wine"]

- env: NATIVE=android COMPILER=gcc
name: "Android build"
language: android
android:
components:
- build-tools-28.0.1
- android-26
cache:
# The ccache feature in Travis doesn't work for language: android, so
# do it ourselves.
directories:
- $HOME/.ccache

- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1
name: "Xcode 10.1 Make build with Tiles and sound (macOS)"
os: osx
Expand Down
2 changes: 1 addition & 1 deletion COMPILING-MSYS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pacman -Su
4. Install packages required for compilation with:

```bash
pacman -S git git-extras-git make mingw-w64-x86_64-{astyle,ccache,gcc,libmad,libwebp,ncurses,pkg-config,SDL2} mingw-w64-x86_64-SDL2_{image,mixer,ttf}
pacman -S git git-extras make mingw-w64-x86_64-{astyle,ccache,gcc,libmad,libwebp,ncurses,pkg-config,SDL2} mingw-w64-x86_64-SDL2_{image,mixer,ttf}
```

5. Update paths in system-wide profile file (e.g. `C:\msys64\etc\profile`) as following:
Expand Down
16 changes: 14 additions & 2 deletions COMPILING-VS-VCPKG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,20 @@ git clone https://github.com/CleverRaven/Cataclysm-DDA.git
cd Cataclysm-DDA
```

2. Open one of provided solutions (`msvc-full-features\Cataclysm-vcpkg.sln` for dynamically linked executable or `msvc-full-features\Cataclysm-vcpkg-static.sln` for statically linked executable) in `Visual Studio`, select configuration (`Release` or `Debug`) an platform (`x64` or `x86`) and build it.
2. Open one of provided solutions (`msvc-full-features\Cataclysm-vcpkg.sln` for dynamically linked executable or `msvc-full-features\Cataclysm-vcpkg-static.sln` for statically linked executable) in `Visual Studio`, select configuration (`Release` or `Debug`) and platform (`x64` or `x86`) and build it.

**Note**: This will compile release version with Sound, Tiles and Localization support (language files won't be automatically compiled).

3. See [COMPILING.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/COMPILING.md#visual-studio-guide) for detail about building and debugging.
3. Building Cataclysm with Visual Studio is very simple. Just build it like a normal Visual C++ project. The process may takes a long period of time, so you'd better prepare a cup of coffee and some books in front of your computer :)

4. If you need localization support, execute the bash script `lang/compile_mo.sh` inside Git Bash GUI just like on a UNIX-like system. This will compile the language files that were not automatically compiled in step 2 above.

### Debugging

After building Cataclysm, you may discover that after pressing the debug button in Visual Studio, Cataclysm just exits after launch with return code 1. That is because of the wrong working directory. You need to configure the working directory to `$(ProjectDir)..`.

When debugging, it is not strictly necessary to use a `Debug` build; `Release` builds run significantly faster, can still be run in the debugger, and most of the time will have most of the information you need.

### Make a distribution

There is a batch script in `msvc-full-features` folder `distribute.bat`. It will create a sub folder `distribution` and copy all required files(eg. `data/`, `Cataclysm.exe` and dlls) into that folder. Then you can zip it and share the archive on the Internet.
Loading

0 comments on commit 1602dc1

Please sign in to comment.