Skip to content

Commit 6d90b8b

Browse files
committed
2 parents 42fac8b + d8fecf7 commit 6d90b8b

File tree

237 files changed

+1961
-1190
lines changed

Some content is hidden

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

237 files changed

+1961
-1190
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
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

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,51 @@ jobs:
1111
# Don't run scheduled runs on forks unless the CI_OFFLINE_DOCS_CRON variable is set to 'true'.
1212
# Manual runs can still be triggered as normal.
1313
if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_OFFLINE_DOCS_CRON == 'true' }}
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-24.04
15+
timeout-minutes: 180
1516
strategy:
1617
matrix:
1718
branch:
1819
- master
1920
- stable
21+
permissions:
22+
contents: write
2023
steps:
2124
- uses: actions/checkout@v4
2225
with:
2326
ref: ${{ matrix.branch }}
2427

28+
- name: Get Python version
29+
id: pythonv
30+
run: |
31+
echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT
32+
33+
- name: Restore cached virtualenv
34+
uses: actions/cache/restore@v4
35+
with:
36+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
37+
path: .venv
38+
2539
- name: Install dependencies
2640
run: |
27-
sudo pip3 install -r requirements.txt
41+
python -m venv .venv
42+
source .venv/bin/activate
43+
python -m pip install -r requirements.txt
44+
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
45+
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
2846
sudo apt update
2947
sudo apt install parallel libwebp7
3048
3149
- name: Migrate to Redot
3250
run: |
3351
python migrate.py . _migrated
3452
53+
- name: Save virtualenv cache
54+
uses: actions/cache/save@v4
55+
with:
56+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
57+
path: .venv
58+
3559
- name: Sphinx - Build HTML
3660
run: make SPHINXOPTS='--color -j 4' SPHINXSOURCEDIR='./_migrated' html
3761

.github/workflows/cherrypick.yml

Lines changed: 75 additions & 0 deletions
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+
EMAIL: 'noreply@godotengine.org'
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

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,51 @@ 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-22.04
13+
runs-on: ubuntu-24.04
14+
timeout-minutes: 120
1415
steps:
1516
- name: Checkout
1617
uses: actions/checkout@v4
1718

1819
- name: Style checks via pre-commit
1920
uses: pre-commit/action@v3.0.1
2021

22+
- name: Get Python version
23+
id: pythonv
24+
run: |
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
32+
2133
- name: Install dependencies
22-
run: sudo pip3 install -r requirements.txt
34+
run: |
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
2346

2447
- name: Migrate to Redot
2548
run: |
2649
python migrate.py . _migrated
2750
2851
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
2952
- name: Sphinx build
30-
run: make SPHINXOPTS='--color -W -j 4' SPHINXSOURCEDIR='./_migrated' dummy
53+
run: |
54+
source .venv/bin/activate
55+
make SPHINXOPTS='--color -W -j 4' SPHINXSOURCEDIR='./_migrated' dummy

.github/workflows/sync_class_ref.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ 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:
@@ -19,13 +20,14 @@ jobs:
1920
# Manual runs can still be triggered as normal.
2021
if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_SYNC_CLASS_REF_CRON == 'true' }}
2122
name: Update class reference files based on the engine revision
22-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
24+
timeout-minutes: 10
2325
env:
2426
engine_rev: 'master'
2527
permissions:
2628
contents: write
2729
pull-requests: write
28-
30+
2931
steps:
3032
- name: Checkout the documentation repository
3133
uses: actions/checkout@v4

_extensions/gdscript.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ def innerstring_rules(ttype):
428428
"@static_unload",
429429
"@tool",
430430
"@warning_ignore",
431+
"@warning_ignore_restore",
432+
"@warning_ignore_start",
431433
),
432434
prefix=r"(?<!\.)",
433435
suffix=r"\b",

_templates/layout.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@
5252

5353
{% if (not meta or meta.get('allow_comments') != 'False') and godot_show_article_comments %}
5454
<div id="godot-giscus">
55+
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
56+
<div class="rst-footer-buttons" role="navigation">
57+
{%- if prev %}
58+
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
59+
{%- endif %}
60+
{%- if next %}
61+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
62+
{%- endif %}
63+
</div>
64+
{%- endif %}
5565
<hr>
5666
<h2>User-contributed notes</h2>
5767
<p>

about/complying_with_licenses.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,39 +84,39 @@ how the text has to be included, but here are the most common approaches (you
8484
only need to implement one of them, not all).
8585

8686
Credits screen
87-
^^^^^^^^^^^^^^
87+
~~~~~~~~~~~~~~
8888

8989
Include the above license text somewhere in the credits screen. It can be at the
9090
bottom after showing the rest of the credits. Most large studios use this
9191
approach with open source licenses.
9292

9393
Licenses screen
94-
^^^^^^^^^^^^^^^
94+
~~~~~~~~~~~~~~~
9595

9696
Some games have a special menu (often in the settings) to display licenses.
9797
This menu is typically accessed with a button called **Third-party Licenses**
9898
or **Open Source Licenses**.
9999

100100
Output log
101-
^^^^^^^^^^
101+
~~~~~~~~~~
102102

103103
Printing the license text using the :ref:`print() <class_@GlobalScope_method_print>`
104104
function may be enough on platforms where a global output log is readable.
105105
This is the case on desktop platforms, Android and HTML5 (but not iOS).
106106

107107
Accompanying file
108-
^^^^^^^^^^^^^^^^^
108+
~~~~~~~~~~~~~~~~~
109109

110110
If the game is distributed on desktop platforms, a file containing the license
111111
text can be added to the software that is installed to the user PC.
112112

113113
Printed manual
114-
^^^^^^^^^^^^^^
114+
~~~~~~~~~~~~~~
115115

116116
If the game includes a printed manual, the license text can be included there.
117117

118118
Link to the license
119-
^^^^^^^^^^^^^^^^^^^
119+
~~~~~~~~~~~~~~~~~~~
120120

121121
The Godot Engine developers consider that a link to ``godotengine.org/license``
122122
in your game documentation or credits would be an acceptable way to satisfy

0 commit comments

Comments
 (0)