|
|
@ -23,10 +23,23 @@ jobs:
|
|
|
|
name: Deploy to Steam
|
|
|
|
name: Deploy to Steam
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Set up Python 3
|
|
|
|
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
python-version: 3
|
|
|
|
- name: Install dependencies
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
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
|
|
|
|
- name: Clone DFHack
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
with:
|
|
|
@ -40,13 +53,43 @@ jobs:
|
|
|
|
ref: main
|
|
|
|
ref: main
|
|
|
|
ssh-key: ${{ secrets.DFHACK_3RDPARTY_TOKEN }}
|
|
|
|
ssh-key: ${{ secrets.DFHACK_3RDPARTY_TOKEN }}
|
|
|
|
path: depends/steam
|
|
|
|
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
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
path: build/win64-cross/ccache
|
|
|
|
path: build/win64-cross/ccache
|
|
|
|
key: ccache-win64-cross-msvc-${{ github.sha }}
|
|
|
|
key: ccache-win64-cross-msvc-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
restore-keys: |
|
|
|
|
ccache-win64-cross-msvc
|
|
|
|
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
|
|
|
|
- name: Cross-compile win64 artifacts
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1'
|
|
|
|
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1'
|
|
|
@ -72,4 +115,5 @@ jobs:
|
|
|
|
buildDescription: ${{ github.event.inputs.version }}
|
|
|
|
buildDescription: ${{ github.event.inputs.version }}
|
|
|
|
rootPath: build
|
|
|
|
rootPath: build
|
|
|
|
depot1Path: win64-cross/output
|
|
|
|
depot1Path: win64-cross/output
|
|
|
|
|
|
|
|
depot2Path: linux64/output
|
|
|
|
releaseBranch: ${{ github.event.inputs.release_channel }}
|
|
|
|
releaseBranch: ${{ github.event.inputs.release_channel }}
|
|
|
|