mirror of
https://github.com/godotengine/godot.git
synced 2025-02-16 07:40:36 +00:00
Merge pull request #98938 from akien-mga/3.4-ci-sync-with-3.x
[3.4] CI: Partially sync workflows and actions with 3.x branch
This commit is contained in:
commit
f92989c23b
4
.github/actions/godot-build/action.yml
vendored
4
.github/actions/godot-build/action.yml
vendored
@ -20,7 +20,9 @@ inputs:
|
|||||||
default: "${{ github.workspace }}/.scons-cache/"
|
default: "${{ github.workspace }}/.scons-cache/"
|
||||||
scons-cache-limit:
|
scons-cache-limit:
|
||||||
description: The scons cache size limit.
|
description: The scons cache size limit.
|
||||||
default: 4096
|
# 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:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: Setup Godot build cache
|
name: Restore Godot build cache
|
||||||
description: Setup Godot build cache.
|
description: Restore Godot build cache.
|
||||||
inputs:
|
inputs:
|
||||||
cache-name:
|
cache-name:
|
||||||
description: The cache base name (job name by default).
|
description: The cache base name (job name by default).
|
||||||
@ -10,9 +10,8 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore .scons_cache directory
|
||||||
- name: Load .scons_cache directory
|
uses: actions/cache/restore@v4
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{inputs.scons-cache}}
|
path: ${{inputs.scons-cache}}
|
||||||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
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}}
|
2
.github/actions/godot-deps/action.yml
vendored
2
.github/actions/godot-deps/action.yml
vendored
@ -23,5 +23,5 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
python -c "import sys; print(sys.version)"
|
python -c "import sys; print(sys.version)"
|
||||||
python -m pip install scons
|
python -m pip install scons==4.7.0
|
||||||
scons --version
|
scons --version
|
||||||
|
20
.github/workflows/android_builds.yml
vendored
20
.github/workflows/android_builds.yml
vendored
@ -1,8 +1,10 @@
|
|||||||
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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
|
|
||||||
@ -13,27 +15,19 @@ concurrency:
|
|||||||
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
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
@ -55,6 +49,10 @@ jobs:
|
|||||||
target: release
|
target: release
|
||||||
tools: false
|
tools: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Generate Godot templates
|
- name: Generate Godot templates
|
||||||
run: |
|
run: |
|
||||||
cd platform/android/java
|
cd platform/android/java
|
||||||
|
14
.github/workflows/ios_builds.yml
vendored
14
.github/workflows/ios_builds.yml
vendored
@ -1,8 +1,10 @@
|
|||||||
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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
|
|
||||||
@ -18,14 +20,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
uses: ./.github/actions/godot-deps
|
uses: ./.github/actions/godot-deps
|
||||||
|
|
||||||
- name: Compilation (armv7)
|
- name: Compilation (arm64v8)
|
||||||
uses: ./.github/actions/godot-build
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
sconsflags: ${{ env.SCONSFLAGS }}
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
@ -33,5 +35,9 @@ jobs:
|
|||||||
target: release
|
target: release
|
||||||
tools: false
|
tools: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
|
21
.github/workflows/javascript_builds.yml
vendored
21
.github/workflows/javascript_builds.yml
vendored
@ -1,8 +1,10 @@
|
|||||||
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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
EM_VERSION: 2.0.25
|
EM_VERSION: 2.0.25
|
||||||
@ -20,26 +22,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# 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}}
|
|
||||||
|
|
||||||
- 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: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
@ -53,5 +48,9 @@ jobs:
|
|||||||
target: release
|
target: release
|
||||||
tools: false
|
tools: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
|
41
.github/workflows/linux_builds.yml
vendored
41
.github/workflows/linux_builds.yml
vendored
@ -1,8 +1,10 @@
|
|||||||
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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes
|
SCONSFLAGS: verbose=yes warnings=all werror=yes
|
||||||
|
|
||||||
@ -27,11 +29,11 @@ jobs:
|
|||||||
build-mono: true
|
build-mono: true
|
||||||
artifact: true
|
artifact: true
|
||||||
|
|
||||||
- name: Editor and sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes)
|
- name: Editor and sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes, linker=gold)
|
||||||
cache-name: linux-editor-sanitizers
|
cache-name: linux-editor-sanitizers
|
||||||
target: debug
|
target: debug
|
||||||
tools: true
|
tools: true
|
||||||
sconsflags: use_asan=yes use_ubsan=yes
|
sconsflags: use_asan=yes use_ubsan=yes linker=gold
|
||||||
test: true
|
test: true
|
||||||
bin: "./bin/godot.x11.tools.64s"
|
bin: "./bin/godot.x11.tools.64s"
|
||||||
build-mono: false
|
build-mono: false
|
||||||
@ -52,17 +54,22 @@ jobs:
|
|||||||
- name: Linux dependencies
|
- name: Linux dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
# Azure repositories are flaky, remove them.
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
sudo rm -f /etc/apt/sources.list.d/{azure,microsoft}*
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
# The actual dependencies
|
# The actual dependencies.
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
sudo apt-get install --no-install-recommends build-essential pkg-config libx11-dev \
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
|
libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev \
|
||||||
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Free disk space on runner
|
||||||
uses: ./.github/actions/godot-cache
|
run: |
|
||||||
|
echo "Disk usage before:" && df -h
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
echo "Disk usage after:" && df -h
|
||||||
|
|
||||||
|
- name: Restore Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -70,6 +77,9 @@ jobs:
|
|||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
uses: ./.github/actions/godot-deps
|
uses: ./.github/actions/godot-deps
|
||||||
|
|
||||||
|
- name: Setup GCC problem matcher
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
uses: ./.github/actions/godot-build
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
@ -78,6 +88,12 @@ jobs:
|
|||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tools: ${{ matrix.tools }}
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
with:
|
||||||
|
cache-name: ${{ matrix.cache-name }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
# Generate mono glue
|
# Generate mono glue
|
||||||
- name: Generate Mono glue code
|
- name: Generate Mono glue code
|
||||||
if: ${{ matrix.build-mono }}
|
if: ${{ matrix.build-mono }}
|
||||||
@ -129,6 +145,7 @@ jobs:
|
|||||||
if: ${{ matrix.artifact }}
|
if: ${{ matrix.artifact }}
|
||||||
run: |
|
run: |
|
||||||
strip bin/godot.*
|
strip bin/godot.*
|
||||||
|
chmod +x bin/godot.*
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
|
19
.github/workflows/macos_builds.yml
vendored
19
.github/workflows/macos_builds.yml
vendored
@ -1,8 +1,10 @@
|
|||||||
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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
|
|
||||||
@ -32,8 +34,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -49,6 +51,17 @@ jobs:
|
|||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tools: ${{ matrix.tools }}
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
with:
|
||||||
|
cache-name: ${{ matrix.cache-name }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
run: |
|
||||||
|
strip bin/godot.*
|
||||||
|
chmod +x bin/godot.*
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
with:
|
with:
|
||||||
|
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
|
27
.github/workflows/server_builds.yml
vendored
27
.github/workflows/server_builds.yml
vendored
@ -1,8 +1,10 @@
|
|||||||
name: ☁ Server Builds
|
name: ☁ Server 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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no module_mono_enabled=yes mono_static=yes mono_glue=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no module_mono_enabled=yes mono_static=yes mono_glue=no
|
||||||
|
|
||||||
@ -34,17 +36,16 @@ jobs:
|
|||||||
- name: Linux dependencies
|
- name: Linux dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
# Azure repositories are flaky, remove them.
|
||||||
sudo rm -f /etc/apt/sources.list.d/*
|
sudo rm -f /etc/apt/sources.list.d/{azure,microsoft}*
|
||||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
# The actual dependencies
|
# The actual dependencies.
|
||||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
|
sudo apt-get install --no-install-recommends build-essential pkg-config libx11-dev \
|
||||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
|
libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev \
|
||||||
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -59,3 +60,9 @@ jobs:
|
|||||||
platform: server
|
platform: server
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tools: ${{ matrix.tools }}
|
tools: ${{ matrix.tools }}
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
with:
|
||||||
|
cache-name: ${{ matrix.cache-name }}
|
||||||
|
continue-on-error: true
|
||||||
|
35
.github/workflows/static_checks.yml
vendored
35
.github/workflows/static_checks.yml
vendored
@ -1,38 +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-22.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
|
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
||||||
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -qq dos2unix recode clang-format-13
|
# 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-13 100
|
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 100
|
||||||
sudo pip3 install black==21.10b0 pygments
|
sudo pip3 install black==24.10.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
|
||||||
@ -47,3 +42,7 @@ jobs:
|
|||||||
- name: Documentation checks
|
- name: Documentation checks
|
||||||
run: |
|
run: |
|
||||||
doc/tools/make_rst.py --dry-run doc/classes modules
|
doc/tools/make_rst.py --dry-run doc/classes modules
|
||||||
|
|
||||||
|
- name: Style checks via clang-format (clang_format.sh)
|
||||||
|
run: |
|
||||||
|
bash ./misc/scripts/clang_format.sh
|
||||||
|
22
.github/workflows/windows_builds.yml
vendored
22
.github/workflows/windows_builds.yml
vendored
@ -1,9 +1,11 @@
|
|||||||
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.4
|
GODOT_BASE_BRANCH: 3.4
|
||||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||||
SCONS_CACHE_MSVC_CONFIG: true
|
SCONS_CACHE_MSVC_CONFIG: true
|
||||||
@ -35,8 +37,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -44,6 +46,9 @@ jobs:
|
|||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
uses: ./.github/actions/godot-deps
|
uses: ./.github/actions/godot-deps
|
||||||
|
|
||||||
|
- name: Setup MSVC problem matcher
|
||||||
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
uses: ./.github/actions/godot-build
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
@ -51,7 +56,16 @@ jobs:
|
|||||||
platform: windows
|
platform: windows
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tools: ${{ matrix.tools }}
|
tools: ${{ matrix.tools }}
|
||||||
scons-cache-limit: 3072
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
with:
|
||||||
|
cache-name: ${{ matrix.cache-name }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
run: |
|
||||||
|
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
|
@ -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):
|
||||||
|
@ -45,6 +45,7 @@ import sys
|
|||||||
sys.modules["_elementtree"] = None
|
sys.modules["_elementtree"] = None
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
|
|
||||||
## override the parser to get the line number
|
## override the parser to get the line number
|
||||||
class LineNumberingParser(ET.XMLParser):
|
class LineNumberingParser(ET.XMLParser):
|
||||||
def _start(self, *args, **kwargs):
|
def _start(self, *args, **kwargs):
|
||||||
|
@ -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
|
||||||
@ -28,7 +28,9 @@ while IFS= read -rd '' f; do
|
|||||||
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
|
||||||
@ -36,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
|
||||||
@ -48,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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -76,7 +76,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
|
||||||
|
|
||||||
|
@ -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