-
Notifications
You must be signed in to change notification settings - Fork 43
[CI] Warm start CI before tests #565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Copyright (c) 2025-2026, The Isaac Lab Arena Project Developers (https://github.com/isaac-sim/IsaacLab-Arena/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """Warm the Kit shader cache by launching and closing a SimulationApp. | ||
|
|
||
| On CI (fresh container, no cached shaders) the first SimulationApp startup | ||
| compiles hundreds of RTX/rendering shaders, taking 60-180 s on constrained | ||
| runners. Running this script once before tests ensures every subsequent | ||
| SimulationApp — persistent or subprocess-spawned — gets a warm-cache start. | ||
|
|
||
| Usage: | ||
| /isaac-sim/python.sh scripts/warm_shader_cache.py | ||
| """ | ||
|
|
||
| import argparse | ||
| import time | ||
|
|
||
| from isaaclab.app import AppLauncher | ||
|
|
||
|
|
||
| def main(): | ||
| t0 = time.monotonic() | ||
| args = argparse.Namespace(headless=True, enable_cameras=True, visualizer=[]) | ||
| launcher = AppLauncher(args) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Hand-rolling Consider: parser = argparse.ArgumentParser()
AppLauncher.add_app_launcher_args(parser)
args = parser.parse_args(["--headless", "--enable_cameras"])This also self-documents the available flags. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth a brief comment explaining why |
||
| elapsed_launch = time.monotonic() - t0 | ||
| print(f"[warm_shader_cache] AppLauncher ready in {elapsed_launch:.1f}s") | ||
|
|
||
| launcher.app.close() | ||
| elapsed_total = time.monotonic() - t0 | ||
| print(f"[warm_shader_cache] Done in {elapsed_total:.1f}s") | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a step-level
timeout-minutes: 10here. The docstring says shader compilation can take 60-180s, but if Kit hangs (no GPU, license issues, etc.) you'd want the step to fail fast rather than burn the full job timeout.