Compare commits

...

4 Commits

Author SHA1 Message Date
ffd88c02e1 claude
Some checks failed
Continuous Integration / Code Formatting (pull_request) Successful in 30s
Continuous Integration / Code Quality Check (pull_request) Successful in 28s
Continuous Integration / Test Execution (pull_request) Failing after 17s
Continuous Integration / CI Summary (pull_request) Failing after 5s
2025-09-30 00:29:06 +04:00
bd9b7c009a change platforms defaults 2025-09-30 00:28:52 +04:00
e61ab94935 typo 2025-09-30 00:28:29 +04:00
9150622e74 add build cache
use checkboxes
2025-09-30 00:28:17 +04:00
3 changed files with 114 additions and 50 deletions

View File

@@ -5,7 +5,8 @@
"Bash(find:*)",
"Bash(godot:*)",
"Bash(python:*)",
"Bash(git mv:*)"
"Bash(git mv:*)",
"Bash(dir:*)"
],
"deny": [],
"ask": []

View File

@@ -3,7 +3,7 @@ name: Build Game
# Build pipeline for creating game executables across multiple platforms
#
# Features:
# - Manual trigger with platform selection
# - Manual trigger with individual platform checkboxes
# - Tag-based automatic builds for releases
# - Multi-platform builds (Windows, Linux, macOS, Android)
# - Artifact storage for one week
@@ -13,16 +13,31 @@ on:
# Manual trigger with platform selection
workflow_dispatch:
inputs:
platforms:
description: 'Platforms to build (comma-separated: windows,linux,macos,android)'
required: true
default: 'windows,linux'
type: string
build_windows:
description: 'Build for Windows'
required: false
default: true
type: boolean
build_linux:
description: 'Build for Linux'
required: false
default: false
type: boolean
build_macos:
description: 'Build for macOS'
required: false
default: false
type: boolean
build_android:
description: 'Build for Android'
required: false
default: false
type: boolean
build_type:
description: 'Build type'
required: true
default: 'release'
type: choice
type: debug
options:
- release
- debug
@@ -64,7 +79,23 @@ jobs:
run: |
# Determine platforms to build
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
platforms="${{ github.event.inputs.platforms }}"
# Build platforms array from individual checkboxes
platforms=""
if [[ "${{ github.event.inputs.build_windows }}" == "true" ]]; then
platforms="${platforms}windows,"
fi
if [[ "${{ github.event.inputs.build_linux }}" == "true" ]]; then
platforms="${platforms}linux,"
fi
if [[ "${{ github.event.inputs.build_macos }}" == "true" ]]; then
platforms="${platforms}macos,"
fi
if [[ "${{ github.event.inputs.build_android }}" == "true" ]]; then
platforms="${platforms}android,"
fi
# Remove trailing comma
platforms="${platforms%,}"
build_type="${{ github.event.inputs.build_type }}"
version_override="${{ github.event.inputs.version_override }}"
else
@@ -101,11 +132,50 @@ jobs:
echo " Version: ${version}"
echo " Artifact: ${artifact_name}"
# Setup export templates (shared across all platform builds)
setup-templates:
name: Setup Export Templates
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Cache export templates
id: cache-templates
uses: actions/cache@v4
with:
path: ~/.local/share/godot/export_templates
key: godot-templates-${{ env.GODOT_VERSION }}
restore-keys: |
godot-templates-
- name: Setup Godot
if: steps.cache-templates.outputs.cache-hit != 'true'
uses: chickensoft-games/setup-godot@v1
with:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
- name: Install export templates
if: steps.cache-templates.outputs.cache-hit != 'true'
run: |
echo "📦 Installing Godot export templates..."
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
unzip -q Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
echo "✅ Export templates installed successfully"
ls -la ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
- name: Verify templates cache
run: |
echo "🔍 Verifying export templates are available:"
ls -la ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
# Windows build job
build-windows:
name: Build Windows
runs-on: ubuntu-latest
needs: prepare
needs: [prepare, setup-templates]
if: contains(needs.prepare.outputs.platforms, 'windows')
steps:
@@ -118,15 +188,13 @@ jobs:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
- name: Install export templates
run: |
echo "📦 Installing Godot export templates..."
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
unzip -q Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
echo "✅ Export templates installed successfully"
ls -la ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
- name: Restore export templates cache
uses: actions/cache@v4
with:
path: ~/.local/share/godot/export_templates
key: godot-templates-${{ env.GODOT_VERSION }}
restore-keys: |
godot-templates-
- name: Create build directory
run: mkdir -p ${{ env.BUILD_DIR }}
@@ -164,7 +232,7 @@ jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-latest
needs: prepare
needs: [prepare, setup-templates]
if: contains(needs.prepare.outputs.platforms, 'linux')
steps:
@@ -177,15 +245,13 @@ jobs:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
- name: Install export templates
run: |
echo "📦 Installing Godot export templates..."
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
unzip -q Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
echo "✅ Export templates installed successfully"
ls -la ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
- name: Restore export templates cache
uses: actions/cache@v4
with:
path: ~/.local/share/godot/export_templates
key: godot-templates-${{ env.GODOT_VERSION }}
restore-keys: |
godot-templates-
- name: Create build directory
run: mkdir -p ${{ env.BUILD_DIR }}
@@ -226,7 +292,7 @@ jobs:
build-macos:
name: Build macOS
runs-on: ubuntu-latest
needs: prepare
needs: [prepare, setup-templates]
if: contains(needs.prepare.outputs.platforms, 'macos')
steps:
@@ -239,15 +305,13 @@ jobs:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
- name: Install export templates
run: |
echo "📦 Installing Godot export templates..."
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
unzip -q Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
echo "✅ Export templates installed successfully"
ls -la ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
- name: Restore export templates cache
uses: actions/cache@v4
with:
path: ~/.local/share/godot/export_templates
key: godot-templates-${{ env.GODOT_VERSION }}
restore-keys: |
godot-templates-
- name: Create build directory
run: mkdir -p ${{ env.BUILD_DIR }}
@@ -285,7 +349,7 @@ jobs:
build-android:
name: Build Android
runs-on: ubuntu-latest
needs: prepare
needs: [prepare, setup-templates]
if: contains(needs.prepare.outputs.platforms, 'android')
steps:
@@ -310,14 +374,13 @@ jobs:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
- name: Install export templates
run: |
echo "📦 Installing Godot export templates..."
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
unzip -q Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/
echo "✅ Export templates installed successfully"
- name: Restore export templates cache
uses: actions/cache@v4
with:
path: ~/.local/share/godot/export_templates
key: godot-templates-${{ env.GODOT_VERSION }}
restore-keys: |
godot-templates-
- name: Create build directory
run: mkdir -p ${{ env.BUILD_DIR }}
@@ -363,7 +426,7 @@ jobs:
summary:
name: Build Summary
runs-on: ubuntu-latest
needs: [prepare, build-windows, build-linux, build-macos, build-android]
needs: [prepare, setup-templates, build-windows, build-linux, build-macos, build-android]
if: always()
steps:

View File

@@ -6,4 +6,4 @@
- Use TDD methodology for development;
- Use static data types;
- Keep documentation up to date;
- Always run tests `tools\run_development.py --yaml --silent`;
- Always run tests `./tools/run_development.py --yaml --silent`;