ci: add Gitea Actions Linux build workflow to miami (reVC, GL3 + OpenAL)
linux / build (push) Canceled after 0s
linux / build (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
name: linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- miami
|
||||
# This is the miami (reVC) workflow: REVC_* options, reVC target.
|
||||
# master's copy lives on the master branch (re3, RE3_* options, re3 target).
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
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 \
|
||||
-DREVC_AUDIO=OAL \
|
||||
-DREVC_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/reVC
|
||||
if [ ! -x "$BIN" ]; then
|
||||
BIN="$(find build -type f -name reVC -perm -u+x | head -1 || true)"
|
||||
fi
|
||||
if [ -z "$BIN" ]; then
|
||||
echo "error: no reVC 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/reVC-linux-x64-gl3-oal
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: reVC-linux-x64-gl3-oal
|
||||
path: artifact/
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user