mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
CI: Sync configuration with 4.4 branch
Includes cherry-pick of warning fixes from8d1462c748and template builds unit tests fixes from17929a3443. Also a Windows MSVC detection fix for SCons 4.6.0+ fromf682406cf2.
This commit is contained in:
8
.github/actions/download-artifact/action.yml
vendored
8
.github/actions/download-artifact/action.yml
vendored
@@ -1,15 +1,17 @@
|
||||
name: Download Godot artifact
|
||||
description: Download the Godot artifact.
|
||||
|
||||
inputs:
|
||||
name:
|
||||
description: The artifact name.
|
||||
default: "${{ github.job }}"
|
||||
default: ${{ github.job }}
|
||||
path:
|
||||
description: The path to download and extract to.
|
||||
required: true
|
||||
default: "./"
|
||||
default: ./
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
- name: Download Godot Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
24
.github/actions/godot-api-dump/action.yml
vendored
24
.github/actions/godot-api-dump/action.yml
vendored
@@ -1,24 +0,0 @@
|
||||
name: Dump Godot API
|
||||
description: Dump Godot API for GDExtension
|
||||
inputs:
|
||||
bin:
|
||||
description: The path to the Godot executable
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
# Dump GDExtension interface and API
|
||||
- name: Dump GDExtension interface and API for godot-cpp build
|
||||
shell: sh
|
||||
run: |
|
||||
${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
|
||||
mkdir godot-api
|
||||
cp -f gdextension_interface.h godot-api/
|
||||
cp -f extension_api.json godot-api/
|
||||
|
||||
- name: Upload API dump
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: 'godot-api-dump'
|
||||
path: './godot-api/*'
|
||||
|
||||
36
.github/actions/godot-build/action.yml
vendored
36
.github/actions/godot-build/action.yml
vendored
@@ -1,36 +1,52 @@
|
||||
name: Build Godot
|
||||
description: Build Godot with the provided options.
|
||||
|
||||
inputs:
|
||||
target:
|
||||
description: Build target (editor, template_release, template_debug).
|
||||
default: "editor"
|
||||
default: editor
|
||||
tests:
|
||||
description: Unit tests.
|
||||
default: false
|
||||
required: false
|
||||
platform:
|
||||
description: Target platform.
|
||||
required: false
|
||||
sconsflags:
|
||||
description: Additional SCons flags.
|
||||
default: ""
|
||||
required: false
|
||||
scons-cache:
|
||||
description: The scons cache path.
|
||||
default: "${{ github.workspace }}/.scons-cache/"
|
||||
description: The SCons cache path.
|
||||
default: ${{ github.workspace }}/.scons_cache/
|
||||
scons-cache-limit:
|
||||
description: The scons cache size limit.
|
||||
description: The SCons cache size limit.
|
||||
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk.
|
||||
# Limit to 7 GiB to avoid having the extracted cache fill the disk.
|
||||
default: 7168
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
- name: Scons Build
|
||||
- name: SCons Build
|
||||
shell: sh
|
||||
env:
|
||||
SCONSFLAGS: ${{ inputs.sconsflags }}
|
||||
SCONS_CACHE: ${{ inputs.scons-cache }}
|
||||
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
|
||||
SCONSFLAGS: ${{ inputs.sconsflags }}
|
||||
SCONS_CACHE: ${{ inputs.scons-cache }}
|
||||
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
|
||||
run: |
|
||||
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
|
||||
if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; fi # Ensure we don't include editor code.
|
||||
|
||||
if [ "${{ inputs.target }}" != "editor" ]; then
|
||||
# Ensure we don't include editor code in export template builds.
|
||||
rm -rf editor
|
||||
fi
|
||||
|
||||
if [ "${{ github.event.number }}" != "" ]; then
|
||||
# Set build identifier with pull request number if available. This is displayed throughout the editor.
|
||||
export BUILD_NAME="gh-${{ github.event.number }}"
|
||||
else
|
||||
export BUILD_NAME="gh"
|
||||
fi
|
||||
|
||||
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
|
||||
ls -l bin/
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
name: Setup Godot build cache
|
||||
description: Setup Godot build cache.
|
||||
name: Restore Godot build cache
|
||||
description: Restore Godot build cache.
|
||||
inputs:
|
||||
cache-name:
|
||||
description: The cache base name (job name by default).
|
||||
default: "${{github.job}}"
|
||||
default: ${{ github.job }}
|
||||
scons-cache:
|
||||
description: The scons cache path.
|
||||
default: "${{github.workspace}}/.scons-cache/"
|
||||
description: The SCons cache path.
|
||||
default: ${{ github.workspace }}/.scons_cache/
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
uses: actions/cache@v4
|
||||
- name: Restore SCons cache directory
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{inputs.scons-cache}}
|
||||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
path: ${{ inputs.scons-cache }}
|
||||
key: ${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
||||
|
||||
# We try to match an existing cache to restore from it. Each potential key is checked against
|
||||
# all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that
|
||||
@@ -29,7 +29,7 @@ runs:
|
||||
# 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch).
|
||||
|
||||
restore-keys: |
|
||||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-refs/heads/${{env.GODOT_BASE_BRANCH}}
|
||||
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}
|
||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}
|
||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-refs/heads/${{ env.GODOT_BASE_BRANCH }}
|
||||
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}
|
||||
18
.github/actions/godot-cache-save/action.yml
vendored
Normal file
18
.github/actions/godot-cache-save/action.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Save Godot build cache
|
||||
description: Save Godot build cache.
|
||||
inputs:
|
||||
cache-name:
|
||||
description: The cache base name (job name by default).
|
||||
default: ${{ github.job }}
|
||||
scons-cache:
|
||||
description: The SCons cache path.
|
||||
default: ${{ github.workspace }}/.scons_cache/
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Save SCons cache directory
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ inputs.scons-cache }}
|
||||
key: ${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
|
||||
@@ -1,11 +1,13 @@
|
||||
name: Test Godot project converter
|
||||
description: Test the Godot project converter.
|
||||
|
||||
inputs:
|
||||
bin:
|
||||
description: The path to the Godot executable
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
- name: Test 3-to-4 conversion
|
||||
shell: sh
|
||||
|
||||
40
.github/actions/godot-cpp-build/action.yml
vendored
Normal file
40
.github/actions/godot-cpp-build/action.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Build godot-cpp
|
||||
description: Build godot-cpp with the provided options.
|
||||
|
||||
inputs:
|
||||
bin:
|
||||
description: Path to the Godot binary.
|
||||
required: true
|
||||
type: string
|
||||
scons-flags:
|
||||
description: Additional SCons flags.
|
||||
type: string
|
||||
scons-cache:
|
||||
description: The SCons cache path.
|
||||
default: ${{ github.workspace }}/.scons_cache/
|
||||
type: string
|
||||
godot-cpp-branch:
|
||||
description: The godot-cpp branch.
|
||||
default: master
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
repository: godotengine/godot-cpp
|
||||
ref: ${{ inputs.godot-cpp-branch }}
|
||||
path: godot-cpp
|
||||
|
||||
- name: Extract API
|
||||
shell: sh
|
||||
run: ${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
|
||||
|
||||
- name: SCons Build
|
||||
shell: sh
|
||||
env:
|
||||
SCONS_CACHE: ${{ inputs.scons-cache }}
|
||||
run: scons --directory=./godot-cpp/test "gdextension_dir=${{ github.workspace }}" ${{ inputs.scons-flags }}
|
||||
28
.github/actions/godot-deps/action.yml
vendored
28
.github/actions/godot-deps/action.yml
vendored
@@ -1,27 +1,31 @@
|
||||
name: Setup python and scons
|
||||
description: Setup python, install the pip version of scons.
|
||||
name: Setup Python and SCons
|
||||
description: Setup Python, install the pip version of SCons.
|
||||
|
||||
inputs:
|
||||
python-version:
|
||||
description: The python version to use.
|
||||
default: "3.x"
|
||||
description: The Python version to use.
|
||||
default: 3.x
|
||||
python-arch:
|
||||
description: The python architecture.
|
||||
default: "x64"
|
||||
description: The Python architecture.
|
||||
default: x64
|
||||
scons-version:
|
||||
description: The SCons version to use.
|
||||
default: 4.8.1
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
# Semantic version range syntax or exact version of a Python version.
|
||||
python-version: ${{ inputs.python-version }}
|
||||
# Optional - x64 or x86 architecture, defaults to x64
|
||||
# Optional - x64 or x86 architecture, defaults to x64.
|
||||
architecture: ${{ inputs.python-arch }}
|
||||
|
||||
- name: Setup scons
|
||||
- name: Setup SCons
|
||||
shell: bash
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons==4.4.0
|
||||
python -m pip install scons==${{ inputs.scons-version }}
|
||||
scons --version
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
name: Test Godot project
|
||||
description: Run the test Godot project.
|
||||
|
||||
inputs:
|
||||
bin:
|
||||
description: The path to the Godot executable
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
|
||||
- name: Download test project
|
||||
|
||||
11
.github/actions/upload-artifact/action.yml
vendored
11
.github/actions/upload-artifact/action.yml
vendored
@@ -1,19 +1,22 @@
|
||||
name: Upload Godot artifact
|
||||
description: Upload the Godot artifact.
|
||||
|
||||
inputs:
|
||||
name:
|
||||
description: The artifact name.
|
||||
default: "${{ github.job }}"
|
||||
default: ${{ github.job }}
|
||||
path:
|
||||
description: The path to upload.
|
||||
required: true
|
||||
default: "bin/*"
|
||||
default: bin/*
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
- name: Upload Godot Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
path: ${{ inputs.path }}
|
||||
retention-days: 14
|
||||
# Default is 90 days.
|
||||
retention-days: 60
|
||||
|
||||
Reference in New Issue
Block a user