Skip to content

Commit a15f86b

Browse files
authored
Merge branch 'master' into patch-1
2 parents dd8e682 + 925b967 commit a15f86b

File tree

1,971 files changed

+84746
-35195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,971 files changed

+84746
-35195
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Report incorrect or outdated documentation
44
title: ''
5-
labels: bug
5+
labels: ''
66
assignees: ''
77
---
88

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@ contact_links:
44
- name: Godot community channels
55
url: https://godotengine.org/community
66
about: Please ask for technical support on one of the other community channels, not here.
7+
8+
- name: Godot proposals
9+
url: https://github.com/godotengine/godot-proposals
10+
about: Please submit engine feature proposals on the Godot proposals repository, not here.
11+
12+
- name: Main Godot repository
13+
url: https://github.com/godotengine/godot
14+
about: Report engine bugs on the main Godot repository

.github/ISSUE_TEMPLATE/enhancement_request.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Enhancement request
33
about: Suggest new documentation or improving existing documentation
44
title: ''
5-
labels: enhancement
5+
labels: ''
66
assignees: ''
77
---
88

.github/dependabot.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ updates:
99
schedule:
1010
interval: "daily"
1111
ignore:
12-
# ReadTheDocs is staying on v1.
12+
# We need to decide on when we upgrade Sphinx manually,
13+
# as historically, this has been proven to often imply larger changes
14+
# (RTD compat, upgrading extensions, other dependencies, our content, etc.).
1315
- dependency-name: "sphinx"

.github/workflows/build_offline_docs.yml

+34-6
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,55 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-22.04
11+
# Don't run scheduled runs on forks unless the CI_OFFLINE_DOCS_CRON variable is set to 'true'.
12+
# Manual runs can still be triggered as normal.
13+
if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_OFFLINE_DOCS_CRON == 'true' }}
14+
runs-on: ubuntu-24.04
15+
timeout-minutes: 180
1216
strategy:
17+
max-parallel: 1
18+
fail-fast: false
1319
matrix:
1420
branch:
1521
- master
1622
- stable
1723
- 3.6
24+
permissions:
25+
contents: write
1826
steps:
1927
- uses: actions/checkout@v4
2028
with:
2129
ref: ${{ matrix.branch }}
2230

31+
- name: Get Python version
32+
id: pythonv
33+
run: |
34+
echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT
35+
36+
- name: Restore cached virtualenv
37+
uses: actions/cache/restore@v4
38+
with:
39+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
40+
path: .venv
41+
2342
- name: Install dependencies
2443
run: |
25-
sudo pip3 install -r requirements.txt
26-
sudo pip3 install codespell
44+
python -m venv .venv
45+
source .venv/bin/activate
46+
python -m pip install -r requirements.txt
47+
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
48+
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
2749
sudo apt update
28-
sudo apt install parallel libwebp7
50+
sudo apt install parallel libwebp7 imagemagick
51+
52+
- name: Save virtualenv cache
53+
uses: actions/cache/save@v4
54+
with:
55+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
56+
path: .venv
2957

3058
- name: Sphinx - Build HTML
31-
run: make SPHINXOPTS='--color' html
59+
run: make SPHINXOPTS='--color -j 4' html
3260

3361
- uses: actions/upload-artifact@v4
3462
with:
@@ -50,7 +78,7 @@ jobs:
5078
sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py
5179
sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py
5280
53-
make SPHINXOPTS='--color' epub
81+
make SPHINXOPTS='--color -j 4' epub
5482
5583
- uses: actions/upload-artifact@v4
5684
with:

.github/workflows/check_urls.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 🌐 Check URLs
2+
on:
3+
schedule:
4+
# Every Friday at 16:27 UTC.
5+
# URLs can decay over time. Setting up a schedule makes it possible to be warned
6+
# about dead links as soon as possible.
7+
- cron: "27 16 * * FRI"
8+
9+
jobs:
10+
check-urls:
11+
runs-on: ubuntu-24.04
12+
steps:
13+
14+
- uses: actions/checkout@v4
15+
16+
- name: Restore lychee cache
17+
uses: actions/cache@v4
18+
with:
19+
path: .lycheecache
20+
key: cache-lychee-${{ github.sha }}
21+
restore-keys: cache-lychee-
22+
23+
- name: Run lychee
24+
uses: lycheeverse/lychee-action@v2
25+
with:
26+
args: >
27+
--base .
28+
--no-progress
29+
--cache
30+
--max-cache-age 1d
31+
--exclude-path _templates/
32+
--exclude-path classes/
33+
"**/*.md" "**/*.html" "**/*.rst"
34+
35+
- name: Fail if there were link errors
36+
run: exit ${{ steps.lc.outputs.exit_code }}

