Compare commits
4 Commits
customized
...
feature/po
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e568533ba | |||
| 200cb5fbb1 | |||
| 971b9cab41 | |||
| 63660c3158 |
@ -11,28 +11,42 @@ jobs:
|
||||
build-engine:
|
||||
name: Build ${{ matrix.platform }} ${{ matrix.target }}
|
||||
runs-on: heavy-linux
|
||||
|
||||
# 1. NEW: Define the container dynamically per matrix entry
|
||||
container:
|
||||
image: registry.forge.northernlighthouseinteractive.com/${{ gitea.repository_owner }}/godot-builder-${{ matrix.builder }}:latest
|
||||
# Pull credentials (if your registry is private)
|
||||
credentials:
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.ORG_ACTIONS_TOKEN }}
|
||||
# Set resource limits for the JOB container
|
||||
options: --cpus 24 --memory 30g
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Windows (Double Precision)
|
||||
# Windows
|
||||
- platform: windows
|
||||
target: editor
|
||||
production: yes
|
||||
artifact_name: godot-windows-editor
|
||||
builder: windows
|
||||
extra_flags: "use_mingw=yes d3d12=no"
|
||||
- platform: windows
|
||||
target: template_debug
|
||||
production: no
|
||||
artifact_name: godot-windows-debug
|
||||
builder: windows
|
||||
extra_flags: "use_mingw=yes d3d12=no"
|
||||
- platform: windows
|
||||
target: template_release
|
||||
production: yes
|
||||
artifact_name: godot-windows-release
|
||||
builder: windows
|
||||
extra_flags: "use_mingw=yes d3d12=no"
|
||||
|
||||
# Linux (Double Precision)
|
||||
# Linux
|
||||
- platform: linuxbsd
|
||||
target: editor
|
||||
production: yes
|
||||
@ -50,43 +64,59 @@ jobs:
|
||||
builder: linux
|
||||
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Make scripts executable
|
||||
run: chmod +x .gitea/workflows/scripts/*.sh
|
||||
|
||||
- name: Compile (${{ matrix.platform }})
|
||||
uses: docker://quay.io/buildah/stable
|
||||
env:
|
||||
# Registry Config
|
||||
USERNAME: ${{ gitea.repository_owner }}
|
||||
PASSWORD: ${{ secrets.ORG_ACTIONS_TOKEN }}
|
||||
REGISTRY: registry.forge.northernlighthouseinteractive.com
|
||||
OWNER: ${{ gitea.repository_owner }}
|
||||
- name: Checkout Source (Native Git)
|
||||
run: |
|
||||
echo "Initializing Git..."
|
||||
git config --global --add safe.directory '*'
|
||||
git init
|
||||
|
||||
# Which builder image to use? (windows or linux)
|
||||
BUILDER_TYPE: ${{ matrix.builder }}
|
||||
IMAGE_TAG: latest
|
||||
|
||||
# SCons Arguments
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
TARGET: ${{ matrix.target }}
|
||||
PRODUCTION: ${{ matrix.production }}
|
||||
with:
|
||||
entrypoint: /bin/sh
|
||||
args: .gitea/workflows/scripts/build-with-buildah.sh
|
||||
# 1. Clean the Server URL using shell commands
|
||||
# We strip both http:// and https:// to be safe
|
||||
SERVER_DOMAIN=$(echo "${{ gitea.server_url }}" | sed 's|https://||' | sed 's|http://||')
|
||||
|
||||
# 2. Add Remote with Token Auth
|
||||
# We use the $SERVER_DOMAIN variable we just created
|
||||
git remote add origin "https://${{ gitea.actor }}:${{ secrets.ORG_ACTIONS_TOKEN }}@$SERVER_DOMAIN/${{ gitea.repository }}.git"
|
||||
|
||||
# 3. Fetch specific commit
|
||||
echo "Fetching commit ${{ gitea.sha }}..."
|
||||
git fetch --depth 1 origin ${{ gitea.sha }}
|
||||
git checkout FETCH_HEAD
|
||||
|
||||
# 4. Handle Submodules
|
||||
echo "Updating submodules..."
|
||||
# Configure git to use credentials for submodules on the same domain
|
||||
git config --global url."https://${{ gitea.actor }}:${{ secrets.ORG_ACTIONS_TOKEN }}@$SERVER_DOMAIN/".insteadOf "https://$SERVER_DOMAIN/"
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
# 2. UPDATED: No more 'buildah' script. Run SCons directly.
|
||||
- name: Compile (${{ matrix.platform }})
|
||||
run: |
|
||||
echo "Starting Native Build..."
|
||||
|
||||
# Use the injected limit, fallback to nproc if missing
|
||||
THREADS=${MAX_CORES:-$(nproc)}
|
||||
|
||||
echo "Building for ${{ matrix.platform }} (Target: ${{ matrix.target }}) with $THREADS threads."
|
||||
|
||||
# Base SCons command
|
||||
# Note: We construct flags dynamically based on the matrix variables
|
||||
scons platform=${{ matrix.platform }} \
|
||||
target=${{ matrix.target }} \
|
||||
arch=x86_64 \
|
||||
precision=double \
|
||||
production=${{ matrix.production }} \
|
||||
${{ matrix.extra_flags }} \
|
||||
-j$THREADS
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.artifact_name }}
|
||||
# Uploads executables (Windows) and binaries (Linux has no extension)
|
||||
path: bin/godot.*
|
||||
|
||||
# --- PUBLISH JOB (Runs after all builds finish) ---
|
||||
# --- PUBLISH JOB ---
|
||||
publish:
|
||||
needs: build-engine
|
||||
runs-on: ubuntu-latest
|
||||
@ -110,7 +140,6 @@ jobs:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user