mirror of https://github.com/godotengine/godot.git
Merge pull request #98956 from akien-mga/3.2-ci-sync-with-3.x
[3.2] CI: Partially sync workflows and actions with 3.x branch3.2
commit
f85956e45e
@ -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/
|
||||
@ -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}}
|
||||
@ -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}}
|
||||
@ -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
|
||||
@ -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
|
||||
@ -1,94 +1,154 @@
|
||||
name: 🐧 Linux Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
SCONSFLAGS: platform=linuxbsd verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: 3.2
|
||||
SCONSFLAGS: verbose=yes warnings=all werror=yes
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
linux-editor-mono:
|
||||
build-linux:
|
||||
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:
|
||||
- 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
|
||||
- name: Linux dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
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
|
||||
# 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: Configure dependencies
|
||||
- name: Free disk space on runner
|
||||
run: |
|
||||
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev xvfb \
|
||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
|
||||
echo "Disk usage before:" && df -h
|
||||
sudo rm -rf /usr/local/lib/android
|
||||
echo "Disk usage after:" && df -h
|
||||
|
||||
# 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
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
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'
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
# 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
|
||||
- name: Setup python and scons
|
||||
uses: ./.github/actions/godot-deps
|
||||
|
||||
- name: Setup GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
||||
- name: Compilation
|
||||
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: ./.github/actions/godot-build
|
||||
with:
|
||||
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
||||
platform: linuxbsd
|
||||
target: ${{ matrix.target }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
linux-template-mono:
|
||||
runs-on: "ubuntu-20.04"
|
||||
name: Template w/ Mono (target=release, tools=no)
|
||||
- name: Save Godot build cache
|
||||
uses: ./.github/actions/godot-cache-save
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Generate mono glue
|
||||
- name: Generate Mono glue code
|
||||
if: ${{ matrix.build-mono }}
|
||||
run: |
|
||||
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
# Rebuild with mono
|
||||
- name: Compilation (mono_glue=yes)
|
||||
uses: ./.github/actions/godot-build
|
||||
if: ${{ matrix.build-mono }}
|
||||
with:
|
||||
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes
|
||||
platform: linuxbsd
|
||||
target: ${{ matrix.target }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
|
||||
- name: Download test project
|
||||
if: ${{ matrix.test }}
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
wget https://github.com/godotengine/regression-test-project/archive/3.2.zip
|
||||
unzip 3.2.zip
|
||||
mv "regression-test-project-3.2" "test_project"
|
||||
|
||||
# Install all packages (except scons)
|
||||
- name: Configure dependencies
|
||||
# Editor is quite complicated piece of software, so it is easy to introduce bug here
|
||||
- name: Open and close editor
|
||||
if: ${{ matrix.test }}
|
||||
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
|
||||
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
|
||||
|
||||
# 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'
|
||||
# Run test project
|
||||
- name: Run project
|
||||
if: ${{ matrix.test }}
|
||||
run: |
|
||||
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
|
||||
|
||||
# You can test your matrix by printing the current Python version
|
||||
- name: Configuring Python packages
|
||||
# Check class reference
|
||||
- name: Check for class reference updates
|
||||
if: ${{ matrix.test }}
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons
|
||||
python --version
|
||||
scons --version
|
||||
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"
|
||||
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --doctool . 2>&1 > /dev/null || true
|
||||
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
|
||||
|
||||
- name: Compilation
|
||||
- name: Prepare artifact
|
||||
if: ${{ matrix.artifact }}
|
||||
run: |
|
||||
scons target=release tools=no module_mono_enabled=yes mono_glue=no
|
||||
ls -l bin/
|
||||
strip bin/godot.*
|
||||
chmod +x bin/godot.*
|
||||
|
||||
- name: Upload artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
if: ${{ matrix.artifact }}
|
||||
with:
|
||||
name: ${{ matrix.cache-name }}
|
||||
|
||||
@ -1,67 +1,68 @@
|
||||
name: 🍎 macOS Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
SCONSFLAGS: platform=osx verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: 3.2
|
||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
macos-editor:
|
||||
build-macos:
|
||||
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:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# 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
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
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'
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
# 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
|
||||
- name: Setup python and scons
|
||||
uses: ./.github/actions/godot-deps
|
||||
|
||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
||||
- name: Compilation
|
||||
run: |
|
||||
scons tools=yes target=release_debug
|
||||
ls -l bin/
|
||||
|
||||
macos-template:
|
||||
runs-on: "macos-latest"
|
||||
name: Template (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
uses: ./.github/actions/godot-build
|
||||
with:
|
||||
sconsflags: ${{ env.SCONSFLAGS }}
|
||||
platform: osx
|
||||
target: ${{ matrix.target }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v5
|
||||
- name: Save Godot build cache
|
||||
uses: ./.github/actions/godot-cache-save
|
||||
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'
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
# You can test your matrix by printing the current Python version
|
||||
- name: Configuring Python packages
|
||||
- name: Prepare artifact
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons
|
||||
python --version
|
||||
scons --version
|
||||
strip bin/godot.*
|
||||
chmod +x bin/godot.*
|
||||
|
||||
- name: Compilation
|
||||
run: |
|
||||
scons target=release tools=no
|
||||
ls -l bin/
|
||||
- name: Upload artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: ${{ matrix.cache-name }}
|
||||
|
||||
@ -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
|
||||
@ -1,88 +1,68 @@
|
||||
name: ☁ Server Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
SCONSFLAGS: platform=server verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: 3.2
|
||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no module_mono_enabled=yes mono_static=yes mono_glue=no
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-server
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
linux-editor:
|
||||
build-server:
|
||||
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:
|
||||
- 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
|
||||
- name: Linux dependencies
|
||||
shell: bash
|
||||
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
|
||||
# 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: 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
|
||||
|
||||
# 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
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
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'
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
# 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
|
||||
- name: Setup python and scons
|
||||
uses: ./.github/actions/godot-deps
|
||||
|
||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
||||
- name: Compilation
|
||||
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
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v5
|
||||
uses: ./.github/actions/godot-build
|
||||
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'
|
||||
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
||||
platform: server
|
||||
target: ${{ matrix.target }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
# 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
|
||||
run: |
|
||||
scons -j2 target=release tools=no module_mono_enabled=yes mono_glue=no
|
||||
- name: Save Godot build cache
|
||||
uses: ./.github/actions/godot-cache-save
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
@ -1,69 +1,73 @@
|
||||
name: 🏁 Windows Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
# SCONS_CACHE for windows must be set in the build environment
|
||||
env:
|
||||
SCONSFLAGS: platform=windows verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: 3.2
|
||||
SCONSFLAGS: verbose=yes warnings=all werror=yes debug_symbols=no
|
||||
SCONS_CACHE_MSVC_CONFIG: true
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
windows-editor:
|
||||
build-windows:
|
||||
# Windows 10 with latest image
|
||||
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: Editor (target=release_debug, tools=yes)
|
||||
- name: Template (target=release, tools=no)
|
||||
cache-name: windows-template
|
||||
target: release
|
||||
tools: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# 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'
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# 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 pywin32
|
||||
python --version
|
||||
scons --version
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
||||
- name: Compilation
|
||||
run: |
|
||||
scons tools=yes target=release_debug
|
||||
ls -l bin/
|
||||
- name: Setup python and scons
|
||||
uses: ./.github/actions/godot-deps
|
||||
|
||||
windows-template:
|
||||
runs-on: "windows-latest"
|
||||
name: Template (target=release, tools=no)
|
||||
- name: Setup MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compilation
|
||||
uses: ./.github/actions/godot-build
|
||||
with:
|
||||
sconsflags: ${{ env.SCONSFLAGS }}
|
||||
platform: windows
|
||||
target: ${{ matrix.target }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
# 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'
|
||||
- name: Save Godot build cache
|
||||
uses: ./.github/actions/godot-cache-save
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
||||
# 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 pywin32
|
||||
python --version
|
||||
scons --version
|
||||
- name: Prepare artifact
|
||||
run: |
|
||||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||
|
||||
- name: Compilation
|
||||
run: |
|
||||
scons target=release tools=no
|
||||
ls -l bin/
|
||||
- name: Upload artifact
|
||||
uses: ./.github/actions/upload-artifact
|
||||
with:
|
||||
name: ${{ matrix.cache-name }}
|
||||
|
||||
@ -1,108 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SDK
|
||||
# https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
|
||||
# SHA-256 444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0
|
||||
# latest version available here: https://developer.android.com/studio/index.html
|
||||
|
||||
# NDK
|
||||
# https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
|
||||
# SHA-1 0bf02d4e8b85fd770fd7b9b2cdec57f9441f27a2
|
||||
# latest version available here: https://developer.android.com/ndk/downloads/index.html
|
||||
|
||||
BASH_RC=~/.bashrc
|
||||
GODOT_BUILD_TOOLS_PATH=./godot-dev/build-tools
|
||||
mkdir -p $GODOT_BUILD_TOOLS_PATH
|
||||
cd $GODOT_BUILD_TOOLS_PATH
|
||||
|
||||
ANDROID_BASE_URL=http://dl.google.com/android/repository
|
||||
|
||||
ANDROID_SDK_RELEASE=4333796
|
||||
ANDROID_SDK_DIR=android-sdk
|
||||
ANDROID_SDK_FILENAME=sdk-tools-linux-$ANDROID_SDK_RELEASE.zip
|
||||
ANDROID_SDK_URL=$ANDROID_BASE_URL/$ANDROID_SDK_FILENAME
|
||||
ANDROID_SDK_PATH=$GODOT_BUILD_TOOLS_PATH/$ANDROID_SDK_DIR
|
||||
ANDROID_SDK_SHA256=92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9
|
||||
|
||||
ANDROID_NDK_RELEASE=r21
|
||||
ANDROID_NDK_DIR=android-ndk
|
||||
ANDROID_NDK_FILENAME=android-ndk-$ANDROID_NDK_RELEASE-linux-x86_64.zip
|
||||
ANDROID_NDK_URL=$ANDROID_BASE_URL/$ANDROID_NDK_FILENAME
|
||||
ANDROID_NDK_PATH=$GODOT_BUILD_TOOLS_PATH/$ANDROID_NDK_DIR
|
||||
ANDROID_NDK_SHA1=afc9c0b9faad222898ac8168c78ad4ccac8a1b5c
|
||||
|
||||
echo
|
||||
echo "Download and install Android development tools ..."
|
||||
echo
|
||||
|
||||
if [ ! -e $ANDROID_SDK_FILENAME ]; then
|
||||
echo "Downloading: Android SDK ..."
|
||||
curl -L -O $ANDROID_SDK_URL
|
||||
else
|
||||
echo $ANDROID_SDK_SHA1 $ANDROID_SDK_FILENAME > $ANDROID_SDK_FILENAME.sha1
|
||||
if [ $(shasum -a 256 < $ANDROID_SDK_FILENAME | awk '{print $1;}') != $ANDROID_SDK_SHA1 ]; then
|
||||
echo "Downloading: Android SDK ..."
|
||||
curl -L -O $ANDROID_SDK_URL
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d $ANDROID_SDK_DIR ]; then
|
||||
echo "Extracting: Android SDK ..."
|
||||
unzip -qq $ANDROID_SDK_FILENAME -d $ANDROID_SDK_DIR
|
||||
echo
|
||||
fi
|
||||
|
||||
if [ ! -e $ANDROID_NDK_FILENAME ]; then
|
||||
echo "Downloading: Android NDK ..."
|
||||
curl -L -O $ANDROID_NDK_URL
|
||||
else
|
||||
echo $ANDROID_NDK_MD5 $ANDROID_NDK_FILENAME > $ANDROID_NDK_FILENAME.md5
|
||||
if [ $(shasum -a 1 < $ANDROID_NDK_FILENAME | awk '{print $1;}') != $ANDROID_NDK_SHA1 ]; then
|
||||
echo "Downloading: Android NDK ..."
|
||||
curl -L -O $ANDROID_NDK_URL
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d $ANDROID_NDK_DIR ]; then
|
||||
echo "Extracting: Android NDK ..."
|
||||
unzip -qq $ANDROID_NDK_FILENAME
|
||||
mv android-ndk-$ANDROID_NDK_RELEASE $ANDROID_NDK_DIR
|
||||
echo
|
||||
fi
|
||||
|
||||
mkdir -p ~/.android && echo "count=0" > ~/.android/repositories.cfg
|
||||
echo "Installing: Accepting Licenses ..."
|
||||
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager --licenses > /dev/null
|
||||
echo "Installing: Android Build and Platform Tools ..."
|
||||
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'tools' > /dev/null
|
||||
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'platform-tools' > /dev/null
|
||||
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'build-tools;29.0.3' > /dev/null
|
||||
echo
|
||||
|
||||
EXPORT_VAL="export ANDROID_HOME=$ANDROID_SDK_PATH"
|
||||
if ! grep -q "^$EXPORT_VAL" $BASH_RC; then
|
||||
echo $EXPORT_VAL >> $BASH_RC
|
||||
fi
|
||||
#eval $EXPORT_VAL
|
||||
|
||||
EXPORT_VAL="export ANDROID_NDK_ROOT=$ANDROID_NDK_PATH"
|
||||
if ! grep -q "^$EXPORT_VAL" $BASH_RC; then
|
||||
echo $EXPORT_VAL >> $BASH_RC
|
||||
fi
|
||||
#eval $EXPORT_VAL
|
||||
|
||||
EXPORT_VAL="export PATH=$PATH:$ANDROID_SDK_PATH/tools"
|
||||
if ! grep -q "^export PATH=.*$ANDROID_SDK_PATH/tools.*" $BASH_RC; then
|
||||
echo $EXPORT_VAL >> $BASH_RC
|
||||
fi
|
||||
#eval $EXPORT_VAL
|
||||
|
||||
EXPORT_VAL="export PATH=$PATH:$ANDROID_SDK_PATH/tools/bin"
|
||||
if ! grep -q "^export PATH=.*$ANDROID_SDK_PATH/tools/bin.*" $BASH_RC; then
|
||||
echo $EXPORT_VAL >> $BASH_RC
|
||||
fi
|
||||
#eval $EXPORT_VAL
|
||||
|
||||
echo
|
||||
echo "Done!"
|
||||
echo
|
||||
@ -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
|
||||
@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("ERROR: You must run program with file name as argument.")
|
||||
sys.exit(1)
|
||||
|
||||
fname = sys.argv[1]
|
||||
|
||||
fileread = open(fname.strip(), "r")
|
||||
file_contents = fileread.read()
|
||||
|
||||
# If find "ERROR: AddressSanitizer:", then happens invalid read or write
|
||||
# This is critical bug, so we need to fix this as fast as possible
|
||||
|
||||
if file_contents.find("ERROR: AddressSanitizer:") != -1:
|
||||
print("FATAL ERROR: An incorrectly used memory was found.")
|
||||
sys.exit(1)
|
||||
|
||||
# There is also possible, that program crashed with or without backtrace.
|
||||
|
||||
if (
|
||||
file_contents.find("Program crashed with signal") != -1
|
||||
or file_contents.find("Dumping the backtrace") != -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.")
|
||||
sys.exit(1)
|
||||
|
||||
# Finding memory leaks in Godot is quite difficult, because we need to take into
|
||||
# account leaks also in external libraries. They are usually provided without
|
||||
# debugging symbols, so the leak report from it usually has only 2/3 lines,
|
||||
# so searching for 5 element - "#4 0x" - should correctly detect the vast
|
||||
# majority of memory leaks
|
||||
|
||||
if file_contents.find("ERROR: LeakSanitizer:") != -1:
|
||||
if file_contents.find("#4 0x") != -1:
|
||||
print("ERROR: Memory leak was found")
|
||||
sys.exit(1)
|
||||
|
||||
# It may happen that Godot detects leaking nodes/resources and removes them, so
|
||||
# this possibility should also be handled as a potential error, even if
|
||||
# LeakSanitizer doesn't report anything
|
||||
|
||||
if file_contents.find("ObjectDB instances leaked at exit") != -1:
|
||||
print("ERROR: Memory leak was found")
|
||||
sys.exit(1)
|
||||
|
||||
sys.exit(0)
|
||||
Loading…
Reference in New Issue