Skip to content

[build-script]: Automatically choose a built ninja #80102

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

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

etcwilde
Copy link
Member

Instead of using --build-ninja to decide to build ninja, build it automatically if a sufficiently new enough version is not available. Also record the build time taken to build the local Ninja so that we can see how much time we would save by stashing a pre-built Ninja in CI.

This is more like how build-script pre-builds CMake when necessary.

@etcwilde etcwilde requested review from compnerd and edymtt March 18, 2025 21:35
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde force-pushed the ewilde/choose-built-ninja branch 2 times, most recently from bd426d7 to 7db7b3d Compare March 19, 2025 04:34
@etcwilde
Copy link
Member Author

@swift-ci please test

Instead of using `--build-ninja` to decide to build ninja, build it
automatically if a sufficiently new enough version is not available.
Also record the build time taken to build the local Ninja so that we can
see how much time we would save by stashing a pre-built Ninja in CI.
@etcwilde etcwilde force-pushed the ewilde/choose-built-ninja branch from 7db7b3d to 9402a16 Compare March 19, 2025 14:36
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde enabled auto-merge March 19, 2025 20:32
@etcwilde etcwilde merged commit f5f79f0 into swiftlang:main Mar 19, 2025
4 of 5 checks passed
drodriguez added a commit that referenced this pull request Mar 21, 2025
The test was using the default value for SWIFT_BUILD_ROOT, which tried
to write into `.build_script_log`. Use an environment variable so the
tests use their own directory and write files that do not append to the
actual `.build_script_log`.

Follow up to #80102
@etcwilde etcwilde deleted the ewilde/choose-built-ninja branch April 3, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants