Iterative fix: cmake configure failed with "RandR headers not found" because Raylib's GLFW backend requires X11 + GL development packages. Added standard Raylib Linux deps per their wiki: - libasound2-dev (audio) - libx11-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev - libxkbcommon-dev libwayland-dev - libgl1-mesa-dev libglu1-mesa-dev Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
76 lines
2.6 KiB
YAML
76 lines
2.6 KiB
YAML
# Reusable workflow: Engine + Launcher (Cat 1 per ADR-0025)
|
|
# C-Build (Windows + Linux) → smoke tests → on-tag: release artefacts
|
|
name: Engine + Launcher CI
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
build_type:
|
|
description: "CMake build type"
|
|
type: string
|
|
default: "Release"
|
|
smoke_test_script:
|
|
description: "Path to smoke-test script (relative to repo root); empty = skip"
|
|
type: string
|
|
default: "tests/smoke.sh"
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Windows entry deferred — Davoryn runner pool currently Linux-only.
|
|
# Re-add 'windows-latest' once a Windows runner is provisioned.
|
|
os: [ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build tools + Raylib deps (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
apt-get update -qq
|
|
# Build essentials
|
|
apt-get install -y cmake build-essential ninja-build zip unzip git curl
|
|
# Raylib Linux dependencies (X11, OpenGL, Wayland, audio)
|
|
# See https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux
|
|
apt-get install -y \
|
|
libasound2-dev \
|
|
libx11-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev \
|
|
libxkbcommon-dev libwayland-dev \
|
|
libgl1-mesa-dev libglu1-mesa-dev
|
|
|
|
- name: Configure CMake
|
|
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
|
|
|
|
- name: Build
|
|
run: cmake --build build --config ${{ inputs.build_type }} --parallel
|
|
|
|
- name: Smoke tests
|
|
if: hashFiles(inputs.smoke_test_script) != ''
|
|
shell: bash
|
|
run: |
|
|
chmod +x "${{ inputs.smoke_test_script }}" || true
|
|
"${{ inputs.smoke_test_script }}"
|
|
|
|
- name: Install (on tag)
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: cmake --install build --prefix=${{ github.workspace }}/install --config ${{ inputs.build_type }}
|
|
|
|
- name: Package release artefacts (on tag)
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
shell: bash
|
|
run: |
|
|
OS_TAG="${{ matrix.os }}"
|
|
OS_TAG="${OS_TAG//-latest/}"
|
|
ARTEFACT_NAME="${GITHUB_REPOSITORY##*/}-${GITHUB_REF_NAME}-${OS_TAG}.zip"
|
|
cd install && zip -r "../${ARTEFACT_NAME}" . && cd ..
|
|
echo "ARTEFACT_NAME=${ARTEFACT_NAME}" >> "$GITHUB_ENV"
|
|
|
|
- name: Upload to Gitea Release (on tag)
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
files: ${{ env.ARTEFACT_NAME }}
|