Skip to content

Commit

Permalink
Merge pull request #35 from CleverRaven/master
Browse files Browse the repository at this point in the history
catchup branch
  • Loading branch information
Maleclypse committed Feb 19, 2021
2 parents 36535d9 + 511ddcb commit 7bc4088
Show file tree
Hide file tree
Showing 1,158 changed files with 345,965 additions and 276,258 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cert-*,\
-cert-err58-cpp,\
clang-diagnostic-*,\
cppcoreguidelines-slicing,\
google-explicit-constructor,\
llvm-namespace-comment,\
misc-*,\
modernize-*,\
Expand Down
43 changes: 43 additions & 0 deletions .cmake-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# options affecting formatting
format:
# how wide to allow formatted cmake files
line_width: 100
# how many spaces to tab for indent
tab_size: 4
# if true, separate flow control names from their parentheses
separate_ctrl_name_with_space: true # currently ignored by cmake-lint
# if true, separate function names from parentheses with a
separate_fn_name_with_space: false # currently ignored by cmake-lint
# if a statement is wrapped to more than one line, than dangle
# the closing parenthesis on its own line.
dangle_parens: false # currently ignored by cmake-lint
# Format command names consistently as 'lower' or 'upper' case
# 'canonical': like in official documentation
command_case: 'canonical' # currently ignored by cmake-lint
# Format keywords consistently as 'lower' or 'upper' case
keyword_case: 'upper' # currently ignored by cmake-lint
# options affecting comment reflow and formatting
markup:
# enable comment markup parsing and reflow
enable_markup: false
# options affecting linter
lint:
# list of lint codes to disable
# C0113: Missing COMMENT in statement which allows it
disabled_codes: ['C0113']
# regular expression pattern describing valid function names
function_pattern: '[a-z_]+'
# regular expression pattern describing valid names for private variables
# WEIRD: strangely named "directory variable name" in lint output
private_var_pattern: '_[0-9A-Z_]+'
# regular expression pattern describing valid names for public variables (strangely named "directories"?)
# WEIRD: strangely named "directory variable name" in lint output
public_var_pattern: '[0-9A-Z]+'
# regular expression pattern describing valid macro names
macro_pattern: '[a-z_]+'
# regular expression pattern describing valid names for function/macro
# arguments and loop variables
argument_var_pattern: '[A-Z][A-Z0-9_]+'
# require no more than this many newlines between statements
max_statement_spacing: 2

3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#In fact, the code "owners" designation is meant to encourage third party
#individuals to contribute to the mod, with the curators notified for reviews.

/data/mods/Aftershock/ @Maleclypse @John-Candlebury
/data/mods/Aftershock/ @Maleclypse @John-Candlebury @Mom-Bun
/data/mods/DinoMod/ @ephemeralstoryteller @damien @LyleSY
/data/mods/Graphical_Overmap/ @Kilvoctu @Larwck
/data/mods/MMA/ @Hymore246
Expand All @@ -28,3 +28,4 @@ magic*.h @KorGgenT
/data/json/snippets/ @I-am-Erk
/gfx/ @I-am-Erk
/tools/ @int-ua
/lang/ @BrettDong
19 changes: 15 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,27 @@ If you are also looking for suggestions then add a [CR] before the title text

It is not required to solve or reference an open issue to file a PR, however, if you do so, you need to explain the problem your PR is solving in full detail.

### All PRs should have a "Summary" line
### All PRs should have a "Summary" section with one line
Summary is a one-line description of your change that will be extracted and added to [the project changelog](../data/changelog.txt).

The format is: ```SUMMARY: Category "description"```
The format is:
```
#### Summary
Category "description"
```

The categories to choose from are: Features, Content, Interface, Mods, Balance, Bugfixes, Performance, Infrastructure, Build, I18N.

Example: ```SUMMARY: Content "Adds new mutation category 'Mouse'"```
Example:
```
#### Summary
Content "Adds new mutation category 'Mouse'"
```
Or, if you want it treated as a minor tweak that doesn't appear in the changelog:
```SUMMARY: None```
```
#### Summary
None
```

