afegit CI/CD

This commit is contained in:
2025-11-23 20:36:45 +01:00
parent f5b60ebbaf
commit ea30c24f7f
7 changed files with 387 additions and 18 deletions

46
docker/Dockerfile.build Normal file
View File

@@ -0,0 +1,46 @@
# Imagen para compilar pollo en múltiples plataformas
# Incluye herramientas para: Linux x64, Windows x64 (cross), Raspberry Pi ARM64 (cross)
# SDL3 se compila en cada job del workflow
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
# Herramientas básicas de build
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
pkg-config \
wget \
tar \
gzip \
zip \
# Node.js (requerido para GitHub/Gitea Actions)
nodejs \
npm \
# Cross-compilación Windows
mingw-w64 \
# Cross-compilación Raspberry Pi ARM64
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
# Dependencias para compilar SDL3 (Linux nativo)
libgl1-mesa-dev \
libglu1-mesa-dev \
libx11-dev \
libxext-dev \
libxrandr-dev \
libxcursor-dev \
libxi-dev \
libxinerama-dev \
libxxf86vm-dev \
libxss-dev \
libasound2-dev \
libpulse-dev \
libudev-dev \
libdbus-1-dev \
libwayland-dev \
libxkbcommon-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace

View File

@@ -0,0 +1,28 @@
# Docker Compose para act_runner de Gitea Actions
#
# USO:
# 1. Obtener token de registro en Gitea > Settings > Actions > Runners
# 2. Actualizar GITEA_RUNNER_REGISTRATION_TOKEN abajo
# 3. Iniciar: docker compose -f docker-compose.runner.yml up -d runner
# 4. Ver logs: docker compose -f docker-compose.runner.yml logs -f runner
services:
runner:
image: gitea/act_runner:latest
container_name: gitea-runner-pollo
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./runner-data:/data
environment:
- GITEA_INSTANCE_URL=http://gitea:3000
- GITEA_RUNNER_REGISTRATION_TOKEN=${RUNNER_TOKEN}
- GITEA_RUNNER_NAME=pollo-runner
- GITEA_RUNNER_LABELS=ubuntu-latest:docker://ubuntu:24.04,linux:docker://ubuntu:24.04
- CONFIG_FILE=/data/config.yaml
networks:
- web
networks:
web:
external: true