Files
sporel-tool-ci/.gitea/workflows/reusable-engine-launcher.yml
Axel Meyer e47be0ffeb fix(ci): Cat-1 — install cmake/build-essential + drop windows matrix
First-run revealed:
1. Runner images (catthehacker/ubuntu:act-latest) lack cmake.
   Added apt-get install step (cmake, build-essential, ninja-build,
   zip, unzip, git, curl).
2. windows-latest matrix entry mapped to Linux fallback containers
   (Davoryn runner pool currently Linux-only). Dropped from matrix
   until Windows runner provisioned.

Other workflows (Cat-2 hybrid, etc.) likely need same fix when first
exercised — apply iteratively as consumers come online.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 23:42:56 +02:00

68 lines
2.2 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 (Linux)
if: runner.os == 'Linux'
run: |
apt-get update -qq
apt-get install -y cmake build-essential ninja-build zip unzip git curl
- 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 }}