mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Merge pull request #98940 from akien-mga/3.3-ci-sync-with-3.x
Some checks failed
🔗 GHA / 📊 Static (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🌐 JavaScript (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / ☁ Server (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🌐 JavaScript (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / ☁ Server (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
[3.3] CI: Partially sync workflows and actions with 3.x branch
This commit is contained in:
commit
29cfe16237
38
.github/actions/godot-build/action.yml
vendored
Normal file
38
.github/actions/godot-build/action.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Build Godot
|
||||||
|
description: Build Godot with the provided options.
|
||||||
|
inputs:
|
||||||
|
target:
|
||||||
|
description: The scons target (debug/release_debug/release).
|
||||||
|
default: "debug"
|
||||||
|
tools:
|
||||||
|
description: If tools are to be built.
|
||||||
|
default: false
|
||||||
|
tests:
|
||||||
|
description: If tests are to be built.
|
||||||
|
default: false
|
||||||
|
platform:
|
||||||
|
description: The Godot platform to build.
|
||||||
|
required: false
|
||||||
|
sconsflags:
|
||||||
|
default: ""
|
||||||
|
scons-cache:
|
||||||
|
description: The scons cache path.
|
||||||
|
default: "${{ github.workspace }}/.scons-cache/"
|
||||||
|
scons-cache-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"
|
||||||
|
steps:
|
||||||
|
- name: Scons Build
|
||||||
|
shell: sh
|
||||||
|
env:
|
||||||
|
SCONSFLAGS: ${{ inputs.sconsflags }}
|
||||||
|
SCONS_CACHE: ${{ inputs.scons-cache }}
|
||||||
|
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
|
||||||
|
run: |
|
||||||
|
echo "Building with flags:" ${{ env.SCONSFLAGS }}
|
||||||
|
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
|
||||||
|
ls -l bin/
|
21
.github/actions/godot-cache-restore/action.yml
vendored
Normal file
21
.github/actions/godot-cache-restore/action.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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}}"
|
||||||
|
scons-cache:
|
||||||
|
description: The scons cache path.
|
||||||
|
default: "${{github.workspace}}/.scons-cache/"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- 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}}
|
||||||
|
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}}
|
17
.github/actions/godot-cache-save/action.yml
vendored
Normal file
17
.github/actions/godot-cache-save/action.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
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}}
|
27
.github/actions/godot-deps/action.yml
vendored
Normal file
27
.github/actions/godot-deps/action.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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"
|
||||||
|
python-arch:
|
||||||
|
description: The python architecture.
|
||||||
|
default: "x64"
|
||||||
|
runs:
|
||||||
|
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
|
||||||
|
python-version: ${{ inputs.python-version }}
|
||||||
|
# Optional - x64 or x86 architecture, defaults to x64
|
||||||
|
architecture: ${{ inputs.python-arch }}
|
||||||
|
|
||||||
|
- name: Setup scons
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
python -c "import sys; print(sys.version)"
|
||||||
|
python -m pip install scons==4.7.0
|
||||||
|
scons --version
|
19
.github/actions/upload-artifact/action.yml
vendored
Normal file
19
.github/actions/upload-artifact/action.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: Upload Godot artifact
|
||||||
|
description: Upload the Godot artifact.
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: The artifact name.
|
||||||
|
default: "${{ github.job }}"
|
||||||
|
path:
|
||||||
|
description: The path to upload.
|
||||||
|
required: true
|
||||||
|
default: "bin/*"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Upload Godot Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.name }}
|
||||||
|
path: ${{ inputs.path }}
|
||||||
|
retention-days: 14
|
78
.github/workflows/android_builds.yml
vendored
78
.github/workflows/android_builds.yml
vendored
@ -1,76 +1,64 @@
|
|||||||
name: 🤖 Android Builds
|
name: 🤖 Android Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=android verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-android
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
android-template:
|
android-template:
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-20.04"
|
||||||
|
|
||||||
name: Template (target=release, tools=no)
|
name: Template (target=release, tools=no)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
|
||||||
run: |
|
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
- name: Set up Java 11
|
- name: Set up Java 11
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore Godot build cache
|
||||||
- name: Load .scons_cache directory
|
uses: ./.github/actions/godot-cache-restore
|
||||||
id: android-template-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
- name: Setup python and scons
|
||||||
- name: Set up Python 3.x
|
uses: ./.github/actions/godot-deps
|
||||||
uses: actions/setup-python@v5
|
|
||||||
|
- name: Compilation (armv7)
|
||||||
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a Python version
|
sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7
|
||||||
python-version: '3.x'
|
platform: android
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
target: release
|
||||||
architecture: 'x64'
|
tools: false
|
||||||
|
|
||||||
- name: Configuring Python packages
|
- name: Compilation (arm64v8)
|
||||||
run: |
|
uses: ./.github/actions/godot-build
|
||||||
python -c "import sys; print(sys.version)"
|
with:
|
||||||
python -m pip install scons
|
sconsflags: ${{ env.SCONSFLAGS }} android_arch=arm64v8
|
||||||
python --version
|
platform: android
|
||||||
scons --version
|
target: release
|
||||||
|
tools: false
|
||||||
|
|
||||||
- name: Compilation
|
- name: Save Godot build cache
|
||||||
env:
|
uses: ./.github/actions/godot-cache-save
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Generate Godot templates
|
||||||
run: |
|
run: |
|
||||||
scons target=release tools=no android_arch=armv7
|
|
||||||
scons target=release tools=no android_arch=arm64v8
|
|
||||||
cd platform/android/java
|
cd platform/android/java
|
||||||
./gradlew generateGodotTemplates
|
./gradlew generateGodotTemplates
|
||||||
cd ../../..
|
cd ../../..
|
||||||
ls -l bin/
|
ls -l bin/
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Upload artifact
|
||||||
with:
|
uses: ./.github/actions/upload-artifact
|
||||||
name: ${{ github.job }}
|
|
||||||
path: bin/*
|
|
||||||
retention-days: 14
|
|
||||||
|
64
.github/workflows/ios_builds.yml
vendored
64
.github/workflows/ios_builds.yml
vendored
@ -1,11 +1,16 @@
|
|||||||
name: 🍏 iOS Builds
|
name: 🍏 iOS Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=iphone verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-ios
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ios-template:
|
ios-template:
|
||||||
@ -15,45 +20,24 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore Godot build cache
|
||||||
- name: Load .scons_cache directory
|
uses: ./.github/actions/godot-cache-restore
|
||||||
id: ios-template-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
- name: Setup python and scons
|
||||||
- name: Set up Python 3.x
|
uses: ./.github/actions/godot-deps
|
||||||
uses: actions/setup-python@v5
|
|
||||||
|
- name: Compilation (arm64v8)
|
||||||
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a Python version
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
python-version: '3.x'
|
platform: iphone
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
target: release
|
||||||
architecture: 'x64'
|
tools: false
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
- name: Save Godot build cache
|
||||||
- name: Configuring Python packages
|
uses: ./.github/actions/godot-cache-save
|
||||||
run: |
|
continue-on-error: true
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Compilation
|
- name: Upload artifact
|
||||||
env:
|
uses: ./.github/actions/upload-artifact
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons target=release tools=no
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ github.job }}
|
|
||||||
path: bin/*
|
|
||||||
retention-days: 14
|
|
||||||
|
88
.github/workflows/javascript_builds.yml
vendored
88
.github/workflows/javascript_builds.yml
vendored
@ -1,13 +1,18 @@
|
|||||||
name: 🌐 JavaScript Builds
|
name: 🌐 JavaScript Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=javascript verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
EM_VERSION: 2.0.15
|
EM_VERSION: 2.0.15
|
||||||
EM_CACHE_FOLDER: 'emsdk-cache'
|
EM_CACHE_FOLDER: "emsdk-cache"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-javascript
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
javascript-template:
|
javascript-template:
|
||||||
@ -17,70 +22,35 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
|
||||||
run: |
|
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: javascript-template-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
# Additional cache for Emscripten generated system libraries
|
|
||||||
- name: Load Emscripten cache
|
|
||||||
id: javascript-template-emscripten-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{env.EM_CACHE_FOLDER}}
|
|
||||||
key: ${{env.EM_VERSION}}-${{github.job}}
|
|
||||||
|
|
||||||
# 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
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Set up Emscripten latest
|
- name: Set up Emscripten latest
|
||||||
uses: mymindstorm/setup-emsdk@v14
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
with:
|
with:
|
||||||
version: ${{env.EM_VERSION}}
|
version: ${{env.EM_VERSION}}
|
||||||
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
||||||
|
cache-key: emsdk-${{ matrix.cache-name }}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||||
|
|
||||||
- name: Verify Emscripten setup
|
- name: Verify Emscripten setup
|
||||||
run: |
|
run: |
|
||||||
emcc -v
|
emcc -v
|
||||||
|
|
||||||
- name: Compilation
|
- name: Restore Godot build cache
|
||||||
env:
|
uses: ./.github/actions/godot-cache-restore
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
continue-on-error: true
|
||||||
run: |
|
|
||||||
scons target=release tools=no use_closure_compiler=yes
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Setup python and scons
|
||||||
|
uses: ./.github/actions/godot-deps
|
||||||
|
|
||||||
|
- name: Compilation
|
||||||
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
path: bin/*
|
platform: javascript
|
||||||
retention-days: 14
|
target: release
|
||||||
|
tools: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: ./.github/actions/upload-artifact
|
||||||
|
279
.github/workflows/linux_builds.yml
vendored
279
.github/workflows/linux_builds.yml
vendored
@ -1,204 +1,118 @@
|
|||||||
name: 🐧 Linux Builds
|
name: 🐧 Linux Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=linuxbsd verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux-editor-mono:
|
build-linux:
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-20.04"
|
||||||
name: Editor w/ Mono (target=release_debug, tools=yes)
|
name: ${{ matrix.name }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: Editor w/ Mono (target=release_debug, tools=yes)
|
||||||
|
cache-name: linux-editor-mono
|
||||||
|
target: release_debug
|
||||||
|
tools: true
|
||||||
|
sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no
|
||||||
|
bin: "./bin/godot.x11.opt.tools.64.mono"
|
||||||
|
build-mono: true
|
||||||
|
artifact: true
|
||||||
|
|
||||||
|
- name: Editor and sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes, linker=gold)
|
||||||
|
cache-name: linux-editor-sanitizers
|
||||||
|
target: debug
|
||||||
|
tools: true
|
||||||
|
sconsflags: use_asan=yes use_ubsan=yes linker=gold
|
||||||
|
test: true
|
||||||
|
bin: "./bin/godot.x11.tools.64s"
|
||||||
|
build-mono: false
|
||||||
|
# Skip 2GiB artifact speeding up action.
|
||||||
|
artifact: false
|
||||||
|
|
||||||
|
- name: Template w/ Mono (target=release, tools=no)
|
||||||
|
cache-name: linux-template-mono
|
||||||
|
target: release
|
||||||
|
tools: false
|
||||||
|
sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no debug_symbols=no
|
||||||
|
build-mono: false
|
||||||
|
artifact: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
- name: Linux dependencies
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
# Azure repositories are flaky, remove them.
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
sudo rm -f /etc/apt/sources.list.d/{azure,microsoft}*
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
# The actual dependencies.
|
||||||
|
sudo apt-get install --no-install-recommends build-essential pkg-config libx11-dev \
|
||||||
|
libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev \
|
||||||
|
libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
||||||
|
|
||||||
# Install all packages (except scons)
|
- name: Free disk space on runner
|
||||||
- name: Configure dependencies
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev xvfb \
|
echo "Disk usage before:" && df -h
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
echo "Disk usage after:" && df -h
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore Godot build cache
|
||||||
- name: Load .scons_cache directory
|
uses: ./.github/actions/godot-cache-restore
|
||||||
id: linux-editor-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
- name: Setup python and scons
|
||||||
- name: Set up Python 3.x
|
uses: ./.github/actions/godot-deps
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
|
- name: Setup GCC problem matcher
|
||||||
- name: Configuring Python packages
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
env:
|
uses: ./.github/actions/godot-build
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons tools=yes target=release_debug module_mono_enabled=yes mono_glue=no
|
|
||||||
xvfb-run ./bin/godot.x11.opt.tools.64.mono --generate-mono-glue modules/mono/glue || true
|
|
||||||
scons tools=yes target=release_debug module_mono_enabled=yes mono_glue=yes
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
||||||
path: bin/*
|
platform: linuxbsd
|
||||||
retention-days: 14
|
target: ${{ matrix.target }}
|
||||||
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
linux-template-mono:
|
- name: Save Godot build cache
|
||||||
runs-on: "ubuntu-20.04"
|
uses: ./.github/actions/godot-cache-save
|
||||||
name: Template w/ Mono (target=release, tools=no)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
|
||||||
run: |
|
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
# Install all packages (except scons)
|
|
||||||
- name: Configure dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: linux-template-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
# Generate mono glue
|
||||||
- name: Set up Python 3.x
|
- name: Generate Mono glue code
|
||||||
uses: actions/setup-python@v5
|
if: ${{ matrix.build-mono }}
|
||||||
|
run: |
|
||||||
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true
|
||||||
|
|
||||||
|
# Rebuild with mono
|
||||||
|
- name: Compilation (mono_glue=yes)
|
||||||
|
uses: ./.github/actions/godot-build
|
||||||
|
if: ${{ matrix.build-mono }}
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a Python version
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes
|
||||||
python-version: '3.x'
|
platform: linuxbsd
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
target: ${{ matrix.target }}
|
||||||
architecture: 'x64'
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
|
||||||
- name: Configuring Python packages
|
- name: Download test project
|
||||||
run: |
|
if: ${{ matrix.test }}
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Compilation
|
|
||||||
env:
|
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons target=release tools=no module_mono_enabled=yes mono_glue=no
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ github.job }}
|
|
||||||
path: bin/*
|
|
||||||
retention-days: 14
|
|
||||||
|
|
||||||
linux-editor-sanitizers:
|
|
||||||
runs-on: "ubuntu-20.04"
|
|
||||||
name: Editor and exported project with sanitizers (target=debug/release, tools=yes/no, use_ubsan=yes, use_asan=yes)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
|
||||||
run: |
|
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
# Install all packages (except scons)
|
|
||||||
- name: Configure dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \
|
|
||||||
xvfb wget2 unzip
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: linux-sanitizer-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
|
||||||
- name: Set up Python 3.x
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
|
||||||
- name: Compilation
|
|
||||||
env:
|
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons tools=yes target=debug use_asan=yes use_ubsan=yes
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
# Download test project
|
|
||||||
# CI has no audio device, so use the Dummy audio driver to avoid spurious error messages.
|
|
||||||
- name: Download project
|
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/godotengine/regression-test-project/archive/3.3.zip
|
wget https://github.com/godotengine/regression-test-project/archive/3.3.zip
|
||||||
unzip 3.3.zip
|
unzip 3.3.zip
|
||||||
@ -206,20 +120,35 @@ jobs:
|
|||||||
|
|
||||||
# Editor is quite complicated piece of software, so it is easy to introduce bug here
|
# Editor is quite complicated piece of software, so it is easy to introduce bug here
|
||||||
- name: Open and close editor
|
- name: Open and close editor
|
||||||
|
if: ${{ matrix.test }}
|
||||||
run: |
|
run: |
|
||||||
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
|
||||||
misc/scripts/check_ci_log.py sanitizers_log.txt
|
misc/scripts/check_ci_log.py sanitizers_log.txt
|
||||||
|
|
||||||
# Run test project
|
# Run test project
|
||||||
- name: Run project
|
- name: Run project
|
||||||
|
if: ${{ matrix.test }}
|
||||||
run: |
|
run: |
|
||||||
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s 30 --video-driver GLES3 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} 30 --video-driver GLES3 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
|
||||||
misc/scripts/check_ci_log.py sanitizers_log.txt
|
misc/scripts/check_ci_log.py sanitizers_log.txt
|
||||||
|
|
||||||
# Check class reference
|
# Check class reference
|
||||||
- name: Check for class reference updates
|
- name: Check for class reference updates
|
||||||
|
if: ${{ matrix.test }}
|
||||||
run: |
|
run: |
|
||||||
echo "Running --doctool to see if this changes the public API without updating the documentation."
|
echo "Running --doctool to see if this changes the public API without updating the documentation."
|
||||||
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
|
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
|
||||||
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s --doctool . 2>&1 > /dev/null || true
|
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --doctool . 2>&1 > /dev/null || true
|
||||||
git diff --color --exit-code
|
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
if: ${{ matrix.artifact }}
|
||||||
|
run: |
|
||||||
|
strip bin/godot.*
|
||||||
|
chmod +x bin/godot.*
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: ./.github/actions/upload-artifact
|
||||||
|
if: ${{ matrix.artifact }}
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.cache-name }}
|
||||||
|
127
.github/workflows/macos_builds.yml
vendored
127
.github/workflows/macos_builds.yml
vendored
@ -1,111 +1,68 @@
|
|||||||
name: 🍎 macOS Builds
|
name: 🍎 macOS Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=osx verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
macos-editor:
|
build-macos:
|
||||||
runs-on: "macos-latest"
|
runs-on: "macos-latest"
|
||||||
|
name: ${{ matrix.name }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: Editor (target=release_debug, tools=yes)
|
||||||
|
cache-name: macos-editor
|
||||||
|
target: release_debug
|
||||||
|
tools: true
|
||||||
|
bin: "./bin/godot.osx.opt.tools.64"
|
||||||
|
|
||||||
name: Editor (target=release_debug, tools=yes)
|
- name: Template (target=release, tools=no)
|
||||||
|
cache-name: macos-template
|
||||||
|
target: release
|
||||||
|
tools: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore Godot build cache
|
||||||
- name: Load .scons_cache directory
|
uses: ./.github/actions/godot-cache-restore
|
||||||
id: macos-editor-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
- name: Setup python and scons
|
||||||
- name: Set up Python 3.x
|
uses: ./.github/actions/godot-deps
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
env:
|
uses: ./.github/actions/godot-build
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons tools=yes target=release_debug
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
path: bin/*
|
platform: osx
|
||||||
retention-days: 14
|
target: ${{ matrix.target }}
|
||||||
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
macos-template:
|
- name: Save Godot build cache
|
||||||
runs-on: "macos-latest"
|
uses: ./.github/actions/godot-cache-save
|
||||||
name: Template (target=release, tools=no)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: macos-template-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
- name: Prepare artifact
|
||||||
- name: Set up Python 3.x
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
run: |
|
||||||
python -c "import sys; print(sys.version)"
|
strip bin/godot.*
|
||||||
python -m pip install scons
|
chmod +x bin/godot.*
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Compilation
|
- name: Upload artifact
|
||||||
env:
|
uses: ./.github/actions/upload-artifact
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons target=release tools=no
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
name: ${{ matrix.cache-name }}
|
||||||
path: bin/*
|
|
||||||
retention-days: 14
|
|
||||||
|
46
.github/workflows/runner.yml
vendored
Normal file
46
.github/workflows/runner.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: 🔗 GHA
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-runner
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
static-checks:
|
||||||
|
name: 📊 Static
|
||||||
|
uses: ./.github/workflows/static_checks.yml
|
||||||
|
|
||||||
|
android-build:
|
||||||
|
name: 🤖 Android
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/android_builds.yml
|
||||||
|
|
||||||
|
ios-build:
|
||||||
|
name: 🍏 iOS
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/ios_builds.yml
|
||||||
|
|
||||||
|
javascript-build:
|
||||||
|
name: 🌐 JavaScript
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/javascript_builds.yml
|
||||||
|
|
||||||
|
linux-build:
|
||||||
|
name: 🐧 Linux
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/linux_builds.yml
|
||||||
|
|
||||||
|
macos-build:
|
||||||
|
name: 🍎 macOS
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/macos_builds.yml
|
||||||
|
|
||||||
|
server-build:
|
||||||
|
name: ☁ Server
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/server_builds.yml
|
||||||
|
|
||||||
|
windows-build:
|
||||||
|
name: 🏁 Windows
|
||||||
|
needs: static-checks
|
||||||
|
uses: ./.github/workflows/windows_builds.yml
|
146
.github/workflows/server_builds.yml
vendored
146
.github/workflows/server_builds.yml
vendored
@ -1,120 +1,68 @@
|
|||||||
name: ☁ Server Builds
|
name: ☁ Server Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Cache Settings
|
# Global Settings
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=server verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no module_mono_enabled=yes mono_static=yes mono_glue=no
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-server
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux-editor:
|
build-server:
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-20.04"
|
||||||
name: Linux Headless w/ Mono (target=release_debug, tools=yes)
|
name: ${{ matrix.name }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: Linux Headless w/ Mono (target=release_debug, tools=yes)
|
||||||
|
cache-name: server-editor-mono
|
||||||
|
target: release_debug
|
||||||
|
tools: true
|
||||||
|
|
||||||
|
- name: Linux Server w/ Mono (target=release, tools=no)
|
||||||
|
cache-name: server-template-mono
|
||||||
|
target: release
|
||||||
|
tools: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
- name: Linux dependencies
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
# Azure repositories are flaky, remove them.
|
||||||
|
sudo rm -f /etc/apt/sources.list.d/{azure,microsoft}*
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
# The actual dependencies.
|
||||||
|
sudo apt-get install --no-install-recommends build-essential pkg-config libx11-dev \
|
||||||
|
libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev \
|
||||||
|
libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
||||||
|
|
||||||
# Install all packages (except scons)
|
- name: Restore Godot build cache
|
||||||
- name: Configure dependencies
|
uses: ./.github/actions/godot-cache-restore
|
||||||
run: |
|
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: linux-headless-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
- name: Setup python and scons
|
||||||
- name: Set up Python 3.x
|
uses: ./.github/actions/godot-deps
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
env:
|
uses: ./.github/actions/godot-build
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons -j2 verbose=yes warnings=all werror=yes platform=server tools=yes target=release_debug module_mono_enabled=yes mono_glue=no
|
|
||||||
|
|
||||||
linux-server:
|
|
||||||
runs-on: "ubuntu-20.04"
|
|
||||||
name: Linux Server w/ Mono (target=release, tools=no)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
|
||||||
run: |
|
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
# Install all packages (except scons)
|
|
||||||
- name: Configure dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: linux-server-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/.scons_cache/
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
platform: server
|
||||||
restore-keys: |
|
target: ${{ matrix.target }}
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
tools: ${{ matrix.tools }}
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
with:
|
||||||
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# 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
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Compilation
|
|
||||||
env:
|
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons -j2 target=release tools=no module_mono_enabled=yes mono_glue=no
|
|
||||||
|
33
.github/workflows/static_checks.yml
vendored
33
.github/workflows/static_checks.yml
vendored
@ -1,36 +1,33 @@
|
|||||||
name: 📊 Static Checks
|
name: 📊 Static Checks
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-static
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
static-checks:
|
static-checks:
|
||||||
name: Static Checks (clang-format, black format, file format, documentation checks)
|
name: Static Checks (clang-format, black format, file format, documentation checks)
|
||||||
runs-on: ubuntu-20.04
|
runs-on: "ubuntu-20.04"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Azure repositories are not reliable, we need to prevent Azure giving us packages.
|
|
||||||
- name: Make apt sources.list use the default Ubuntu repositories
|
|
||||||
run: |
|
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -qq dos2unix recode clang-format-11
|
# Azure repositories are flaky, remove them.
|
||||||
sudo update-alternatives --remove-all clang-format
|
sudo rm -f /etc/apt/sources.list.d/{azure,microsoft}*
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -qq dos2unix python3-pip moreutils
|
||||||
|
sudo update-alternatives --remove-all clang-format || true
|
||||||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 100
|
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 100
|
||||||
sudo pip3 install black==20.8b1 pygments
|
sudo pip3 install black==24.8.0 pygments
|
||||||
|
|
||||||
- name: File formatting checks (file_format.sh)
|
- name: File formatting checks (file_format.sh)
|
||||||
run: |
|
run: |
|
||||||
bash ./misc/scripts/file_format.sh
|
bash ./misc/scripts/file_format.sh
|
||||||
|
|
||||||
- name: Style checks via clang-format (clang_format.sh)
|
|
||||||
run: |
|
|
||||||
bash ./misc/scripts/clang_format.sh
|
|
||||||
|
|
||||||
- name: Python style checks via black (black_format.sh)
|
- name: Python style checks via black (black_format.sh)
|
||||||
run: |
|
run: |
|
||||||
bash ./misc/scripts/black_format.sh
|
bash ./misc/scripts/black_format.sh
|
||||||
@ -45,3 +42,7 @@ jobs:
|
|||||||
- name: Documentation checks
|
- name: Documentation checks
|
||||||
run: |
|
run: |
|
||||||
doc/tools/makerst.py --dry-run doc/classes modules
|
doc/tools/makerst.py --dry-run doc/classes modules
|
||||||
|
|
||||||
|
- name: Style checks via clang-format (clang_format.sh)
|
||||||
|
run: |
|
||||||
|
bash ./misc/scripts/clang_format.sh
|
||||||
|
130
.github/workflows/windows_builds.yml
vendored
130
.github/workflows/windows_builds.yml
vendored
@ -1,117 +1,73 @@
|
|||||||
name: 🏁 Windows Builds
|
name: 🏁 Windows Builds
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
# Global Settings
|
# Global Settings
|
||||||
# SCONS_CACHE for windows must be set in the build environment
|
# SCONS_CACHE for windows must be set in the build environment
|
||||||
env:
|
env:
|
||||||
|
# Only used for the cache key. Increment version to force clean build.
|
||||||
GODOT_BASE_BRANCH: 3.3
|
GODOT_BASE_BRANCH: 3.3
|
||||||
SCONSFLAGS: platform=windows verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
SCONS_CACHE_MSVC_CONFIG: true
|
SCONS_CACHE_MSVC_CONFIG: true
|
||||||
SCONS_CACHE_LIMIT: 4096
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows-editor:
|
build-windows:
|
||||||
# Windows 10 with latest image
|
# Windows 10 with latest image
|
||||||
runs-on: "windows-latest"
|
runs-on: "windows-latest"
|
||||||
|
name: ${{ matrix.name }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: Editor (target=release_debug, tools=yes)
|
||||||
|
cache-name: windows-editor
|
||||||
|
target: release_debug
|
||||||
|
tools: true
|
||||||
|
bin: "./bin/godot.windows.opt.tools.64.exe"
|
||||||
|
|
||||||
# Windows Editor - checkout with the plugin
|
- name: Template (target=release, tools=no)
|
||||||
name: Editor (target=release_debug, tools=yes)
|
cache-name: windows-template
|
||||||
|
target: release
|
||||||
|
tools: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore Godot build cache
|
||||||
# Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
|
uses: ./.github/actions/godot-cache-restore
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: windows-editor-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: /.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
- name: Setup python and scons
|
||||||
- name: Set up Python 3.x
|
uses: ./.github/actions/godot-deps
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
|
- name: Setup MSVC problem matcher
|
||||||
- name: Configuring Python packages
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
run: |
|
|
||||||
python -c "import sys; print(sys.version)"
|
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
env:
|
uses: ./.github/actions/godot-build
|
||||||
SCONS_CACHE: /.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons tools=yes target=release_debug
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
path: bin/*
|
platform: windows
|
||||||
retention-days: 14
|
target: ${{ matrix.target }}
|
||||||
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
windows-template:
|
- name: Save Godot build cache
|
||||||
runs-on: "windows-latest"
|
uses: ./.github/actions/godot-cache-save
|
||||||
name: Template (target=release, tools=no)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Upload cache on completion and check it out now
|
|
||||||
# Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
|
|
||||||
- name: Load .scons_cache directory
|
|
||||||
id: windows-template-cache
|
|
||||||
uses: RevoluPowered/cache@v4.1
|
|
||||||
with:
|
with:
|
||||||
path: /.scons_cache/
|
cache-name: ${{ matrix.cache-name }}
|
||||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
|
||||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# Use python 3.x release (works cross platform)
|
- name: Prepare artifact
|
||||||
- name: Set up Python 3.x
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
# Optional - x64 or x86 architecture, defaults to x64
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
|
||||||
- name: Configuring Python packages
|
|
||||||
run: |
|
run: |
|
||||||
python -c "import sys; print(sys.version)"
|
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||||
python -m pip install scons
|
|
||||||
python --version
|
|
||||||
scons --version
|
|
||||||
|
|
||||||
- name: Compilation
|
- name: Upload artifact
|
||||||
env:
|
uses: ./.github/actions/upload-artifact
|
||||||
SCONS_CACHE: /.scons_cache/
|
|
||||||
run: |
|
|
||||||
scons target=release tools=no
|
|
||||||
ls -l bin/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
name: ${{ matrix.cache-name }}
|
||||||
path: bin/*
|
|
||||||
retention-days: 14
|
|
||||||
|
@ -43,7 +43,6 @@ if sys.version_info < (3,):
|
|||||||
# Not properly equivalent to __qualname__ in py3, but it doesn't matter.
|
# Not properly equivalent to __qualname__ in py3, but it doesn't matter.
|
||||||
return obj.__name__
|
return obj.__name__
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
def isbasestring(s):
|
def isbasestring(s):
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
from compat import iteritems, itervalues, open_utf8, escape_string, byte_to_str
|
from compat import iteritems, itervalues, open_utf8, escape_string, byte_to_str
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ def escape_rst(text, until_pos=-1): # type: (str) -> str
|
|||||||
pos = text.find("*", pos, until_pos)
|
pos = text.find("*", pos, until_pos)
|
||||||
if pos == -1:
|
if pos == -1:
|
||||||
break
|
break
|
||||||
text = text[:pos] + "\*" + text[pos + 1 :]
|
text = text[:pos] + "\\*" + text[pos + 1 :]
|
||||||
pos += 2
|
pos += 2
|
||||||
|
|
||||||
# Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink
|
# Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink
|
||||||
@ -607,7 +607,7 @@ def escape_rst(text, until_pos=-1): # type: (str) -> str
|
|||||||
if pos == -1:
|
if pos == -1:
|
||||||
break
|
break
|
||||||
if not text[pos + 1].isalnum(): # don't escape within a snake_case word
|
if not text[pos + 1].isalnum(): # don't escape within a snake_case word
|
||||||
text = text[:pos] + "\_" + text[pos + 1 :]
|
text = text[:pos] + "\\_" + text[pos + 1 :]
|
||||||
pos += 2
|
pos += 2
|
||||||
else:
|
else:
|
||||||
pos += 1
|
pos += 1
|
||||||
@ -865,7 +865,7 @@ def rstize_text(text, state): # type: (str, State) -> str
|
|||||||
|
|
||||||
# Properly escape things like `[Node]s`
|
# Properly escape things like `[Node]s`
|
||||||
if escape_post and post_text and (post_text[0].isalnum() or post_text[0] == "("): # not punctuation, escape
|
if escape_post and post_text and (post_text[0].isalnum() or post_text[0] == "("): # not punctuation, escape
|
||||||
post_text = "\ " + post_text
|
post_text = "\\ " + post_text
|
||||||
|
|
||||||
next_brac_pos = post_text.find("[", 0)
|
next_brac_pos = post_text.find("[", 0)
|
||||||
iter_pos = 0
|
iter_pos = 0
|
||||||
@ -873,7 +873,7 @@ def rstize_text(text, state): # type: (str, State) -> str
|
|||||||
iter_pos = post_text.find("*", iter_pos, next_brac_pos)
|
iter_pos = post_text.find("*", iter_pos, next_brac_pos)
|
||||||
if iter_pos == -1:
|
if iter_pos == -1:
|
||||||
break
|
break
|
||||||
post_text = post_text[:iter_pos] + "\*" + post_text[iter_pos + 1 :]
|
post_text = post_text[:iter_pos] + "\\*" + post_text[iter_pos + 1 :]
|
||||||
iter_pos += 2
|
iter_pos += 2
|
||||||
|
|
||||||
iter_pos = 0
|
iter_pos = 0
|
||||||
@ -882,7 +882,7 @@ def rstize_text(text, state): # type: (str, State) -> str
|
|||||||
if iter_pos == -1:
|
if iter_pos == -1:
|
||||||
break
|
break
|
||||||
if not post_text[iter_pos + 1].isalnum(): # don't escape within a snake_case word
|
if not post_text[iter_pos + 1].isalnum(): # don't escape within a snake_case word
|
||||||
post_text = post_text[:iter_pos] + "\_" + post_text[iter_pos + 1 :]
|
post_text = post_text[:iter_pos] + "\\_" + post_text[iter_pos + 1 :]
|
||||||
iter_pos += 2
|
iter_pos += 2
|
||||||
else:
|
else:
|
||||||
iter_pos += 1
|
iter_pos += 1
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
from compat import StringIO
|
from compat import StringIO
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
|
|
||||||
|
|
||||||
@ -385,7 +386,7 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs, gles2
|
|||||||
x = header_data.enums[xv]
|
x = header_data.enums[xv]
|
||||||
bits = 1
|
bits = 1
|
||||||
amt = len(x)
|
amt = len(x)
|
||||||
while 2 ** bits < amt:
|
while 2**bits < amt:
|
||||||
bits += 1
|
bits += 1
|
||||||
strs = "{"
|
strs = "{"
|
||||||
for i in range(amt):
|
for i in range(amt):
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
from compat import byte_to_str
|
from compat import byte_to_str
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
|
|
||||||
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
|
|
||||||
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
|
|
||||||
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
|
|
@ -25,6 +25,8 @@ if (
|
|||||||
file_contents.find("Program crashed with signal") != -1
|
file_contents.find("Program crashed with signal") != -1
|
||||||
or file_contents.find("Dumping the backtrace") != -1
|
or file_contents.find("Dumping the backtrace") != -1
|
||||||
or file_contents.find("Segmentation fault (core dumped)") != -1
|
or file_contents.find("Segmentation fault (core dumped)") != -1
|
||||||
|
or file_contents.find("Aborted (core dumped)") != -1
|
||||||
|
or file_contents.find("terminate called without an active exception") != -1
|
||||||
):
|
):
|
||||||
print("FATAL ERROR: Godot has been crashed.")
|
print("FATAL ERROR: Godot has been crashed.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
# run before them.
|
# run before them.
|
||||||
|
|
||||||
# We need dos2unix and recode.
|
# We need dos2unix and recode.
|
||||||
if [ ! -x "$(command -v dos2unix)" -o ! -x "$(command -v recode)" ]; then
|
if [ ! -x "$(command -v dos2unix)" -o ! -x "$(command -v isutf8)" ]; then
|
||||||
printf "Install 'dos2unix' and 'recode' to use this script.\n"
|
printf "Install 'dos2unix' and 'isutf8' (from the moreutils package) to use this script.\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
@ -20,13 +20,17 @@ while IFS= read -rd '' f; do
|
|||||||
continue
|
continue
|
||||||
elif [[ "$f" == *"sln" ]]; then
|
elif [[ "$f" == *"sln" ]]; then
|
||||||
continue
|
continue
|
||||||
|
elif [[ "$f" == *".bat" ]]; then
|
||||||
|
continue
|
||||||
elif [[ "$f" == *"patch" ]]; then
|
elif [[ "$f" == *"patch" ]]; then
|
||||||
continue
|
continue
|
||||||
elif [[ "$f" == *"pot" ]]; then
|
elif [[ "$f" == *"pot" ]]; then
|
||||||
continue
|
continue
|
||||||
elif [[ "$f" == *"po" ]]; then
|
elif [[ "$f" == *"po" ]]; then
|
||||||
continue
|
continue
|
||||||
elif [[ "$f" == "thirdparty"* ]]; then
|
elif [[ "$f" == "thirdparty/"* ]]; then
|
||||||
|
continue
|
||||||
|
elif [[ "$f" == *"/thirdparty/"* ]]; then
|
||||||
continue
|
continue
|
||||||
elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then
|
elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then
|
||||||
continue
|
continue
|
||||||
@ -34,7 +38,7 @@ while IFS= read -rd '' f; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# Ensure that files are UTF-8 formatted.
|
# Ensure that files are UTF-8 formatted.
|
||||||
recode UTF-8 "$f" 2> /dev/null
|
isutf8 "$f" >> utf8-validation.txt 2>&1
|
||||||
# Ensure that files have LF line endings and do not contain a BOM.
|
# Ensure that files have LF line endings and do not contain a BOM.
|
||||||
dos2unix "$f" 2> /dev/null
|
dos2unix "$f" 2> /dev/null
|
||||||
# Remove trailing space characters and ensures that files end
|
# Remove trailing space characters and ensures that files end
|
||||||
@ -46,17 +50,27 @@ done
|
|||||||
|
|
||||||
git diff --color > patch.patch
|
git diff --color > patch.patch
|
||||||
|
|
||||||
# If no patch has been generated all is OK, clean up, and exit.
|
# If no UTF-8 violations were collected and no patch has been
|
||||||
if [ ! -s patch.patch ] ; then
|
# generated all is OK, clean up, and exit.
|
||||||
|
if [ ! -s utf8-validation.txt ] && [ ! -s patch.patch ] ; then
|
||||||
printf "Files in this commit comply with the formatting rules.\n"
|
printf "Files in this commit comply with the formatting rules.\n"
|
||||||
rm -f patch.patch
|
rm -f patch.patch utf8-validation.txt
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# A patch has been created, notify the user, clean up, and exit.
|
# Violations detected, notify the user, clean up, and exit.
|
||||||
printf "\n*** The following differences were found between the code "
|
if [ -s utf8-validation.txt ]
|
||||||
printf "and the formatting rules:\n\n"
|
then
|
||||||
cat patch.patch
|
printf "\n*** The following files contain invalid UTF-8 character sequences:\n\n"
|
||||||
|
cat utf8-validation.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -s patch.patch ]
|
||||||
|
then
|
||||||
|
printf "\n*** The following differences were found between the code "
|
||||||
|
printf "and the formatting rules:\n\n"
|
||||||
|
cat patch.patch
|
||||||
|
fi
|
||||||
|
rm -f utf8-validation.txt patch.patch
|
||||||
printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n"
|
printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n"
|
||||||
rm -f patch.patch
|
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
import os
|
import os
|
||||||
from array import array
|
from array import array
|
||||||
|
|
||||||
|
|
||||||
# Generates a C++ file from the specified binary resource file
|
# Generates a C++ file from the specified binary resource file
|
||||||
def generate(in_path, out_path):
|
def generate(in_path, out_path):
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="CSharpScript" inherits="Script" category="Core" version="3.2">
|
<class name="CSharpScript" inherits="Script" version="3.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
A script implemented in the C# programming language (Mono-enabled builds only).
|
A script implemented in the C# programming language (Mono-enabled builds only).
|
||||||
</brief_description>
|
</brief_description>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</tutorials>
|
</tutorials>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="new" qualifiers="vararg">
|
<method name="new" qualifiers="vararg">
|
||||||
<return type="Object">
|
<return type="Variant">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Returns a new instance of the script.
|
Returns a new instance of the script.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="GodotSharp" inherits="Object" category="Core" version="3.2">
|
<class name="GodotSharp" inherits="Object" version="3.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Bridge between Godot and the Mono runtime (Mono-enabled builds only).
|
Bridge between Godot and the Mono runtime (Mono-enabled builds only).
|
||||||
</brief_description>
|
</brief_description>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ def configure(env):
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
is64 = sys.maxsize > 2 ** 32
|
is64 = sys.maxsize > 2**32
|
||||||
if env["bits"] == "default":
|
if env["bits"] == "default":
|
||||||
env["bits"] = "64" if is64 else "32"
|
env["bits"] = "64" if is64 else "32"
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ def configure(env):
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
is64 = sys.maxsize > 2 ** 32
|
is64 = sys.maxsize > 2**32
|
||||||
if env["bits"] == "default":
|
if env["bits"] == "default":
|
||||||
env["bits"] = "64" if is64 else "32"
|
env["bits"] = "64" if is64 else "32"
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from platform_methods import subprocess_main
|
from platform_methods import subprocess_main
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user