From 66b292f1db34af56f0797314a2afafc80403009f Mon Sep 17 00:00:00 2001 From: Yarvin Date: Thu, 15 May 2025 10:35:36 +0200 Subject: [PATCH 1/2] Include `published_docs` cfg while building the docs as well. --- documentation/put.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/documentation/put.sh b/documentation/put.sh index 07e7862fcb97..eac76587e303 100644 --- a/documentation/put.sh +++ b/documentation/put.sh @@ -92,7 +92,10 @@ up=".." # unused_doc_comments,unused_attribute: caused by false positives from doc(cfg(...)) attributes. export RUSTFLAGS="--cfg published_docs -A unused_imports -A dead_code -A unexpected_cfgs -A unused_doc_comments -A unused_attributes" -# export RUSTDOCFLAGS=... +# Both need to be supplied since `RUSTDOCFLAGS` is being propagated only to crate that is being documented (only "godot" crate in this case) +# while we need cfg value `published_docs` for codegen and other crates as well. +# All doc(cfg(...)) attributes are gated behind `published_docs` cfg – therefore it must be supplied as well. +export RUSTDOCFLAGS=$RUSTFLAGS # shellcheck disable=SC2086 cargo +nightly doc -p $mainCrate $features --no-deps --target-dir $up/target From b3c3662e4d1f78d634fc836b0808c7566415e744 Mon Sep 17 00:00:00 2001 From: Yarvin Date: Thu, 15 May 2025 13:03:52 +0200 Subject: [PATCH 2/2] Switch runner to ubuntu-24.04 (not ubuntu-latest because they tended to introduce breaking changes in the past, and it's much harder to debug than a conscious runner update) --- .github/workflows/build-website.yml | 6 +++--- .github/workflows/garbage-collect.yml | 2 +- .github/workflows/update-docs.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-website.yml b/.github/workflows/build-website.yml index 7e746d75e197..4a89c933e425 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/build-website.yml @@ -25,7 +25,7 @@ permissions: jobs: check-website: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: github.event_name == 'pull_request' steps: - name: "Checkout" @@ -40,7 +40,7 @@ jobs: deploy-website: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: github.event_name != 'pull_request' steps: - name: "Workflow triggered by push to master" @@ -133,7 +133,7 @@ jobs: license-guard: # not on repo dispatch if: github.event_name != 'repository_dispatch' - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/garbage-collect.yml b/.github/workflows/garbage-collect.yml index 6120cdb318e1..e6e7f61312f5 100644 --- a/.github/workflows/garbage-collect.yml +++ b/.github/workflows/garbage-collect.yml @@ -18,7 +18,7 @@ defaults: jobs: remove-closed-prs: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: "Checkout" uses: actions/checkout@v4 diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 84eb987d3bde..45e640303915 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -27,7 +27,7 @@ defaults: jobs: update-docs: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: # - name: "Info about workflow (${{ github.event.client_payload.op }} ${{ github.event.client_payload.repo }}/${{ github.event.client_payload.num }})" - name: "Info about workflow (${{ env.OP }} ${{ env.REPO }}/${{ env.NUM }})"