Files
2026-11-29 11:42:39 +00:00

87 lines
2.8 KiB
YAML

name: linux
on:
push:
branches:
- master
# miami (reVC) gets its own adapted workflow — REVC_* options, reVC target; see tracker issue #3.
pull_request:
workflow_dispatch:
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
# Pin the job container: the runner's default image (docker.gitea.com/runner-images)
# currently fails to extract on the runner host (overlayfs whiteout EPERM); this
# image also ships node20 so actions/checkout@v4 works.
container:
image: ghcr.io/catthehacker/ubuntu:act-24.04
options: --user root
steps:
# Recursive submodules are required: vendor/librw, vendor/ogg, vendor/opus and
# vendor/opusfile are git submodules. fetch-depth: 0 is kept as a safe default;
# get_git_head_revision() only reads .git/HEAD and the ref, so full history is
# not strictly needed, but a full clone avoids shallow-clone edge cases.
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# act_runner images run as root without sudo; install directly.
- name: Install build deps
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
pkg-config \
file \
libglfw3-dev \
libopenal-dev \
libsndfile1-dev \
libmpg123-dev \
libgl-dev
# GL3 renderer via vendored librw + OpenAL audio = the documented Linux configuration.
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DRE3_AUDIO=OAL \
-DRE3_VENDORED_LIBRW=True \
-DLIBRW_PLATFORM=GL3 \
-DLIBRW_GL3_GFXLIB=GLFW
# No -Werror: this legacy codebase warns, and warnings must not fail the build.
- name: Build
run: |
cmake --build build --parallel "$(nproc)"
- name: Smoke check
run: |
BIN=build/src/re3
if [ ! -x "$BIN" ]; then
BIN="$(find build -type f -name re3 -perm -u+x | head -1 || true)"
fi
if [ -z "$BIN" ]; then
echo "error: no re3 executable found under build/" >&2
find build -maxdepth 3 -type f | sort >&2 || true
exit 1
fi
file "$BIN"
mkdir -p artifact
cp "$BIN" artifact/re3-linux-x64-gl3-oal
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: re3-linux-x64-gl3-oal
path: artifact/
if-no-files-found: error