Skip to content

Commit

Permalink
fix: try to fix ci again
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejager committed Sep 20, 2024
1 parent 6788a2c commit b7f38c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/rust-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,7 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1
- shell: bash
run: >
# Check intra-doc links, thanks to ChatGPT
cargo metadata --no-deps --format-version=1 \
| jq -r '.packages[] | .name as $pname | .targets[] | [$pname, .kind[], .name] | @tsv' \
| while IFS=$'\t' read -r package kind name; do
case "$kind" in
lib)
cargo rustdoc -p "$package" --lib --all-features -- -D warnings -W unreachable-pub
;;
bin)
cargo rustdoc -p "$package" --bin "$name" --all-features -- -D warnings -W unreachable-pub
;;
example)
cargo rustdoc -p "$package" --example "$name" --all-features -- -D warnings -W unreachable-pub
;;
test)
cargo rustdoc -p "$package" --test "$name" --all-features -- -D warnings -W unreachable-pub
;;
bench)
cargo rustdoc -p "$package" --bench "$name" --all-features -- -D warnings -W unreachable-pub
;;
esac
done
./intra-doc-links.bash
format_and_lint:
name: Format and Lint
runs-on: ubuntu-latest
Expand Down
21 changes: 21 additions & 0 deletions intra-doc-links.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cargo metadata --no-deps --format-version=1 \
| jq -r '.packages[] | .name as $pname | .targets[] | [$pname, .kind[], .name] | @tsv' \
| while IFS=$'\t' read -r package kind name; do
case "$kind" in
lib)
cargo rustdoc -p "$package" --lib --all-features -- -D warnings -W unreachable-pub
;;
bin)
cargo rustdoc -p "$package" --bin "$name" --all-features -- -D warnings -W unreachable-pub
;;
example)
cargo rustdoc -p "$package" --example "$name" --all-features -- -D warnings -W unreachable-pub
;;
test)
cargo rustdoc -p "$package" --test "$name" --all-features -- -D warnings -W unreachable-pub
;;
bench)
cargo rustdoc -p "$package" --bench "$name" --all-features -- -D warnings -W unreachable-pub
;;
esac
done

0 comments on commit b7f38c5

Please sign in to comment.