See [the Changelog Guidelines](../doc/CHANGELOG_GUIDELINES.md) for explanations of the categories.

Expand Down
41 changes: 10 additions & 31 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,33 @@
<!-- HOW TO USE: Under each "#### Heading" below, enter information relevant to your pull request.
Leave the headings unless they don't apply to your PR, and remove the comment blocks (surrounded with <!–– and ––>) when you are done.
NOTE: Please grant permission for repository maintainers to edit your PR. It is EXTREMELY common for PRs to be held up due to trivial changes being requested and the author being unavailable to make them.
-->
NOTE: Please grant permission for repository maintainers to edit your PR. It is EXTREMELY common for PRs to be held up due to trivial changes being requested and the author being unavailable to make them. -->

#### Summary

<!-- This section should consist of exactly one line, formatted like this:
SUMMARY: [Category] "[Briefly describe the change in these quotation marks]"
Do not enter the square brackets []. Category must be one of these:
- Features
- Content
- Interface
- Mods
- Balance
- Bugfixes
- Performance
- Infrastructure
- Build
- I18N
Category "Brief description"
<!-- This section should consist of exactly one line, edit the one above.
Category must be one of these: Features, Content, Interface, Mods, Balance, Bugfixes, Performance, Infrastructure, Build, I18N. Or replace the whole line with just the word None for no changelog entry.
For more on the meaning of each category, see:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/CHANGELOG_GUIDELINES.md
If approved and merged, your summary will be added to the project changelog:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/changelog.txt
-->
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/changelog.txt -->

#### Purpose of change

<!-- With a few sentences, describe your reasons for making this change. If it relates to an existing issue, you can link it with a # followed by the Github issue number, like #1234. If your pull request *fully* resolves an issue, include the word "Fix" or "Fixes" before the issue number, like: Fixes #1234.
If there is no related issue, explain here what issue, feature, or other concern you are addressing. If this is a bugfix, include steps to reproduce the original bug, so your fix can be verified.
-->
<!-- With a few sentences, describe your reasons for making this change. If it relates to an existing issue, you can link it with a # followed by the GitHub issue number, like #1234. If your pull request *fully* resolves an issue, include the word "Fix" or "Fixes" before the issue number, like: Fixes #1234.
If there is no related issue, explain here what issue, feature, or other concern you are addressing. If this is a bugfix, include steps to reproduce the original bug, so your fix can be verified. -->

#### Describe the solution

<!-- How does the feature work, or how does this fix a bug? The easier you make your solution to understand, the faster it can get merged. -->
<!-- How does the feature work, or how does this fix a bug? The easier you make your solution to understand, the faster it can get merged. -->

#### Describe alternatives you've considered

<!-- Explain any alternative solutions, different approaches, or possibilities you've considered using to solve the same problem. -->

#### Testing

<!-- Describe what steps you took to test that this PR resolved the bug or added the feature, and what tests you performed to make sure it didn't cause any regressions. Also include testing suggestions for reviewers and maintainers. -->
<!-- Describe what steps you took to test that this PR resolved the bug or added the feature, and what tests you performed to make sure it didn't cause any regressions. Also include testing suggestions for reviewers and maintainers. -->

#### Additional context

<!-- Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature or bugfix here. -->
<!-- Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature or bugfix here. -->
31 changes: 31 additions & 0 deletions .github/workflows/cmake-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: cmake-format linting

on:
push:
branches:
- master
paths:
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
pull_request:
branches:
- master
paths:
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: install cmakelang
run: python3 -m pip install -U cmakelang
- name: run cmake-lint
run: python3 -m cmakelang.lint CMakeLists.txt src/CMakeLists.txt data/CMakeLists.txt lang/CMakeLists.txt src/chkjson/CMakeLists.txt tools/format/CMakeLists.txt tools/clang-tidy-plugin/CMakeLists.txt cmake_uninstall.cmake.in -c .cmake-format.yml

