Skip to content

Commit

Permalink
Merge pull request CleverRaven#36 from CleverRaven/0.F-dev
Browse files Browse the repository at this point in the history
0.f dev
  • Loading branch information
Maleclypse authored Mar 15, 2021
2 parents 7078595 + d42c3b7 commit 91405ab
Show file tree
Hide file tree
Showing 473 changed files with 367,954 additions and 81,696 deletions.
21 changes: 14 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ clone_folder: C:\Projects\Cataclysm-DDA
cache:
- c:\tools\vcpkg\installed
- c:\Users\appveyor\AppData\Local\vcpkg\
install:
- cmd: cd c:\tools\vcpkg\
- cmd: git pull
- cmd: bootstrap-vcpkg.bat -disableMetrics
- cmd: vcpkg --triplet %PLATFORM%-windows-static install sdl2 sdl2-image sdl2-mixer[dynamic-load,libflac,mpg123,libmodplug,libvorbis] sdl2-ttf gettext --recurse
build:
project: /msvc-full-features/Cataclysm-vcpkg-static.sln
parallel: true
verbosity: minimal
test_script:
- cmd: Cataclysm-test-vcpkg-static-Release-Win32.exe --rng-seed time --min-duration 0.2
skip_commits:
only_commits:
files:
- 'doc/**'
- 'lgtm/**'
- 'tools/**'
- '.github/**'
- '.appveyor.yml'
- 'msvc-full-features/**'
- 'src/**'
- 'tests/**'
branches:
only:
- master

1 change: 1 addition & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ exemptLabels:
- "0.E Content Freeze"
- "0.F Feature Freeze"
- "0.F Content Freeze"
- "0.F String Freeze"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/clang-tidy.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 @@ -15,6 +16,7 @@ on:
pull_request:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
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
2 changes: 2 additions & 0 deletions .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
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
2 changes: 1 addition & 1 deletion .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
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,20 @@ endif
# OSX
ifeq ($(NATIVE), osx)
ifeq ($(OSX_MIN),)
ifneq ($(CLANG), 0)
OSX_MIN = 10.7
ifneq ($(findstring Darwin,$(OS)),)
OSX_MIN = $(shell sw_vers -productVersion | awk -F '.' '{print $$1 "." $$2}')
else
OSX_MIN = 10.5
ifneq ($(CLANG), 0)
ifneq ($(SANITIZE),)
# sanitizers does not function properly (e.g. false positive errors) if OSX_MIN < 10.9
# https://github.com/llvm/llvm-project/blob/release/11.x/compiler-rt/CMakeLists.txt#L183
OSX_MIN = 10.9
else
OSX_MIN = 10.7
endif
else
OSX_MIN = 10.5
endif
endif
endif
DEFINES += -DMACOSX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ public void run() {
public boolean getDefaultSetting(final String settingsName, boolean defaultValue) {
return PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getBoolean(settingsName, defaultValue);
}

public String getSystemLang() {
return getResources().getConfiguration().locale.toLanguageTag().replace('-', '_');
}
}
39 changes: 25 additions & 14 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Build script intended for use in Travis CI and Github workflow

echo "Using bash version $BASH_VERSION"
set -exo pipefail

num_jobs=3
Expand Down Expand Up @@ -33,6 +34,25 @@ ccache --zero-stats
ccache -M 5G
ccache --show-stats

function run_test
{
set -eo pipefail
test_exit_code=0 sed_exit_code=0 exit_code=0
$WINE $1 --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS "$2" 2>&1 | sed -E 's/^(::(warning|error|debug)[^:]*::)?/\1'"$3"'/' || test_exit_code="${PIPESTATUS[0]}" sed_exit_code="${PIPESTATUS[1]}"
if [ "$test_exit_code" -ne "0" ]
then
echo "$3test exited with code $test_exit_code"
exit_code=1
fi
if [ "$sed_exit_code" -ne "0" ]
then
echo "$3sed exited with code $sed_exit_code"
exit_code=1
fi
return $exit_code
}
export -f run_test

if [ "$CMAKE" = "1" ]
then
bin_path="./"
Expand Down Expand Up @@ -145,8 +165,8 @@ then
make -j$num_jobs
cd ..
# Run regular tests
[ -f "${bin_path}cata_test" ] && parallel --verbose --tagstring "({})=>" --linebuffer $WINE ${bin_path}/cata_test --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
[ -f "${bin_path}cata_test-tiles" ] && parallel --verbose --tagstring "({})=>" --linebuffer $WINE ${bin_path}/cata_test-tiles --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
[ -f "${bin_path}cata_test" ] && parallel --verbose --linebuffer "run_test $(printf %q "${bin_path}")'/cata_test' {} '('{}')=> '" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
[ -f "${bin_path}cata_test-tiles" ] && parallel --verbose --linebuffer "run_test $(printf %q "${bin_path}")'/cata_test-tiles' {} '('{}')=> '" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
fi
elif [ "$NATIVE" == "android" ]
then
Expand All @@ -163,23 +183,14 @@ 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
if [ "$OS" == "macos-10.15" ]
then
# if OSX_MIN we specify here is lower than 10.15 then linker is going
# to throw warnings because SDL and gettext libraries installed from
# Homebrew are built with minimum target osx version 10.15
export OSX_MIN=10.15
else
export BACKTRACE=1
fi
make -j "$num_jobs" RELEASE=1 CCACHE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0

export ASAN_OPTIONS=detect_odr_violation=1
export UBSAN_OPTIONS=print_stacktrace=1
parallel --verbose --tagstring "({})=>" --linebuffer $WINE ./tests/cata_test --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
parallel --verbose --linebuffer "run_test './tests/cata_test' {} '('{}')=> '" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
if [ -n "$MODS" ]
then
parallel --verbose --tagstring "(Mods-{})=>" --linebuffer $WINE ./tests/cata_test --user-dir=modded $MODS --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
parallel --verbose --linebuffer "run_test './tests/cata_test --user-dir=modded '$(printf %q "${MODS}") {} 'Mods-('{}')=> '" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
fi

if [ -n "$TEST_STAGE" ]
Expand All @@ -188,7 +199,7 @@ else
# the mod data can be successfully loaded

mods="$(./build-scripts/get_all_mods.py)"
$WINE ./tests/cata_test --user-dir=all_modded --mods="$mods" --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS "~*"
run_test './tests/cata_test --user-dir=all_modded --mods='"${mods}" '~*' ''
fi
fi
ccache --show-stats
Expand Down
Loading

0 comments on commit 91405ab

Please sign in to comment.