Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maleclypse committed Jan 26, 2022
2 parents 2b739c8 + ef67fb9 commit d99a5a0
Show file tree
Hide file tree
Showing 873 changed files with 3,612,220 additions and 344,896 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ magic*.h @KorGgenT
/gfx/ @I-am-Erk
/tools/ @int-ua
/lang/ @BrettDong
widget.cpp @wapcaplet
wiget.h @wapcaplet
2 changes: 1 addition & 1 deletion .github/workflows/CBA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/astyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 1

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
branches:
- master

# We only care about the latest revision of a PR, so cancel all previous instances.
concurrency:
group: clang-tidy-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true

jobs:
skip-duplicates:
continue-on-error: true
Expand Down Expand Up @@ -36,7 +41,7 @@ jobs:
SOUND: 1
steps:
- name: checkout repository
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install cmakelang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: checkout repository
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '["**.json"]'
paths: '["**.json", ".github/workflows/json.yml"]'
- run: echo ${{ github.event.number }} > pull_request_id
- uses: actions/upload-artifact@v2
with:
Expand All @@ -28,11 +28,11 @@ jobs:
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: JSON style check
run: make style-json
run: make style-all-json-parallel RELEASE=1
- name: Display Corrections
if: failure()
run: git diff
96 changes: 77 additions & 19 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
branches:
- master

# We only care about the latest revision of a PR, so cancel all previous instances.
# Allow running master builds to complete to help with ccache refreshes.
concurrency:
group: general-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

