Skip to content

Commit 30f46c8

Browse files
authored
Merge pull request #10474 from mhilbrunner/ci-updates
CI updates (master branch)
2 parents 97c2e1c + 2bb21ea commit 30f46c8

File tree

6 files changed

+76
-16
lines changed

6 files changed

+76
-16
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: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,50 @@ 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
2021
- 3.6
22+
permissions:
23+
contents: write
2124
steps:
2225
- uses: actions/checkout@v4
2326
with:
2427
ref: ${{ matrix.branch }}
2528

29+
- name: Get Python version
30+
id: pythonv
31+
run: |
32+
echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT
33+
34+
- name: Restore cached virtualenv
35+
uses: actions/cache/restore@v4
36+
with:
37+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
38+
path: .venv
39+
2640
- name: Install dependencies
2741
run: |
28-
sudo pip3 install -r requirements.txt
42+
python -m venv .venv
43+
source .venv/bin/activate
44+
python -m pip install -r requirements.txt
45+
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
46+
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
2947
sudo apt update
3048
sudo apt install parallel libwebp7
3149
50+
- name: Save virtualenv cache
51+
uses: actions/cache/save@v4
52+
with:
53+
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
54+
path: .venv
55+
3256
- name: Sphinx - Build HTML
33-
run: make SPHINXOPTS='--color' html
57+
run: make SPHINXOPTS='--color -j 4' html
3458

3559
- uses: actions/upload-artifact@v4
3660
with:
@@ -52,7 +76,7 @@ jobs:
5276
sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py
5377
sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py
5478
55-
make SPHINXOPTS='--color' epub
79+
make SPHINXOPTS='--color -j 4' epub
5680
5781
- uses: actions/upload-artifact@v4
5882
with:

.github/workflows/cherrypick.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
Create-cherrypick-PR:
1919
# The cherrypick label is hardcoded because `contains()` doesn't seem to be able to use an environment variable as a second argument.
2020
if: ${{ github.event.pull_request.merged == true && contains( github.event.pull_request.labels.*.name, 'cherrypick:4.3' ) }}
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 10
2223
env:
2324
# "Ternary" hack featured in the official docs.
2425
# When using "Squash and merge", the commit hash is the last merge commit of the pull request merge branch.
@@ -28,8 +29,11 @@ jobs:
2829
COMMIT_HASH: ${{ github.event.pull_request.commits > 1 && github.sha || github.event.pull_request.head.sha }}
2930
PR_NUMBER: ${{ github.event.number }}
3031

32+
permissions:
33+
contents: write
34+
pull-requests: write
35+
3136
steps:
32-
3337
- name: Checkout
3438
uses: actions/checkout@v4
3539
with:

.github/workflows/ci.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +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-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/[email protected]
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
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
2548
- name: Sphinx build
26-
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

Lines changed: 9 additions & 4 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,9 +20,13 @@ 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'
27+
permissions:
28+
contents: write
29+
pull-requests: write
2530

2631
steps:
2732
- name: Checkout the documentation repository

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
is_i18n = tags.has("i18n") # noqa: F821
141141
print("Build language: {}, i18n tag: {}".format(language, is_i18n))
142142

143-
exclude_patterns = ["_build"]
143+
exclude_patterns = [".*", "**/.*", "_build", "_tools"]
144144

145145
# fmt: off
146146
# These imports should *not* be moved to the start of the file,

0 commit comments

Comments
 (0)