Skip to content

Include published_docs cfg while building the docs. #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/garbage-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }})"
Expand Down
5 changes: 4 additions & 1 deletion documentation/put.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading