deploy linux build to steam

develop
Myk Taylor 2023-07-22 22:54:21 -07:00
parent 971dca8604
commit 8ec860461a
No known key found for this signature in database
2 changed files with 50 additions and 11 deletions

@ -29,14 +29,9 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install \ sudo apt-get install \
ccache \ ccache \
libgtk2.0-0 \ libsdl2-dev \
libncursesw5 \
libsdl-image1.2-dev \
libsdl-ttf2.0-dev \
libsdl1.2-dev \
libxml-libxml-perl \ libxml-libxml-perl \
libxml-libxslt-perl \ libxml-libxslt-perl \
lua5.3 \
ninja-build \ ninja-build \
zlib1g-dev zlib1g-dev
pip install 'sphinx<4.4.0' pip install 'sphinx<4.4.0'
@ -44,7 +39,7 @@ jobs:
run: | run: |
sudo apt-get install gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} sudo apt-get install gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v1 uses: actions/checkout@v3
with: with:
fetch-depth: 0 # unlimited - we need past tags fetch-depth: 0 # unlimited - we need past tags
submodules: true submodules: true
@ -177,7 +172,7 @@ jobs:
run: | run: |
pip install 'sphinx' pip install 'sphinx'
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v1 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
- name: Build docs - name: Build docs
@ -196,7 +191,7 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install lua5.3 sudo apt-get install lua5.3
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v1 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
# don't need tags here # don't need tags here

@ -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 }}