build: use --profile=dev-release as the default cargo profile#70
Draft
darioush wants to merge 1 commit into
Draft
build: use --profile=dev-release as the default cargo profile#70darioush wants to merge 1 commit into
darioush wants to merge 1 commit into
Conversation
Speeds up expensive tests by building with release-style optimisations (opt-level=3, codegen-units=16, no LTO) while keeping debug-assertions on. Pre-merge CI in nearcore is unaffected; only nayduck builds use this profile. The displayed cargo commands in the web UI are updated to match what the worker actually runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch the nayduck worker's default (non-
--release) build to use thedev-releasecargo profile instead of plaindev. The profile is defined innearcore/Cargo.tomlasreleasewithlto=false,codegen-units=16, anddebug-assertions=true— so we get release-style optimisations while keeping debug asserts on.Motivation: expensive nightly tests run a long time. e.g. `tests::doomslug::ultra_slow_test_fuzzy_doomslug_liveness_and_safety` does heavy simulation in a 25ms-tick outer loop and is bottlenecked by codegen quality rather than I/O. The same logic applies to most other entries in nearcore's `nightly/expensive.txt`.
This is contained to nayduck's own build machines — pre-merge CI and local developer compiles are unaffected.
Changes
`lib/testspec.py` and the DB schema are untouched — the test-spec grammar is unchanged.
Risk
Test runtime behavior may shift since `opt-level=3` enables aggressive inlining and the test profile changes from `dev`-inherited to `release`-inherited (overflow-checks on, panic=abort). Worth a manual nightly run before un-drafting to confirm no regressions in the expensive suite.
Test plan