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(find:*)",
"Bash(godot:*)", "Bash(godot:*)",
"Bash(python:*)", "Bash(python:*)",
"Bash(git mv:*)" "Bash(git mv:*)",
"Bash(dir:*)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []

View File

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

View File

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