|
|
|
@ -23,10 +23,23 @@ jobs:
|
|
|
|
|
name: Deploy to Steam
|
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
|
steps:
|
|
|
|
|
- name: Set up Python 3
|
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
|
with:
|
|
|
|
|
python-version: 3
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: |
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install ccache
|
|
|
|
|
sudo apt-get install \
|
|
|
|
|
ccache \
|
|
|
|
|
libsdl2-dev \
|
|
|
|
|
libxml-libxml-perl \
|
|
|
|
|
libxml-libxslt-perl \
|
|
|
|
|
ninja-build \
|
|
|
|
|
zlib1g-dev \
|
|
|
|
|
gcc \
|
|
|
|
|
g++
|
|
|
|
|
pip install 'sphinx<4.4.0'
|
|
|
|
|
- name: Clone DFHack
|
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
with:
|
|
|
|
@ -40,13 +53,43 @@ jobs:
|
|
|
|
|
ref: main
|
|
|
|
|
ssh-key: ${{ secrets.DFHACK_3RDPARTY_TOKEN }}
|
|
|
|
|
path: depends/steam
|
|
|
|
|
- name: Fetch ccache
|
|
|
|
|
- name: Fetch linux64 ccache
|
|
|
|
|
uses: actions/cache@v3
|
|
|
|
|
with:
|
|
|
|
|
path: ~/.ccache
|
|
|
|
|
key: ccache-ubuntu-22.04-gcc-10-${{ github.sha }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
ccache-ubuntu-22.04-gcc-10
|
|
|
|
|
- name: Fetch win64 ccache
|
|
|
|
|
uses: actions/cache@v3
|
|
|
|
|
with:
|
|
|
|
|
path: build/win64-cross/ccache
|
|
|
|
|
key: ccache-win64-cross-msvc-${{ github.sha }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
ccache-win64-cross-msvc
|
|
|
|
|
- name: Set up environment
|
|
|
|
|
id: env_setup
|
|
|
|
|
run: |
|
|
|
|
|
echo "CCACHE_DIR=${HOME}/.ccache" >> $GITHUB_ENV
|
|
|
|
|
- name: Configure DFHack
|
|
|
|
|
run: |
|
|
|
|
|
cmake \
|
|
|
|
|
-S . \
|
|
|
|
|
-B build \
|
|
|
|
|
-G Ninja \
|
|
|
|
|
-DDFHACK_BUILD_ARCH=64 \
|
|
|
|
|
-DBUILD_STONESENSE:BOOL=1 \
|
|
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
|
|
|
-DBUILD_DFLAUNCH:BOOL=1 \
|
|
|
|
|
-DBUILD_DOCS:BOOL=1 \
|
|
|
|
|
-DCMAKE_INSTALL_PREFIX=linux64/output
|
|
|
|
|
- name: Build DFHack
|
|
|
|
|
run: |
|
|
|
|
|
ninja -C build install
|
|
|
|
|
ccache --max-size 50M
|
|
|
|
|
ccache --cleanup
|
|
|
|
|
ccache --show-stats
|
|
|
|
|
- name: Cross-compile win64 artifacts
|
|
|
|
|
env:
|
|
|
|
|
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1'
|
|
|
|
@ -72,4 +115,5 @@ jobs:
|
|
|
|
|
buildDescription: ${{ github.event.inputs.version }}
|
|
|
|
|
rootPath: build
|
|
|
|
|
depot1Path: win64-cross/output
|
|
|
|
|
depot2Path: linux64/output
|
|
|
|
|
releaseBranch: ${{ github.event.inputs.release_channel }}
|
|
|
|
|