Skip to content

Commit

Permalink
ci: Check all crate documentation in addition to target-specific ndk (#…
Browse files Browse the repository at this point in the history
…129)

* ci: Check all crate documentation in addition to target-specific ndk

Only `ndk` docs are built for all `android` targets but the rest of the
documentation remains untested. Especially now that we're expanding to
provide more complete docs for ndk-build and cargo-apk should everything
be tested, to make sure that things like intra-doc links remain in
working order.

* ci: Don't build target-agnostic ndk docs for all targets

The previous commit tests all documentation for all features and crates
(not just `ndk`). The NDK crate and its documentation build without
issues thanks to the guards introduced by the `"test"` feature. Since
the `ndk` docs do not depend on any target-specific flags (and `ndk-sys`
does not contain any documentation) is is fine to build-test it just
once for the host architecture.
  • Loading branch information
MarijnS95 authored Mar 20, 2021
1 parent e5f0c7e commit 006b740
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ jobs:
run:
cargo test -p cargo-apk --all-features

- if: runner.os != 'Windows'
name: Document all crates
env:
RUSTDOCFLAGS: -Dwarnings
run:
cargo doc --all --all-features

- name: Install cargo-apk
run:
cargo install --path cargo-apk
Expand All @@ -82,9 +89,3 @@ jobs:

- name: Cargo apk build for target ${{ matrix.rust-target }}
run: cargo apk build -p ndk-examples --target ${{ matrix.rust-target }} --examples

- name: Check NDK docs for ${{ matrix.rust-target }}
env:
RUSTDOCFLAGS: -Dwarnings
run:
cargo doc -p ndk --target ${{ matrix.rust-target }} --all-features

0 comments on commit 006b740

Please sign in to comment.