Skip to content
Merged
Changes from 1 commit
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
28 changes: 27 additions & 1 deletion .github/workflows/publish-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,32 @@ jobs:
- name: Run clippy
run: ./scripts/check-clippy.sh

docsrs:
name: Docs.rs
needs: [sanity]
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Install 'nightly' toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Run docs.rs container build
run: |
docker run --rm \
-v ~/.cargo:/cargo \
-v ~/.rustup:/rustup \
-v "$PWD":/work \
-w /work \
-e CARGO_HOME=/cargo \
-e RUSTUP_HOME=/rustup \
-e PATH=/cargo/bin:$PATH \
-e DOCS_RS=1 \
-e RUSTDOCFLAGS="--cfg docsrs" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if you ran this command successfully on your machine, but on mine, I need to quote all of the env declarations

Suggested change
-e CARGO_HOME=/cargo \
-e RUSTUP_HOME=/rustup \
-e PATH=/cargo/bin:$PATH \
-e DOCS_RS=1 \
-e RUSTDOCFLAGS="--cfg docsrs" \
-e "CARGO_HOME=/cargo" \
-e "RUSTUP_HOME=/rustup" \
-e "PATH=/cargo/bin:$PATH" \
-e "DOCS_RS=1" \
-e "RUSTDOCFLAGS=\"--cfg docsrs\"" \

ghcr.io/rust-lang/crates-build-env/linux:latest \
bash -c "cargo +nightly doc --no-deps --all-features --manifest-path ${{ inputs.package_path }}/Cargo.toml"

detached-minimal-versions:
name: Check minimal-versions on detached crate
runs-on: ubuntu-latest
Expand Down Expand Up @@ -188,7 +214,7 @@ jobs:
publish-crate:
name: Publish crate
runs-on: ubuntu-latest
needs: [format, clippy, detached-minimal-versions, semver]
needs: [format, clippy, detached-minimal-versions, semver, docsrs]
permissions:
contents: write
steps:
Expand Down