Files
ReSkate/.github/workflows/linux-server.yml
T
juan fcac674511 Fix Linux Ctrl+C hang, README guide, versioned Linux asset
- console reader: poll()+read() instead of iostream getline; joinable
  thread joined before Steam shutdown/exit (iostream lock deadlock
  needed Ctrl+D before)
- README: Linux dedicated-server setup guide
- CI: version input, tag builds, ReSkateServer-Linux-<version> asset
  with setup script staged at top level
2026-10-03 17:51:14 -03:00

79 lines
2.5 KiB
YAML

name: Linux Server
on:
push:
branches: [linux-server-native, main]
tags: ['v*']
pull_request:
branches: [main]
workflow_dispatch:
inputs:
version:
description: Version stamped into the binaries and the asset name (e.g. 1.0.3)
required: true
default: 0.0.0-dev
permissions:
contents: read
jobs:
build:
name: Linux x64 Server
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out source
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libssl-dev
- name: Set version
run: |
if [ -n "${{ inputs.version }}" ]; then echo "VERSION=${{ inputs.version }}" >> "$GITHUB_ENV"
elif [[ "${{ github.ref }}" == refs/tags/v* ]]; then echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_ENV"
else echo "VERSION=0.0.0-dev" >> "$GITHUB_ENV"; fi
- name: Configure
run: cmake --preset linux-x64 -DDINGOSDK_BUILD_MULTIPLAYER_TESTS=ON "-DDINGOSDK_VERSION=${{ env.VERSION }}"
- name: Build server and tests
run: cmake --build --preset linux-release --parallel 4
- name: Run portable tests
run: ctest --test-dir build/linux --output-on-failure
- name: Stage package
run: |
set -eux
package='build/package-linux'
mkdir -p "$package/licenses"
cp build/linux/ReSkateServer "$package/"
cp contrib/setup-linux-server-libs.sh "$package/"
cp contrib/reskate-server.service "$package/"
cp Server/README-linux.md "$package/"
cp Server/README.txt "$package/README-server.txt"
cp LICENSE "$package/LICENSE.txt"
for library in rapidjson sqlite miniz bcdec; do
cp "External/$library/LICENSE.txt" "$package/licenses/$library-LICENSE.txt"
done
for library in spdlog lz4 zstd steam_networking; do
cp "External/$library/LICENSE" "$package/licenses/$library-LICENSE.txt"
done
cp External/fonts/*-LICENSE.txt "$package/licenses/"
file "$package/ReSkateServer"
- name: Upload Linux server
uses: actions/upload-artifact@v7
with:
name: ReSkateServer-Linux-${{ env.VERSION }}
path: build/package-linux/
archive: true
if-no-files-found: error
retention-days: 30