From 8ddd84fca78204092d183a66438f88a353758a53 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 11 Sep 2024 13:39:58 +0200 Subject: [PATCH] Split out (ultra-)slow cargo doc jobs and run them only on nightly (#7399) ### What * Fixes https://github.com/rerun-io/rerun/issues/7387 * well, sort of ;) ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7399?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7399?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7399) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --- .github/workflows/contrib_checks.yml | 2 +- .github/workflows/reusable_checks_rust.yml | 4 +-- .../src/visualizers/meshes.rs | 3 +-- scripts/ci/rust_checks.py | 25 +++++++++++++------ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/contrib_checks.yml b/.github/workflows/contrib_checks.yml index a3e5f847917b..29f38dcf9d45 100644 --- a/.github/workflows/contrib_checks.yml +++ b/.github/workflows/contrib_checks.yml @@ -104,7 +104,7 @@ jobs: pixi-version: v0.25.0 - name: Rust checks & tests - run: pixi run rs-check --skip individual_crates + run: pixi run rs-check --skip individual_crates docs_slow misc-rerun-lints: name: Rerun lints diff --git a/.github/workflows/reusable_checks_rust.yml b/.github/workflows/reusable_checks_rust.yml index b89ef812556c..57dd6e587a1f 100644 --- a/.github/workflows/reusable_checks_rust.yml +++ b/.github/workflows/reusable_checks_rust.yml @@ -67,11 +67,11 @@ jobs: - name: Rust checks & tests if: ${{ inputs.CHANNEL == 'pr' }} - run: pixi run rs-check --skip individual_crates tests + run: pixi run rs-check --skip individual_crates tests docs_slow - name: Rust checks & tests if: ${{ inputs.CHANNEL == 'main' }} - run: pixi run rs-check --skip individual_crates + run: pixi run rs-check --skip individual_crates docs_slow - name: Rust all checks & tests if: ${{ inputs.CHANNEL == 'nightly' }} diff --git a/crates/viewer/re_space_view_spatial/src/visualizers/meshes.rs b/crates/viewer/re_space_view_spatial/src/visualizers/meshes.rs index 91ac57ab236e..23fbe03c1d0d 100644 --- a/crates/viewer/re_space_view_spatial/src/visualizers/meshes.rs +++ b/crates/viewer/re_space_view_spatial/src/visualizers/meshes.rs @@ -1,7 +1,6 @@ use re_chunk_store::RowId; use re_log_types::{hash::Hash64, Instance, TimeInt}; -use re_renderer::renderer::MeshInstance; -use re_renderer::RenderContext; +use re_renderer::{renderer::MeshInstance, RenderContext}; use re_types::{ archetypes::Mesh3D, components::{ diff --git a/scripts/ci/rust_checks.py b/scripts/ci/rust_checks.py index bca4d2bf44a3..49e4b169937e 100755 --- a/scripts/ci/rust_checks.py +++ b/scripts/ci/rust_checks.py @@ -13,7 +13,7 @@ pixi run rs-check --only wasm To run all tests except a few specific ones you can use the `--skip` argument: - pixi run rs-check --skip wasm docs + pixi run rs-check --skip wasm docs docs_slow To see a list of all available tests you can use the `--help` argument: pixi run rs-check --help @@ -91,6 +91,7 @@ def main() -> None: ("individual_examples", individual_examples), ("individual_crates", individual_crates), ("docs", docs), + ("docs_slow", docs_slow), ("tests", tests), ] check_names = [check[0] for check in checks] @@ -199,12 +200,22 @@ def individual_crates(timings: list[Timing]) -> None: def docs(timings: list[Timing]) -> None: - # Full doc build takes prohibitively long (over 17min as of writing), so we skip it: - # timings.append(run_cargo("doc", "--all-features")) - - # These take around 3m40s each on CI, but very useful for catching broken doclinks: - timings.append(run_cargo("doc", "--no-deps --all-features --workspace")) - timings.append(run_cargo("doc", "--document-private-items --no-deps --all-features --workspace")) + # ⚠️ This version skips the `rerun` crate itself + # Presumably due to https://github.com/rust-lang/rust/issues/114891, checking the `rerun` crate + # takes about 20minutes on CI (per command). + # Since this crate mostly combines & exposes other crates, it's not as important for iterating on the code. + # + # For details see https://github.com/rerun-io/rerun/issues/7387 + + # These take a few minutes each on CI, but very useful for catching broken doclinks. + timings.append(run_cargo("doc", "--no-deps --all-features --workspace --exclude rerun")) + timings.append(run_cargo("doc", "--document-private-items --no-deps --all-features --workspace --exclude rerun")) + + +def docs_slow(timings: list[Timing]) -> None: + # See `docs` above, this may take 20min each due to issues in cargo doc. + timings.append(run_cargo("doc", "--no-deps --all-features -p rerun")) + timings.append(run_cargo("doc", "--document-private-items --no-deps --all-features -p rerun")) def tests(timings: list[Timing]) -> None: