Skip to content

Commit

Permalink
Split out (ultra-)slow cargo doc jobs and run them only on nightly (#…
Browse files Browse the repository at this point in the history
…7399)

### What

* Fixes #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`.
  • Loading branch information
Wumpf authored Sep 11, 2024
1 parent 9ddf77e commit 8ddd84f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_checks_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
25 changes: 18 additions & 7 deletions scripts/ci/rust_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8ddd84f

Please sign in to comment.