diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 37a2e10d175..2fadf9a9424 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,5 +9,7 @@ updates: schedule: interval: "daily" ignore: - # ReadTheDocs is staying on v1. + # We need to decide on when we upgrade Sphinx manually, + # as historically, this has been proven to often imply larger changes + # (RTD compat, upgrading extensions, other dependencies, our content, etc.). - dependency-name: "sphinx" diff --git a/.github/workflows/build_offline_docs.yml b/.github/workflows/build_offline_docs.yml index 73f6308a8ba..e1d6a289eed 100644 --- a/.github/workflows/build_offline_docs.yml +++ b/.github/workflows/build_offline_docs.yml @@ -11,26 +11,50 @@ jobs: # Don't run scheduled runs on forks unless the CI_OFFLINE_DOCS_CRON variable is set to 'true'. # Manual runs can still be triggered as normal. if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_OFFLINE_DOCS_CRON == 'true' }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 + timeout-minutes: 180 strategy: matrix: branch: - master - stable - 3.6 + permissions: + contents: write steps: - uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} + - name: Get Python version + id: pythonv + run: | + echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT + + - name: Restore cached virtualenv + uses: actions/cache/restore@v4 + with: + key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }} + path: .venv + - name: Install dependencies run: | - sudo pip3 install -r requirements.txt + python -m venv .venv + source .venv/bin/activate + python -m pip install -r requirements.txt + echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV sudo apt update sudo apt install parallel libwebp7 + - name: Save virtualenv cache + uses: actions/cache/save@v4 + with: + key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }} + path: .venv + - name: Sphinx - Build HTML - run: make SPHINXOPTS='--color' html + run: make SPHINXOPTS='--color -j 4' html - uses: actions/upload-artifact@v4 with: @@ -52,7 +76,7 @@ jobs: sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py - make SPHINXOPTS='--color' epub + make SPHINXOPTS='--color -j 4' epub - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/cherrypick.yml b/.github/workflows/cherrypick.yml index f8777d6785a..0be1fc39925 100644 --- a/.github/workflows/cherrypick.yml +++ b/.github/workflows/cherrypick.yml @@ -18,7 +18,8 @@ jobs: Create-cherrypick-PR: # The cherrypick label is hardcoded because `contains()` doesn't seem to be able to use an environment variable as a second argument. if: ${{ github.event.pull_request.merged == true && contains( github.event.pull_request.labels.*.name, 'cherrypick:4.3' ) }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + timeout-minutes: 10 env: # "Ternary" hack featured in the official docs. # When using "Squash and merge", the commit hash is the last merge commit of the pull request merge branch. @@ -28,8 +29,11 @@ jobs: COMMIT_HASH: ${{ github.event.pull_request.commits > 1 && github.sha || github.event.pull_request.head.sha }} PR_NUMBER: ${{ github.event.number }} + permissions: + contents: write + pull-requests: write + steps: - - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff08ec8ccca..e7413f86dbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,13 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }} cancel-in-progress: true jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 + timeout-minutes: 120 steps: - name: Checkout uses: actions/checkout@v4 @@ -18,9 +19,33 @@ jobs: - name: Style checks via pre-commit uses: pre-commit/action@v3.0.1 + - name: Get Python version + id: pythonv + run: | + echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT + + - name: Restore cached virtualenv + uses: actions/cache/restore@v4 + with: + key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }} + path: .venv + - name: Install dependencies - run: sudo pip3 install -r requirements.txt + run: | + python -m venv .venv + source .venv/bin/activate + python -m pip install -r requirements.txt + echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV + + - name: Save virtualenv cache + uses: actions/cache/save@v4 + with: + key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }} + path: .venv # Use dummy builder to improve performance as we don't need the generated HTML in this workflow. - name: Sphinx build - run: make SPHINXOPTS='--color -W' dummy + run: | + source .venv/bin/activate + make SPHINXOPTS='--color -j 4 -W' dummy diff --git a/.github/workflows/sync_class_ref.yml b/.github/workflows/sync_class_ref.yml index f4ae830e4b6..a210f6f2bd0 100644 --- a/.github/workflows/sync_class_ref.yml +++ b/.github/workflows/sync_class_ref.yml @@ -3,14 +3,15 @@ name: Sync Class Reference on: workflow_dispatch: # Scheduled updates only run on the default/master branch. + # Other branches need to be run manually (usually after a new release for that branch). schedule: - # Run it at night (European time) every Saturday. - # The offset is there to try and avoid the high load times. + # Run it at (European) night time every Saturday. + # The offset is there to try and avoid high load times. - cron: '15 3 * * 6' # Make sure jobs cannot overlap. concurrency: - group: classref-sync-ci-master + group: classref-sync-ci-${{ github.ref_name }} cancel-in-progress: true jobs: @@ -19,9 +20,13 @@ jobs: # Manual runs can still be triggered as normal. if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_SYNC_CLASS_REF_CRON == 'true' }} name: Update class reference files based on the engine revision - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + timeout-minutes: 10 env: engine_rev: 'master' + permissions: + contents: write + pull-requests: write steps: - name: Checkout the documentation repository diff --git a/conf.py b/conf.py index a3102b02132..fcc4b7d65fa 100644 --- a/conf.py +++ b/conf.py @@ -140,7 +140,7 @@ is_i18n = tags.has("i18n") # noqa: F821 print("Build language: {}, i18n tag: {}".format(language, is_i18n)) -exclude_patterns = ["_build"] +exclude_patterns = [".*", "**/.*", "_build", "_tools"] # fmt: off # These imports should *not* be moved to the start of the file,