.github/workflows/cherrypick.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Create Cherrypick PR
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
# TODO: Extract this to an env variable?
9+
- 'master'
10+
11+
env:
12+
# TODO: Add a way to handle multiple potential cherrypick targets.
13+
TARGET_BRANCH: '4.3'
14+
USERNAME: 'Godot Organization'
15+
16+
17+
jobs:
18+
Create-cherrypick-PR:
19+
# The cherrypick label is hardcoded because `contains()` doesn't seem to be able to use an environment variable as a second argument.
20+
if: ${{ github.event.pull_request.merged == true && contains( github.event.pull_request.labels.*.name, 'cherrypick:4.3' ) }}
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 10
23+
env:
24+
# "Ternary" hack featured in the official docs.
25+
# When using "Squash and merge", the commit hash is the last merge commit of the pull request merge branch.
26+
# When using "Merge", the commit hash is the last commit to the head branch of the pull request.
27+
# This is mildly error-prone, since in theory we could merge multiple commits without squashing.
28+
# We are relying on human review of the generated PRs to catch that.
29+
COMMIT_HASH: ${{ github.event.pull_request.commits > 1 && github.sha || github.event.pull_request.head.sha }}
30+
PR_NUMBER: ${{ github.event.number }}
31+
32+
permissions:
33+
contents: write
34+
pull-requests: write
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
with:
40+
ref: ${{ env.TARGET_BRANCH }}
41+
42+
- name: Cherrypick Commit
43+
id: cherrypick_commit
44+
continue-on-error: true
45+
# TODO: Maybe only fetch some branches?
46+
run: |
47+
git config user.name "${{ env.USERNAME }}"
48+
git config user.email "${{ env.EMAIL }}"
49+
git fetch
50+
git cherry-pick -m 1 ${{ env.COMMIT_HASH }}
51+
52+
- name: Create Pull Request
53+
if: steps.cherrypick_commit.outcome == 'success'
54+
uses: peter-evans/create-pull-request@v7
55+
with:
56+
commit-message: 'Cherrypick to ${{ env.TARGET_BRANCH }}'
57+
branch: 'cherrypick-${{ env.PR_NUMBER }}-${{ env.TARGET_BRANCH }}'
58+
delete-branch: true
59+
60+
# Configure the commit author.
61+
author: '${{ env.USERNAME }} <${{ env.EMAIL }}>'
62+
committer: '${{ env.USERNAME }} <${{ env.EMAIL }}>'
63+
64+
# Configure the pull request.
65+
title: 'Cherrypick ${{ env.PR_NUMBER }} to ${{ env.TARGET_BRANCH }}'
66+
body: 'Cherrypick #${{ env.PR_NUMBER }} to ${{ env.TARGET_BRANCH }}.'
67+
# TODO: Only add the bug or enhancement label, depending on which the original PR uses.
68+
labels: 'bug,enhancement'
69+
70+
- name: Handle failure
71+
if: steps.cherrypick_commit.outcome == 'failure'
72+
run: |
73+
echo "Can't automatically cherrypick. Potential causes:"
74+
echo "- PR has multiple commits. Did you squash and merge?"
75+
echo "- Cherrypick did not apply cleanly and can't be auto-merged."

.github/workflows/ci.yml

+30-12
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,47 @@ on:
55
pull_request:
66

77
concurrency:
8-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}
99
cancel-in-progress: true
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-24.04
14+
timeout-minutes: 120
1415
steps:
1516
- name: Checkout
1617
uses: actions/checkout@v4
1718