# Overall strategy for what sorts of builds to include:
# We want a build for the newest and oldest supported version of each compiler.
# We want a build for each platform.
Expand Down Expand Up @@ -39,7 +45,6 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**", "data/**", "lang/**"]'
skip-duplicates-data:
continue-on-error: true
Expand All @@ -51,12 +56,22 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
matrix-variables:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
skip_tests: ${{ steps.matrix_vars.outputs.skip_tests }}
max_parallel: ${{ steps.matrix_vars.outputs.max_parallel }}
steps:
- id: matrix_vars
run: |
echo "::set-output name=skip_tests::$([ "$GITHUB_REF_NAME" = "master" ] && echo true || echo false)"
echo "::set-output name=max_parallel::$([ "$GITHUB_REF_NAME" = "master" ] && echo 20 || echo 1)"
varied_builds:
needs: [ skip-duplicates-code, skip-duplicates-data ]
needs: [ skip-duplicates-code, skip-duplicates-data, matrix-variables ]
strategy:
max-parallel: 1
max-parallel: ${{ fromJSON(needs.matrix-variables.outputs.max_parallel) }}
matrix:
include:
- compiler: g++-9
Expand All @@ -73,6 +88,10 @@ jobs:
archive-success: basic-build
dont_skip_data_only_changes: 1
title: Basic Build and Test (GCC 9, Curses, LTO)
# ~850MB in a clean build
# ~370MB compressed
# .44 : 1 -> max ~1.8G
ccache_limit: 4G

- compiler: clang++-12
os: ubuntu-latest
Expand All @@ -86,6 +105,10 @@ jobs:
mods: --mods=magiclysm
dont_skip_data_only_changes: 1
title: Clang 12, Ubuntu, Tiles, ASan
# ~390MB in a clean build
# ~50MB compressed
# .13 : 1 -> max ~540MB
ccache_limit: 4G

- compiler: g++-11
os: ubuntu-latest
Expand All @@ -97,6 +120,10 @@ jobs:
native: linux64
sanitize: address
title: GCC 11, Ubuntu, Curses, ASan
# ~480MB in a clean build
# ~50MB compressed
# .10 : 1 -> max ~530MB
ccache_limit: 5G

- compiler: clang++
os: macos-10.15
Expand All @@ -108,6 +135,10 @@ jobs:
sound: 1
localize: 1
title: Clang 12, macOS 10.15, Tiles, Sound, UBSan
# ~880MB ccache-compressed in a clean build
# ~100 compressed
# .11 : 1 -> max ~450MB
ccache_limit: 4G

- compiler: g++
os: ubuntu-latest
Expand All @@ -122,6 +153,10 @@ jobs:
ldflags: -static-libgcc -static-libstdc++
mxe_target: x86_64-w64-mingw32.static.gcc11
wine: wine
# ~285MB in a clean build
# ~36MB compressed
# .12 : 1 -> max ~390MB
ccache_limit: 3G

- compiler: clang++-6.0
os: ubuntu-18.04
Expand All @@ -132,20 +167,29 @@ jobs:
localize: 1
native: linux64
title: Clang 6, Ubuntu, Curses, Release
# ~190MB in a clean build
# ~30MB compressed
# .16 : 1 -> max ~485MB
ccache_limit: 3G

- compiler: g++-7
os: ubuntu-18.04
release: 0
release: 1
cmake: 1
tiles: 1
sound: 1
localize: 0
native: linux64
title: GCC 7, Ubuntu, Tiles, Sound, CMake
# ~180MB in a clean build
# ~25MB compressed
# .14 : 1 -> max ~430MB
ccache_limit: 3G

name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
env:
ZSTD_CLEVEL: 17
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
MXE_TARGET: ${{ matrix.mxe_target }}
Expand All @@ -165,11 +209,16 @@ jobs:
LTO: ${{ matrix.lto }}
RELEASE: ${{ matrix.release }}
ARCHIVE_SUCCESS: ${{ matrix.archive-success }}
CCACHE_LIMIT: ${{ matrix.ccache_limit }}
CCACHE_FILECLONE: true
CCACHE_HARDLINK: true
CCACHE_NOCOMPRESS: true
SKIP: ${{ ( github.event.pull_request.draft == true && matrix.title != 'Basic Build and Test (GCC 9, Curses, LTO)' ) || ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }}
SKIP_TESTS: ${{ needs.matrix-variables.outputs.skip_tests }}
steps:
- name: checkout repository
if: ${{ env.SKIP == 'false' }}
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies (ubuntu)
Expand Down Expand Up @@ -203,28 +252,37 @@ jobs:
id: get-vars
if: ${{ env.SKIP == 'false' }}
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
echo "::set-output name=datetime::$(/bin/date -u "+%Y%m%d%H%M")"
echo "::set-output name=ccache-path::$([ "$RUNNER_OS" = "macOS" ] && echo '/Users/runner/Library/Caches/ccache' || echo '~/.ccache')"
shell: bash
- name: ccache cache files (master)
if: ${{ github.event_name == 'push' && env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }}
- name: ccache cache files
if: ${{ env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }}
uses: actions/cache@v2
with:
path: ${{ steps.get-vars.outputs.ccache-path }}
# double-dash after compiler is not a typo, it is to disambiguate between g++-<date> and g++-11-<date> for restore key prefix matching
key: ccache-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.date }}
key: ccache-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.datetime }}
restore-keys: |
ccache-${{ runner.os }}-${{ matrix.compiler }}--
- name: ccache cache files (PR)
if: ${{ github.event_name == 'pull_request' && env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }}
uses: actions/cache@v2
with:
path: ${{ steps.get-vars.outputs.ccache-path }}
key: ccache-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.date }}
ccache-master-${{ runner.os }}-${{ matrix.compiler }}--
- uses: ammaraskar/gcc-problem-matcher@master
- name: build and test
- name: build
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/build.sh
run: bash ./build-scripts/gha_compile_only.sh
- name: post-build ccache manipulation
if: ${{ env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
run: |
ccache --show-stats
ccache -M ${{ env.CCACHE_LIMIT }}
ccache -c
ccache --show-stats
- name: clear ccache on PRs
if: ${{ github.ref_name != 'master' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
run: |
ccache -C
# TODO: post ccache here, however actions/cache@v2 does not support manual upload step
- name: run tests
if: ${{ env.SKIP == 'false' && env.SKIP_TESTS == 'false' }}
run: bash ./build-scripts/gha_test_only.sh
- run: |
echo ${{ github.event.number }} > pull_request_id
echo "true" > ${{ env.ARCHIVE_SUCCESS }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ on:
- '!tools/format/**'
- 'utilities/**'

# We only care about the latest revision of a PR, so cancel previous instances.
concurrency:
group: msvc-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true

env:
# There's not enough disk space to build both release and debug versions of
# our dependencies, so we hack the triplet file to build only release versions
# Have to use github.workspace because runner namespace isn't available yet.
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets
ZSTD_CLEVEL: 17

jobs:
build_catatclysm:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/object_creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ on:
- 'tools/**'
- 'utilities/**'

# We only care about the latest revision of a PR, so cancel all previous instances.
concurrency:
group: object-creator-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true

env:
# There's not enough disk space to build both release and debug versions of
# our dependencies, so we hack the triplet file to build only release versions
# Have to use github.workspace because runner namespace isn't available yet.
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets
ZSTD_CLEVEL: 17

jobs:
build_object_creator:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pull-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
sudo pip3 install transifex-client
- name: "Checkout"
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: "Get current date"
uses: 1466587594/get-current-time@v2
id: current-date
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/push-translation-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,19 @@ name: "Push translation template"
concurrency: push_transifex

on:
push:
branches:
- master
paths:
- '**.json'
- 'src/**.cpp'
- 'src/**.h'
- 'lang/extract_json_strings.py'
- 'lang/strip_line_numbers.py'
- 'lang/update_pot.sh'
- 'lang/unicode_check.py'
workflow_run:
workflows: ["Experimental Release"]
types:
- completed


jobs:
push-template:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'push' &&
github.event.workflow_run.conclusion == 'success' &&
github.repository == 'CleverRaven/Cataclysm-DDA' }}
steps:
- name: "Install dependencies"
run: |
Expand All @@ -45,11 +41,8 @@ jobs:
- name: "Push translation template to Transifex server"
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: |
tx push --source --no-interactive --resource cataclysm-dda.master-cataclysm-dda
- name: Sleep for 5 minutes
run: sleep 5m
shell: bash
Loading

0 comments on commit d99a5a0

Please sign in to comment.