52 changes: 45 additions & 7 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,93 @@ jobs:
matrix:
include:
- compiler: g++-9
os: ubuntu-latest
cmake: 0
tiles: 0
test-stage: 1
native: linux64
gold: 1
lto: 1
title: GCC 9, Ubuntu, Curses, LTO
- compiler: g++-7
os: ubuntu-latest
cmake: 1
tiles: 1
native: linux64
title: GCC 7, Ubuntu, Tiles, CMake
- compiler: g++-8
os: ubuntu-latest
cmake: 0
tiles: 1
sanitize: address
native: linux64
title: GCC 8, Ubuntu, Tiles, ASan
- compiler: clang++-9
os: ubuntu-latest
cmake: 0
tiles: 1
sanitize: address,undefined
runs-on: ubuntu-latest
native: linux64
title: Clang 9, Ubuntu, Tiles, ASan, UBSan
- compiler: clang++
os: macos-10.15
cmake: 0
tiles: 1
native: osx
title: Clang 12, macOS 10.15, Tiles
name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
env:
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
OS: ${{ matrix.os }}
TILES: ${{ matrix.tiles }}
SOUND: ${{ matrix.tiles }}
SANITIZE: ${{ matrix.sanitize }}
TEST_STAGE: ${{ matrix.test-stage }}
EXTRA_TEST_OPTS: --error-format=github-action
NATIVE: ${{ matrix.native }}
GOLD: ${{ matrix.gold }}
LTO: ${{ matrix.lto }}
RELEASE: 1
steps:
- name: checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: install dependencies
- name: install dependencies (ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
libsdl2-mixer-dev libpulse-dev ccache gettext
libsdl2-mixer-dev libpulse-dev ccache gettext parallel
- name: install dependencies (mac)
if: runner.os == 'macOS'
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
- name: prepare
run: bash ./build-scripts/requirements.sh
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d%H%M")"
shell: bash
- name: ccache cache files
- name: ccache cache files (ubuntu)
if: runner.os == 'Linux'
uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-${{ matrix.compiler }}-${{ steps.get-date.outputs.date }}
key: ccache-linux-${{ matrix.compiler }}-${{ steps.get-date.outputs.date }}
restore-keys: |
ccache-linux-${{ matrix.compiler }}-
- name: ccache cache files (mac)
if: runner.os == 'macOS'
uses: actions/cache@v2
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-mac-${{ matrix.compiler }}-${{ steps.get-date.outputs.date }}
restore-keys: |
ccache-${{ matrix.compiler }}-
ccache-
ccache-mac-${{ matrix.compiler }}-
- uses: ammaraskar/gcc-problem-matcher@master
- name: build and test
run: bash ./build-scripts/build.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- 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|$)'
description-regex: '(\n|^)#### Summary\s+`{0,3}(SUMMARY:\s+)?(None|((Features|Content|Interface|Mods|Balance|Bugfixes|Performance|Infrastructure|Build|I18N) +".*"))`{0,3}\s*(\n|$)'
description-regex-flags: 'i'
25 changes: 25 additions & 0 deletions .github/workflows/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches:
- master
paths:
- 'doc/JSON_INFO.md'
name: TOC Generator
jobs:
generateTOC:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
name: Update the table of contents
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npx doctoc doc/JSON_INFO.md --github
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update the table of contents
branch: update-toc
title: Update the table of contents in doc/JSON_INFO.md
body: |
```sh
npx doctoc doc/JSON_INFO.md --github
```
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Cataclysm.dmg
.idea/

# test executables and generated data
/tests/obj
/tests/cata_test
/tests/line_test
/tests/map_iterator_test
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
directories:
- $HOME/.ccache

- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1 BREWGETTEXT=1
- env: CLANG=clang++ OSX_MIN=10.13 TILES=1 SOUND=1
name: "Xcode 10.2 Make build with Tiles and sound (macOS)"
os: osx
osx_image: xcode10.2
Expand Down
Loading

0 comments on commit 7bc4088

Please sign in to comment.