Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

6.3 KB
Raw Blame
# cargo-nextest settings for CI (`cargo xtask test` does not use nextest).
# CI builds the tests once and runs them in one job on a 32 vCPU runner (.github/workflows/ci.yml),
# except the GPU path tracer's tests (the gpu-path group below), which run in four shards of their own.

[profile.ci]
# Heavy tests (one to twelve minutes each on a CI runner) that pull requests skip. They run on
# every push to main and nightly (`--ignore-default-filter`), and in `cargo xtask test`. The
# boolean_props property tests run only nightly (ci.yml excludes them from pushes to main).
# Keep this list in sync with docs/book/src/dev/testing.md and CONTRIBUTING.md.
default-filter = """
not (
    (package(solidcraft-engine) & (
        test(=tests::hostile_params_never_panic)
        | test(/^tests::robustness::/)
        | test(=pattern_suppress_tests::enclosure_arc_extinction_keeps_a_real_sharp_inner_lip_after_resize_and_reopen)
        | test(=pattern_suppress_tests::enclosure_datums_follow_wall_height_and_board_depth_with_material_proofs)
        | test(=cmd::plastic::tests::enclosure_snap_fit_follows_resized_front_wall)
    ))
    | (package(solidcraft-kernel) & test(=tests::boolean_identity_on_tangent_primitives))
    | (package(solidcraft-kernel) & test(=tspline::tests::hostile_tsplines_never_panic))
    | (package(solidcraft-kernel) & binary(boolean_props))
    | (package(solidcraft-engine) & binary(atomic_commands))
    | (package(solidcraft-ui-egui) & binary(scenarios) & test(=acceptance_sensor_enclosure))
)
"""
fail-fast = false
# Every test's time in the log, so the slow ones are easy to find.
status-level = "pass"
final-status-level = "slow"
failure-output = "immediate-final"
slow-timeout = { period = "60s" }

[profile.ci.junit]
path = "junit.xml"

# Bound the whole test process, including Vulkan host initialization and teardown.
# Cold runs can warm multiple pipelines before the first image starts rendering.
[[profile.ci.overrides]]
filter = "package(=solidcraft-ui-egui) & test(=render_workspace::tests::progressive_image_controls_route_to_the_registered_host)"
slow-timeout = { period = "60s", terminate-after = 20 }

# The action matrix sample runs its designs in parallel workers (ACTION_MATRIX_JOBS, set to match in
# ci.yml). Its workers reserve that many of nextest's threads, so the cores are not oversubscribed
# (a pi-case hole that takes 8 s alone went past the matrix's 90 s action limit when they were),
# and it starts first, beside the other slow tests.
[[profile.ci.overrides]]
filter = "binary(action_matrix) & test(=action_matrix_sample)"
threads-required = 12
priority = 100

# The slowest tests start first, so a shard does not end with one of them running alone on a
# core while the others sit idle. Medians from the CI test timings (the junit artifacts), slowest
# first; a test over ~100 s belongs here.
[[profile.ci.overrides]]
filter = """
(package(solidcraft-engine) & (
    test(/^tests::robustness::/)
    | test(=tests::hostile_params_never_panic)
    | test(=cmd::clearance::tests::distances_are_exact_on_edges_and_curved_faces)
    | test(=cmd::clipboard::tests::a_pasted_coil_joins_the_pasted_body)
    | test(=tests::pleat_join::the_pleats_join_at_every_wall_from_2_4_to_2_6_mm)
    | test(=tests::flush_join_loft::a_flange_flush_with_the_end_of_a_bent_tapered_tube_joins)
    | test(=cmd::sheet::tests::perforated_sheet_takes_a_thousand_round_holes)
    | test(=boolean_regression_tests::joined_loft_frames_plan_their_display_at_every_quality)
))
| (package(solidcraft-engine) & (binary(atomic_commands) | binary(step_export_regressions)))
| (package(solidcraft-kernel) & (
    test(=curveblend::tests::rolling_ball_turns_about_a_rounded_corner_of_its_radius)
    | test(=tests::fillet_tabbed_plate_outer_loop_and_partial_selection_after_hole)
    | test(=tspline::tests::hostile_tsplines_never_panic)
    | test(=fill::tests::regular_rims_of_three_to_eight_sides_fill_with_one_face_and_close_the_cup)
    | test(/^issue_788_tests::equal_bores_crossing_/)
))
"""
priority = 100

# Each nextest test has its own process/device. Concurrent cold lavapipe path
# compiles contend for CPU and can exhaust the 600 s pipeline setup budget.
# Serialize this module per CI shard; other tests retain their normal parallelism.
# CI runs these in their own job (GPU path tests in ci.yml), split into count partitions.
[test-groups.gpu-path]
max-threads = 1

[[profile.ci.overrides]]
filter = "package(=solidcraft-gpu) & test(/^path::/)"
test-group = "gpu-path"

# Full local validation opts into its own scheduling policy. Keep GitHub CI's
# worker reservation and slow-test priorities above independent of this runner.
[profile.local-ci]
inherits = "ci"

[[profile.local-ci.overrides]]
filter = "binary(action_matrix) & test(=action_matrix_sample)"
threads-required = "num-cpus"
priority = 100

[[profile.local-ci.overrides]]
filter = "package(solidcraft-kernel) & test(=tspline::tests::hostile_tsplines_never_panic)"
priority = 99

[[profile.local-ci.overrides]]
filter = """
(package(solidcraft-engine) & (
    test(/^tests::robustness::/)
    | test(=tests::hostile_params_never_panic)
    | test(=cmd::clearance::tests::distances_are_exact_on_edges_and_curved_faces)
    | test(=cmd::clipboard::tests::a_pasted_coil_joins_the_pasted_body)
    | test(=tests::pleat_join::the_pleats_join_at_every_wall_from_2_4_to_2_6_mm)
    | test(=tests::flush_join_loft::a_flange_flush_with_the_end_of_a_bent_tapered_tube_joins)
    | test(=cmd::sheet::tests::perforated_sheet_takes_a_thousand_round_holes)
    | test(=boolean_regression_tests::joined_loft_frames_plan_their_display_at_every_quality)
))
| (package(solidcraft-engine) & (binary(atomic_commands) | binary(step_export_regressions)))
| (package(solidcraft-kernel) & (
    test(=curveblend::tests::rolling_ball_turns_about_a_rounded_corner_of_its_radius)
    | test(=tests::fillet_tabbed_plate_outer_loop_and_partial_selection_after_hole)
    | test(=tspline::tests::hostile_tsplines_never_panic)
    | test(=fill::tests::regular_rims_of_three_to_eight_sides_fill_with_one_face_and_close_the_cup)
    | test(/^issue_788_tests::equal_bores_crossing_/)
))
"""
priority = 98

# Native Windows shader/device creation must not overlap within the local run.
[test-groups.windows-gpu]
max-threads = 1

[[profile.local-ci.overrides]]
platform = "cfg(windows)"
filter = "package(solidcraft-gpu) | package(solidcraft) | (package(solidcraft-ui-egui) & test(/(offscreen|gpu)/))"
test-group = "windows-gpu"