18-
- name: Install dependencies
19+
- name: Style checks via pre-commit
20+
uses: pre-commit/[email protected]
21+
22+
- name: Get Python version
23+
id: pythonv
1924
run: |
20-
# Install tools used by `_tools/format.sh`.
21-
sudo apt-get -qq update
22-
sudo apt-get -qq install dos2unix recode
23-
sudo pip3 install -r requirements.txt
24-
sudo pip3 install codespell
25+
echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT
26+
27+
- name: Restore cached virtualenv
28+
uses: actions/cache/restore@v4
29+
with:
30+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
31+
path: .venv
2532

26-
- name: Linter checks
33+
- name: Install dependencies
2734
run: |
28-
bash _tools/format.sh
29-
codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,development,getting_started,tutorials}/**/*.rst
35+
python -m venv .venv
36+
source .venv/bin/activate
37+
python -m pip install -r requirements.txt
38+
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
39+
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
40+
41+
- name: Save virtualenv cache
42+
uses: actions/cache/save@v4
43+
with:
44+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
45+
path: .venv
3046

3147
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
3248
- name: Sphinx build
33-
run: make SPHINXOPTS='--color -W' dummy
49+
run: |
50+
source .venv/bin/activate
51+
make SPHINXOPTS='--color -j 4 -W' dummy

.github/workflows/sync_class_ref.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,30 @@ name: Sync Class Reference
33
on:
44
workflow_dispatch:
55
# Scheduled updates only run on the default/master branch.
6+
# Other branches need to be run manually (usually after a new release for that branch).
67
schedule:
7-
# Run it at night (European time) every Saturday.
8-
# The offset is there to try and avoid the high load times.
8+
# Run it at (European) night time every Saturday.
9+
# The offset is there to try and avoid high load times.
910
- cron: '15 3 * * 6'
1011

1112
# Make sure jobs cannot overlap.
1213
concurrency:
13-
group: classref-sync-ci-master
14+
group: classref-sync-ci-${{ github.ref_name }}
1415
cancel-in-progress: true
1516

1617
jobs:
1718
build:
19+
# Don't run scheduled runs on forks unless the CI_SYNC_CLASS_REF_CRON variable is set to 'true'.
20+
# Manual runs can still be triggered as normal.
21+
if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_SYNC_CLASS_REF_CRON == 'true' }}
1822
name: Update class reference files based on the engine revision
19-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
24+
timeout-minutes: 10
2025
env:
2126
engine_rev: 'master'
27+
permissions:
28+
contents: write
29+
pull-requests: write
2230

2331
steps:
2432
- name: Checkout the documentation repository
@@ -51,7 +59,7 @@ jobs:
5159
./.engine-src/doc/tools/make_rst.py --color -o ./classes -l en ./.engine-src/doc/classes ./.engine-src/modules ./.engine-src/platform
5260
5361
- name: Submit a pull-request
54-
uses: peter-evans/create-pull-request@v6
62+
uses: peter-evans/create-pull-request@v7
5563
with:
5664
commit-message: 'classref: Sync with current ${{ env.engine_rev }} branch (${{ steps.engine.outputs.rev_hash_short }})'
5765
branch: 'classref/sync-${{ steps.engine.outputs.rev_hash_short }}'

.gitignore

+17-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,29 @@
33
.env
44

55
_build/
6-
env/
7-
__pycache__
8-
*.pyc
96
*~
107
.directory
118
.vs/
129
.vscode/
1310
*.mo
1411

12+
# Byte-compiled / optimized / DLL files
13+
__pycache__/
14+
*.py[cod]
15+
*$py.class
16+
17+
# Common environment files
18+
.env
19+
.venv
20+
env/
21+
venv/
22+
ENV/
23+
env.bak/
24+
venv.bak/
25+
26+
# User created Python virtual environment as described in the docs
27+
godot-docs-venv/
28+
1529
# Vim temp files
1630
*.swo
1731
*.swp
@@ -45,8 +59,5 @@ logo.h
4559
tmp-unused-images
4660
tmp-unused-images-history
4761

48-
# User created Python virtual environement as described in the docs
49-
godot-docs-venv/
50-
5162
# Jetbrains IDE files
5263
/.idea/

0 commit comments

Comments
 (0)