diff --git a/.cargo/config.toml b/.cargo/config.toml index 50834caf583a..e9173e0425d9 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,4 +1,3 @@ -# TODO(aatifsyed): remove this file once we have a dev/ci container [build] incremental = true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6eac1129df71..ccb5d6b42e17 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -52,17 +52,9 @@ jobs: RUSTFLAGS: "-Cstrip=symbols" - name: Execute MDBook run: make mdbook-build - - name: Build rustdoc - run: |- - rustup toolchain install $toolchain - cargo +$toolchain doc --workspace --no-deps + - name: Build vendored docs + run: make vendored-docs env: - # When you visit https://chainsafe.github.io/forest/rustdoc you get an index.html - # listing all crates that are documented (copied out below). - # This isn't included by default, so we use the unstable `--enable-index-page` option - # https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--index-page-provide-a-top-level-landing-page-for-docs - toolchain: nightly-2023-04-19 - RUSTDOCFLAGS: -Dwarnings -Zunstable-options --enable-index-page CC: "sccache clang" CXX: "sccache clang++" - name: Link Checker (Docs) diff --git a/Makefile b/Makefile index 7238b7b69a99..62cac6b31cfc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ SER_TESTS = "tests/serialization_tests" +VENDORED_DOCS_TOOLCHAIN := "nightly-2023-04-19" # Using https://github.com/tonistiigi/xx # Use in Docker images when cross-compiling. @@ -168,4 +169,15 @@ mdbook: mdbook-build: mdbook build ./documentation -.PHONY: clean clean-all lint lint-docker lint-clippy build release test test-all test-all-release test-release license test-vectors run-vectors pull-serialization-tests install-cli install-daemon install install-deps install-lint-tools docs run-serialization-vectors rustdoc + +# When you visit https://chainsafe.github.io/forest/rustdoc you get an index.html +# listing all crates that are documented (which is then published in CI). +# This isn't included by default, so we use a nightly toolchain, and the +# (unstable) `--enable-index-page` option. +# https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--index-page-provide-a-top-level-landing-page-for-docs +vendored-docs: + rustup toolchain install $(VENDORED_DOCS_TOOLCHAIN) + RUSTDOCFLAGS="-Dwarnings -Zunstable-options --enable-index-page" \ + cargo +$(VENDORED_DOCS_TOOLCHAIN) doc --workspace --no-deps + +.PHONY: clean clean-all lint lint-docker lint-clippy build release test test-all test-all-release test-release license test-vectors run-vectors pull-serialization-tests install-cli install-daemon install install-deps install-lint-tools docs run-serialization-vectors vendored-docs