mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 11:32:13 +00:00
CI: Fully sync workflows and actions with 3.x branch
This commit is contained in:
parent
dda42e91e2
commit
04592a8111
@ -1,5 +1,5 @@
|
||||
name: Setup Godot build cache
|
||||
description: Setup Godot build cache.
|
||||
name: Restore Godot build cache
|
||||
description: Restore Godot build cache.
|
||||
inputs:
|
||||
cache-name:
|
||||
description: The cache base name (job name by default).
|
||||
@ -10,9 +10,8 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
uses: actions/cache@v4
|
||||
- name: Restore .scons_cache directory
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{inputs.scons-cache}}
|
||||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
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
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons==4.4.0
|
||||
python -m pip install scons==4.7.0
|
||||
scons --version
|
||||
|
8
.github/workflows/android_builds.yml
vendored
8
.github/workflows/android_builds.yml
vendored
@ -26,8 +26,8 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
continue-on-error: true
|
||||
|
||||
- name: Setup python and scons
|
||||
@ -49,6 +49,10 @@ jobs:
|
||||
target: release
|
||||
tools: false
|
||||
|
||||
- name: Save Godot build cache
|
||||
uses: ./.github/actions/godot-cache-save
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate Godot templates
|
||||
run: |
|
||||
cd platform/android/java
|
||||
|
8
.github/workflows/ios_builds.yml
vendored
8
.github/workflows/ios_builds.yml
vendored
@ -20,8 +20,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
continue-on-error: true
|
||||
|
||||
- name: Setup python and scons
|
||||
@ -35,5 +35,9 @@ jobs:
|
||||
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
|
||||
|
8
.github/workflows/javascript_builds.yml
vendored
8
.github/workflows/javascript_builds.yml
vendored
@ -33,8 +33,8 @@ jobs:
|
||||
run: |
|
||||
emcc -v
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
continue-on-error: true
|
||||
|
||||
- name: Setup python and scons
|
||||
@ -48,5 +48,9 @@ jobs:
|
||||
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
|
||||
|
30
.github/workflows/linux_builds.yml
vendored
30
.github/workflows/linux_builds.yml
vendored
@ -58,13 +58,19 @@ jobs:
|
||||
# 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 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
|
||||
# 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
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Free disk space on runner
|
||||
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:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
@ -83,6 +89,12 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
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
|
||||
- name: Generate Mono glue code
|
||||
if: ${{ matrix.build-mono }}
|
||||
@ -103,9 +115,9 @@ jobs:
|
||||
- name: Download test project
|
||||
if: ${{ matrix.test }}
|
||||
run: |
|
||||
wget https://github.com/godotengine/regression-test-project/archive/3.x.zip
|
||||
unzip 3.x.zip
|
||||
mv "regression-test-project-3.x" "test_project"
|
||||
wget https://github.com/godotengine/regression-test-project/archive/3.5.zip
|
||||
unzip 3.5.zip
|
||||
mv "regression-test-project-3.5" "test_project"
|
||||
|
||||
# Editor is quite complicated piece of software, so it is easy to introduce bug here
|
||||
- name: Open and close editor
|
||||
|
10
.github/workflows/macos_builds.yml
vendored
10
.github/workflows/macos_builds.yml
vendored
@ -34,8 +34,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
@ -51,6 +51,12 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
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.*
|
||||
|
10
.github/workflows/server_builds.yml
vendored
10
.github/workflows/server_builds.yml
vendored
@ -45,8 +45,8 @@ jobs:
|
||||
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
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
@ -61,3 +61,9 @@ jobs:
|
||||
platform: server
|
||||
target: ${{ matrix.target }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
- name: Save Godot build cache
|
||||
uses: ./.github/actions/godot-cache-save
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
|
5
.github/workflows/static_checks.yml
vendored
5
.github/workflows/static_checks.yml
vendored
@ -24,6 +24,11 @@ jobs:
|
||||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-16 100
|
||||
sudo pip3 install black==24.10.0 pygments
|
||||
|
||||
# This needs to happen before Python and npm execution; it must happen before any extra files are written.
|
||||
- name: .gitignore checks (gitignore_check.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/gitignore_check.sh
|
||||
|
||||
- name: File formatting checks (file_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/file_format.sh
|
||||
|
10
.github/workflows/windows_builds.yml
vendored
10
.github/workflows/windows_builds.yml
vendored
@ -37,8 +37,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Godot build cache
|
||||
uses: ./.github/actions/godot-cache
|
||||
- name: Restore Godot build cache
|
||||
uses: ./.github/actions/godot-cache-restore
|
||||
with:
|
||||
cache-name: ${{ matrix.cache-name }}
|
||||
continue-on-error: true
|
||||
@ -57,6 +57,12 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
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: |
|
||||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||
|
@ -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
|
@ -28,7 +28,9 @@ while IFS= read -rd '' f; do
|
||||
continue
|
||||
elif [[ "$f" == *"po" ]]; then
|
||||
continue
|
||||
elif [[ "$f" == "thirdparty"* ]]; then
|
||||
elif [[ "$f" == "thirdparty/"* ]]; then
|
||||
continue
|
||||
elif [[ "$f" == *"/thirdparty/"* ]]; then
|
||||
continue
|
||||
elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then
|
||||
continue
|
||||
|
26
misc/scripts/gitignore_check.sh
Normal file
26
misc/scripts/gitignore_check.sh
Normal file
@ -0,0 +1,26 @@
|
||||
set -uo pipefail
|
||||
shopt -s globstar
|
||||
|
||||
echo -e ".gitignore validation..."
|
||||
|
||||
# Get a list of files that exist in the repo but are ignored.
|
||||
|
||||
# The --verbose flag also includes files un-ignored via ! prefixes.
|
||||
# We filter those out with a somewhat awkward `awk` directive.
|
||||
# (Explanation: Split each line by : delimiters,
|
||||
# see if the actual gitignore line shown in the third field starts with !,
|
||||
# if it doesn't, print it.)
|
||||
|
||||
# ignorecase for the sake of Windows users.
|
||||
|
||||
output=$(git -c core.ignorecase=true check-ignore --verbose --no-index **/* | \
|
||||
awk -F ':' '{ if ($3 !~ /^!/) print $0 }')
|
||||
|
||||
# Then we take this result and return success if it's empty.
|
||||
if [ -z "$output" ]; then
|
||||
exit 0
|
||||
else
|
||||
# And print the result if it isn't.
|
||||
echo "$output"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user