Compare commits
48 Commits
master
...
infra/expo
| Author | SHA1 | Date | |
|---|---|---|---|
| 6dd4226698 | |||
| c0a85cd70b | |||
| ed2b28d7b1 | |||
| b92507e2cd | |||
| 5fcb49df2a | |||
| 69bc09b362 | |||
| d180c7bcbd | |||
| a79cab1d7b | |||
| 912224d35e | |||
| 63ab6e3f58 | |||
| f75b2e00df | |||
| d6febaaa11 | |||
| e3e3ae0955 | |||
| efca38acff | |||
| cbddae7b2b | |||
| 6cce0a367f | |||
| eabc4fec3f | |||
| 659e3c4179 | |||
| 6d2750552b | |||
| b822c79d6b | |||
| dc9f008a24 | |||
| 9dca4a4460 | |||
| f33f851cb8 | |||
| e40804a4ae | |||
| 8787924648 | |||
| d212c80f06 | |||
| a90daf08c2 | |||
| bf4cb1830e | |||
| b21a22f4b9 | |||
| 7acb86143e | |||
| 1375e0ceea | |||
| f2e1e915a3 | |||
| 54b45d1604 | |||
| 74eba5fc29 | |||
| e02da0f0dc | |||
| 87aaaee02e | |||
| fa1656ea42 | |||
| 547913c8a4 | |||
| 7358ab696e | |||
| b1d2f4bae9 | |||
| f3f03de589 | |||
| 35e204f812 | |||
| 6466e4168d | |||
| ff388b0aa1 | |||
| f9f4f1aece | |||
| b16e46f1ca | |||
| dbe1dadd20 | |||
| ce5e6a245d |
150
.gitea/workflows/build-engine.yaml
Normal file
150
.gitea/workflows/build-engine.yaml
Normal file
@ -0,0 +1,150 @@
|
||||
name: Build Godot Engine
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "customized-moa", "infra/exporter-image" ]
|
||||
create:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
# =================================================================
|
||||
# JOB 1: LINUX COMPILATION (Consolidated)
|
||||
# =================================================================
|
||||
compile-linux:
|
||||
name: Compile Linux (All Targets)
|
||||
# Target your specific powerful node here
|
||||
runs-on: heavy-linux
|
||||
|
||||
# Run inside the Fedora Builder image we created with Kaniko
|
||||
container:
|
||||
image: registry.forge.northernlighthouseinteractive.com/northern-lighthouse/godot-builder-linux:8740f6e
|
||||
credentials:
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.ORG_ACTIONS_TOKEN }}
|
||||
# Optional: Mount a host volume for SCons cache to speed up repeat builds drastically
|
||||
volumes:
|
||||
- /mnt/cache/scons:/root/.scons_cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Cache
|
||||
# If you mapped the volume above, configure SCons to use it
|
||||
run: |
|
||||
echo "Setting up SCons Cache..."
|
||||
export SCONS_CACHE=/root/.scons_cache
|
||||
export SCONS_CACHE_LIMIT=5000
|
||||
|
||||
- name: Compile Editor
|
||||
run: |
|
||||
echo "Compiling Linux Editor..."
|
||||
scons platform=linux target=editor precision=double production=yes arch=x86_64 -j$(nproc)
|
||||
|
||||
- name: Compile Templates
|
||||
run: |
|
||||
echo "Compiling Linux Templates..."
|
||||
scons platform=linux target=template_release precision=double production=yes arch=x86_64 -j$(nproc)
|
||||
scons platform=linux target=template_debug precision=double production=yes arch=x86_64 -j$(nproc)
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-build-artifacts
|
||||
path: bin
|
||||
|
||||
|
||||
# =================================================================
|
||||
# JOB 2: WINDOWS COMPILATION (Consolidated)
|
||||
# =================================================================
|
||||
compile-windows:
|
||||
name: Compile Windows (All Targets)
|
||||
# You can target a DIFFERENT node here to run in parallel!
|
||||
# e.g., runs-on: verdantforest
|
||||
runs-on: heavy-linux
|
||||
|
||||
# We use the SAME Linux builder because it has MinGW for cross-compilation
|
||||
container:
|
||||
image: registry.forge.northernlighthouseinteractive.com/northern-lighthouse/godot-builder-windows:8740f6e
|
||||
credentials:
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.ORG_ACTIONS_TOKEN }}
|
||||
volumes:
|
||||
- /mnt/cache/scons:/root/.scons_cache
|
||||
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Cache
|
||||
run: |
|
||||
export SCONS_CACHE=/root/.scons_cache
|
||||
export SCONS_CACHE_LIMIT=5000
|
||||
|
||||
- name: Compile Editor
|
||||
run: |
|
||||
echo "Compiling Windows Editor..."
|
||||
# production=yes handles the optimization flags automatically
|
||||
scons platform=windows target=editor precision=double production=yes arch=x86_64 use_mingw=yes use_llvm=yes d3d12=no -j$(nproc)
|
||||
|
||||
- name: Compile Templates
|
||||
run: |
|
||||
echo "Compiling Windows Templates..."
|
||||
scons platform=windows target=template_release precision=double production=yes arch=x86_64 use_mingw=yes use_llvm=yes d3d12=no -j$(nproc)
|
||||
scons platform=windows target=template_debug precision=double production=yes arch=x86_64 use_mingw=yes use_llvm=yes d3d12=no -j$(nproc)
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows-build-artifacts
|
||||
path: bin/godot.*
|
||||
|
||||
# =================================================================
|
||||
# JOB 3: PUBLISH
|
||||
# =================================================================
|
||||
publish:
|
||||
name: Publish Builds
|
||||
needs: [compile-linux, compile-windows]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Linux
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-build-artifacts
|
||||
path: .
|
||||
|
||||
- name: Download Windows
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-build-artifacts
|
||||
path: bin/godot.*
|
||||
|
||||
# - name: Package and Publish
|
||||
# uses: docker://alpine:latest
|
||||
# env:
|
||||
# API_URL: https://registry.forge.northernlighthouseinteractive.com/api/packages/${{ gitea.repository_owner }}/generic
|
||||
# TOKEN: ${{ secrets.ORG_ACTIONS_TOKEN }}
|
||||
# ACTOR: ${{ gitea.repository_owner }}
|
||||
|
||||
# VERSION: ${{ gitea.sha }}-${{ gitea.run_number }}
|
||||
# with:
|
||||
# entrypoint: /bin/sh
|
||||
# args: .gitea/workflows/scripts/publish.sh
|
||||
|
||||
# - name: Publish Artifacts
|
||||
# env:
|
||||
# API_URL: https://registry.forge.northernlighthouseinteractive.com/api/packages/${{ gitea.repository_owner }}/generic
|
||||
# TOKEN: ${{ secrets.ORG_ACTIONS_TOKEN }}
|
||||
# ACTOR: ${{ gitea.repository_owner }}
|
||||
# VERSION: ${{ gitea.sha }}-${{ gitea.run_number }}
|
||||
# run: |
|
||||
# echo "Publishing artifacts..."
|
||||
|
||||
# apk add curl zip
|
||||
|
||||
# curl --fail --user "${{ACTOR}}:${{TOKEN}}" \
|
||||
# --upload-file "godot-editor-windows.zip" \
|
||||
# "${{API_URL}}/godot-editor-windows/${{VERSION}}/godot-editor-windows.zip"
|
||||
|
||||
# ... Your existing publish script logic here ...
|
||||
49
.gitea/workflows/scripts/build-with-buildah.sh
Normal file
49
.gitea/workflows/scripts/build-with-buildah.sh
Normal file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# --- Configuration ---
|
||||
FULL_IMAGE_URL="$REGISTRY/$OWNER/godot-builder-$BUILDER_TYPE:$IMAGE_TAG"
|
||||
|
||||
echo "------------------------------------------------"
|
||||
echo "Starting Build for: $PLATFORM / $TARGET"
|
||||
echo "Using Builder: $FULL_IMAGE_URL"
|
||||
echo "------------------------------------------------"
|
||||
|
||||
echo "Logging into registry..."
|
||||
# Note: We use --password-stdin for security so the secret isn't in process list
|
||||
echo "$PASSWORD" | buildah login -u "$USERNAME" --password-stdin --tls-verify=false "$REGISTRY"
|
||||
|
||||
echo "Pulling image and creating working container..."
|
||||
# We capture the Container ID (CTR)
|
||||
CTR=$(buildah from --storage-driver=vfs --tls-verify=false "$FULL_IMAGE_URL")
|
||||
|
||||
# 3. Clean up on exit (Trap)
|
||||
cleanup() {
|
||||
echo "Cleaning up container..."
|
||||
buildah rm "$CTR" || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# 4. Determine SCons Flags based on Platform
|
||||
# Windows needs LLVM/MinGW flags. Linux just needs defaults.
|
||||
|
||||
SCONS_FLAGS="platform=$PLATFORM target=$TARGET arch=x86_64 precision=double production=$PRODUCTION -j${MAX_CORES:-$(nproc)}"
|
||||
|
||||
if [ "$PLATFORM" = "windows" ]; then
|
||||
# Add Windows-specific flags (LLVM toolchain, disable D3D12)
|
||||
SCONS_FLAGS="$SCONS_FLAGS use_llvm=yes use_mingw=yes d3d12=no"
|
||||
fi
|
||||
|
||||
# We use 'buildah config' to set it on the container instance instead.
|
||||
buildah config --storage-driver=vfs --workingdir /src "$CTR"
|
||||
|
||||
echo "Running: scons $SCONS_FLAGS"
|
||||
|
||||
# 5. Run Build
|
||||
buildah run \
|
||||
--storage-driver=vfs \
|
||||
--volume "$PWD":/src \
|
||||
"$CTR" \
|
||||
scons $SCONS_FLAGS
|
||||
|
||||
echo "✅ Build Complete"
|
||||
48
.gitea/workflows/scripts/publish.sh
Normal file
48
.gitea/workflows/scripts/publish.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Install tools (Alpine container)
|
||||
apk add --no-cache curl zip
|
||||
|
||||
echo "------------------------------------------------"
|
||||
echo "Publishing Packages for Version: $VERSION"
|
||||
echo "------------------------------------------------"
|
||||
|
||||
# --- 1. WINDOWS EDITOR ---
|
||||
echo "Packaging Windows Editor..."
|
||||
zip -j godot-editor-windows.zip dist/godot-windows-editor/*.exe
|
||||
|
||||
curl --fail --user "$ACTOR:$TOKEN" \
|
||||
--upload-file "godot-editor-windows.zip" \
|
||||
"$API_URL/godot-editor-windows/$VERSION/godot-editor-windows.zip"
|
||||
|
||||
# --- 2. LINUX EDITOR ---
|
||||
echo "Packaging Linux Editor..."
|
||||
# Find the linux binary (it has no extension, so we grep for 'godot.')
|
||||
LINUX_BIN=$(find dist/godot-linux-editor -type f -name "godot.linuxbsd.editor*" | head -n 1)
|
||||
zip -j godot-editor-linux.zip "$LINUX_BIN"
|
||||
|
||||
curl --fail --user "$ACTOR:$TOKEN" \
|
||||
--upload-file "godot-editor-linux.zip" \
|
||||
"$API_URL/godot-editor-linux/$VERSION/godot-editor-linux.zip"
|
||||
|
||||
# --- 3. EXPORT TEMPLATES (Windows + Linux) ---
|
||||
echo "Packaging Templates (.tpz)..."
|
||||
mkdir -p templates
|
||||
|
||||
# Windows Templates (Filter out console wrapper)
|
||||
cp $(ls dist/godot-windows-debug/*.exe | grep -v "console") templates/windows_debug_x86_64.exe
|
||||
cp $(ls dist/godot-windows-release/*.exe | grep -v "console") templates/windows_release_x86_64.exe
|
||||
|
||||
# Linux Templates
|
||||
cp $(find dist/godot-linux-debug -type f -name "godot.*") templates/linux_debug.x86_64
|
||||
cp $(find dist/godot-linux-release -type f -name "godot.*") templates/linux_release.x86_64
|
||||
|
||||
# Create TPZ
|
||||
zip -j templates.tpz templates/*
|
||||
|
||||
curl --fail --user "$ACTOR:$TOKEN" \
|
||||
--upload-file "templates.tpz" \
|
||||
"$API_URL/godot-templates/$VERSION/templates.tpz"
|
||||
|
||||
echo "✅ All packages published successfully!"
|
||||
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
# Dockerfile
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# Prevent interactive prompts during build
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# 1. Install Node.js (Required for Gitea/GitHub Actions)
|
||||
# 2. Install Godot Runtime Dependencies (Required for export)
|
||||
# 3. Install Git/Curl (Useful utilities)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
nodejs \
|
||||
npm \
|
||||
git \
|
||||
curl \
|
||||
libfontconfig1 \
|
||||
libx11-6 \
|
||||
libxcursor1 \
|
||||
libxext6 \
|
||||
libxfixes3 \
|
||||
libxi6 \
|
||||
libxinerama1 \
|
||||
libxrandr2 \
|
||||
libxrender1 \
|
||||
libgl1 \
|
||||
ca-certificates \
|
||||
unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
Reference in New Issue
Block a user