File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ jobs:
199199 - name : Use nix cache
200200 uses : DeterminateSystems/magic-nix-cache-action@main
201201 - name : Download packaged crate
202- uses : actions/download-artifact@v4
202+ uses : actions/download-artifact@v8
203203 with :
204204 name : crate
205205 path : dist
Original file line number Diff line number Diff line change @@ -45,8 +45,17 @@ published_sha="$(poll "${CRATES_IO_ATTEMPTS:-30}" \
4545 die " checksum mismatch: crates.io $published_sha vs local $local_sha "
4646echo " crates.io checksum matches the attested .crate ($local_sha )"
4747
48- echo " Waiting for docs.rs to build $crate $version (${DOCS_RS_ATTEMPTS:- 60} checks, ${interval} s apart)"
49- poll " ${DOCS_RS_ATTEMPTS:- 60} " \
50- " https://docs.rs/crate/$crate /$version /status.json" ' select(.doc_status == true) | "built"' > /dev/null ||
51- die " docs.rs did not build $crate $version "
52- echo " docs.rs built $crate $version "
48+ # docs.rs builds documentation only for crates with a library target;
49+ # binary-only crates (e.g. payjoin-cli) never reach doc_status == true.
50+ if cargo metadata --format-version 1 --no-deps 2> /dev/null |
51+ jq -e --arg c " $crate " \
52+ ' any(.packages[] | select(.name == $c) | .targets[].kind[]; . | test("^(lib|rlib|dylib|cdylib|staticlib|proc-macro)$"))' \
53+ > /dev/null; then
54+ echo " Waiting for docs.rs to build $crate $version (${DOCS_RS_ATTEMPTS:- 60} checks, ${interval} s apart)"
55+ poll " ${DOCS_RS_ATTEMPTS:- 60} " \
56+ " https://docs.rs/crate/$crate /$version /status.json" ' select(.doc_status == true) | "built"' > /dev/null ||
57+ die " docs.rs did not build $crate $version "
58+ echo " docs.rs built $crate $version "
59+ else
60+ echo " Skipping docs.rs check for $crate (no library target)"
61+ fi
You can’t perform that action at this time.
0 commit comments