forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/CleverRaven/Cataclysm-DDA
- Loading branch information
Showing
296 changed files
with
194,359 additions
and
105,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x86) | ||
set(VCPKG_CRT_LINKAGE static) | ||
set(VCPKG_LIBRARY_LINKAGE static) | ||
|
||
set(VCPKG_BUILD_TYPE release) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x86) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
||
set(VCPKG_BUILD_TYPE release) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,20 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- name: Windows Tiles x64 MSVC | ||
artifact: windows-tiles-x64-msvc | ||
arch: x64 | ||
os: windows-2019 | ||
mxe: none | ||
ext: zip | ||
content: application/zip | ||
- name: Windows Tiles x32 MSVC | ||
artifact: windows-tiles-x32-msvc | ||
arch: x86 | ||
os: windows-2019 | ||
mxe: none | ||
ext: zip | ||
content: application/zip | ||
- name: Windows Tiles x64 | ||
mxe: x86_64 | ||
artifact: windows-tiles-x64 | ||
|
@@ -127,7 +141,28 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies (windows) | ||
- name: Install dependencies (windows msvc) (1/3) | ||
if: runner.os == 'Windows' | ||
uses: microsoft/[email protected] | ||
- name: Install dependencies (windows msvc) (2/3) | ||
if: runner.os == 'Windows' | ||
uses: lukka/run-vcpkg@main | ||
id: runvcpkg | ||
with: | ||
additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed' | ||
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-${{ matrix.arch }} | ||
setupOnly: true | ||
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' | ||
# We have to use at least this version of vcpkg to include fixes for yasm-tool's | ||
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline | ||
# field in vcpkg.json. Caching happens as a post-action which runs at the end of | ||
# the whole workflow, after vcpkg install happens during msbuild run. | ||
vcpkgGitCommitId: '49b67d9cb856424ff69f10e7721aec5299624268' | ||
- name: Install dependencies (windows msvc) (3/3) | ||
if: runner.os == 'Windows' | ||
run: | | ||
vcpkg integrate install | ||
- name: Install dependencies (windows mxe) | ||
if: matrix.mxe != 'none' | ||
run: | | ||
sudo apt install astyle autoconf automake autopoint bash bison bzip2 cmake flex gettext git g++ gperf intltool \ | ||
|
@@ -136,11 +171,13 @@ jobs: | |
- name: Install MXE | ||
if: matrix.mxe != 'none' | ||
run: | | ||
sudo apt install software-properties-common lsb-release | ||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 | ||
sudo add-apt-repository "deb [arch=amd64] https://pkg.mxe.cc/repos/apt `lsb_release -sc` main" | ||
sudo apt update | ||
sudo apt install mxe-{i686,x86-64}-w64-mingw32.static-{sdl2,sdl2-ttf,sdl2-image,sdl2-mixer,gettext} | ||
curl -L -o mxe-${{ matrix.mxe }}.tar.xz https://github.com/BrettDong/MXE-GCC/releases/download/mxe-gcc-11.2/mxe-${{ matrix.mxe }}.tar.xz | ||
curl -L -o mxe-${{ matrix.mxe }}.tar.xz.sha256 https://github.com/BrettDong/MXE-GCC/releases/download/mxe-gcc-11.2/mxe-${{ matrix.mxe }}.tar.xz.sha256 | ||
shasum -a 256 -c ./mxe-${{ matrix.mxe }}.tar.xz.sha256 | ||
sudo tar xJf mxe-${{ matrix.mxe }}.tar.xz -C /opt | ||
curl -L -o libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz | ||
shasum -a 256 -c ./build-scripts/libbacktrace-${{ matrix.mxe }}-w64-mingw32-sha256 | ||
sudo tar -xzf libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static.gcc11 | ||
- name: Install dependencies (Linux) | ||
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' | ||
run: | | ||
|
@@ -152,39 +189,43 @@ jobs: | |
run: | | ||
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel | ||
pip3 install dmgbuild==1.4.2 biplist | ||
- name: Build CDDA (linux) | ||
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' | ||
- name: Create VERSION.TXT | ||
shell: bash | ||
run: | | ||
cat >VERSION.txt <<EOL | ||
build type: ${{ matrix.artifact }} | ||
build number: ${{ needs.release.outputs.timestamp }} | ||
commit sha: ${{ github.sha }} | ||
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }} | ||
EOL | ||
- name: Compile translations (windows) | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
lang/compile_mo.sh all | ||
- name: Build CDDA (linux) | ||
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' | ||
run: | | ||
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist | ||
mv cataclysmdda-0.F.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz | ||
- name: Build CDDA (windows) | ||
- name: Build CDDA (windows mxe) | ||
if: matrix.mxe != 'none' | ||
env: | ||
PLATFORM: /usr/lib/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static- | ||
PLATFORM: /opt/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static.gcc11- | ||
run: | | ||
cat >VERSION.txt <<EOL | ||
build type: ${{ matrix.artifact }} | ||
build number: ${{ needs.release.outputs.timestamp }} | ||
commit sha: ${{ github.sha }} | ||
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 | ||
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 PCH=0 bindist | ||
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip | ||
- name: Build CDDA (windows msvc) | ||
if: runner.os == 'Windows' | ||
env: | ||
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets | ||
run: | | ||
msbuild -m -p:Configuration=Release -p:Platform=${{ matrix.arch }} "-target:Cataclysm-vcpkg-static;JsonFormatter-vcpkg-static" msvc-full-features\Cataclysm-vcpkg-static.sln | ||
.\build-scripts\windist.ps1 | ||
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip | ||
- name: Build CDDA (osx) | ||
if: runner.os == 'macOS' | ||
run: | | ||
cat >VERSION.txt <<EOL | ||
build type: ${{ matrix.artifact }} | ||
build number: ${{ needs.release.outputs.timestamp }} | ||
commit sha: ${{ github.sha }} | ||
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }} | ||
EOL | ||
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 USE_HOME_DIR=1 OSX_MIN=10.12 dmgdist | ||
mv Cataclysm.dmg cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.dmg | ||
- name: Set up JDK 8 (android) | ||
|
@@ -196,12 +237,6 @@ jobs: | |
- name: Setup Build and Dependencies (android) | ||
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none' | ||
run: | | ||
cat >VERSION.txt <<EOL | ||
build type: ${{ matrix.artifact }} | ||
build number: ${{ needs.release.outputs.timestamp }} | ||
commit sha: ${{ github.sha }} | ||
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }} | ||
EOL | ||
sudo apt-get update | ||
sudo apt-get install gettext | ||
- name: Build CDDA (android) | ||
|
@@ -238,6 +273,7 @@ jobs: | |
asset_name: cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }} | ||
asset_content_type: ${{ matrix.content }} | ||
- name: Trigger GitHub pages rebuild | ||
shell: bash | ||
run: | | ||
curl --fail --request POST \ | ||
--url https://api.github.com/repos/${{ github.repository }}/pages/builds \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Text Changes Analyzer | ||
|
||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- '.github/workflows/text-changes-analyzer.yml' | ||
- 'tools/check_po_printf_format.py' | ||
- 'src/*.h' | ||
- 'src/*.cpp' | ||
- '**.json' | ||
|
||
|
||
jobs: | ||
analyze-text-changes: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: "Install dependencies" | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install python3-pip gettext | ||
sudo pip3 install polib | ||
- name: "Checkout master branch" | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: "Generate translation template of master branch" | ||
run: | | ||
rm -f lang/po/cataclysm-dda.pot | ||
./lang/update_pot.sh | ||
cp lang/po/cataclysm-dda.pot ~/master.pot | ||
- name: "Fetch pull request patches" | ||
run: | | ||
wget ${{ github.event.pull_request.patch_url }} -O ~/pr.patch | ||
- name: "Apply pull request patch" | ||
run: | | ||
git config user.email "TEST@localhost" | ||
git config user.name TEST | ||
git am ~/pr.patch | ||
- name: "Generate translation template of pull request branch" | ||
run: | | ||
rm -f lang/po/cataclysm-dda.pot | ||
./lang/update_pot.sh | ||
cp lang/po/cataclysm-dda.pot ~/pull-request.pot | ||
- name: "List text changes" | ||
run: | | ||
python3 ./tools/pot_diff.py ~/master.pot ~/pull-request.pot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
f658456bb32db1d4fe694eee02459f63b7044ab71009730c3828374a35a8f750 *libbacktrace-x86_64-w64-mingw32.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if (Test-path bindist) { | ||
rm -Force -Recurse bindist | ||
} | ||
|
||
mkdir bindist | ||
cp cataclysm-tiles.exe bindist/cataclysm-tiles.exe | ||
cp tools/format/json_formatter.exe bindist/json_formatter.exe | ||
|
||
mkdir bindist/lang | ||
cp -r lang/mo bindist/lang | ||
|
||
$extras = "data", "doc", "gfx", "LICENSE.txt", "LICENSE-OFL-Terminus-Font.txt", "README.md", "VERSION.txt" | ||
ForEach ($extra in $extras) { | ||
cp -r $extra bindist | ||
} | ||
Compress-Archive -Force -Path bindist/* -DestinationPath "cataclysmdda-0.F.zip" |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.