Skip to content

[Windows] Use a multiroot data file to test (corelibs-)foundation on Windows #80122

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 19, 2025

We currently rebuild swift-syntax, swift-foundation-icu and swift-foundation twice: Once to test swift-foundation and once to test swift-corelibs-foundation. Using a unified build for both projects means that we only need to rebuild them once, saving ~5 minutes.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 19, 2025

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Mar 21, 2025

@swift-ci Please smoke test

@ahoppen ahoppen marked this pull request as ready for review March 21, 2025 16:55
@ahoppen ahoppen force-pushed the windows-multiroot-data-file branch from 3d7ce49 to 6053b15 Compare March 21, 2025 16:57
@ahoppen
Copy link
Member Author

ahoppen commented Mar 21, 2025

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 21, 2025

@swift-ci Please smoke test macOS

@ahoppen
Copy link
Member Author

ahoppen commented Mar 21, 2025

Odd, we are building less in the swift-corelibs-foundation test but it’s still slower. Attaching relevant portions of the build log and running again to see if there’s nondeterminism involved.

swift-PR-windows-38051.txt

@ahoppen
Copy link
Member Author

ahoppen commented Mar 21, 2025

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2025

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the windows-multiroot-data-file branch from 6053b15 to 3483edb Compare March 26, 2025 15:43
@ahoppen
Copy link
Member Author

ahoppen commented Mar 26, 2025

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Mar 27, 2025

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the windows-multiroot-data-file branch from 3483edb to a2e001a Compare March 28, 2025 03:45
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2025

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2025

@swift-ci Please test Windows

…Windows

We currently rebuild swift-syntax, swift-foundation-icu and swift-foundation twice: Once to test swift-foundation and once to test swift-corelibs-foundation. Using a unified build for both projects means that we only need to rebuild them once, saving ~5 minutes.
@ahoppen ahoppen force-pushed the windows-multiroot-data-file branch from a2e001a to c0a8227 Compare March 28, 2025 21:15
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2025

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Mar 29, 2025

Looking at the performance logs for this PR, I realized that #80082 accidentally changed swift-foundation to be tested in release configuration again. This restores it to be built in debug again.

It also saves ~2 minutes in swift-corelibs-foundation through the multiroot data file. It’s less than I would have expected

Before this PR:

  • Testing swift-foundation: 00:24:15
  • Testing swift-corelibs-foundation: 00:07:37

With this PR (Log):

  • Testing swift-foundation: 00:10:26
  • Testing swift-corelibs-foundation: 00:05:34

Running once more to see how stable these timings are.

Edit: Timings are stable.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 29, 2025

@swift-ci Please test Windows

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but CC @compnerd and @jmschonfeld as well

Copy link
Contributor

@jmschonfeld jmschonfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do the same thing on Linux to keep our test environments consistent between the two platforms?

-Platform $BuildPlatform
-Bin "$ScratchPath" `
-Platform $BuildPlatform `
-Configuration $FoundationTestConfiguration `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is $FoundationTestConfiguration defined somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, defaults to debug:

.PARAMETER FoundationTestConfiguration
Whether to run swift-foundation and swift-corelibs-foundation tests in a debug or release configuration.
...
  [ValidateSet("debug", "release")]
  [string] $FoundationTestConfiguration = "debug",

Should we do the same thing on Linux to keep our test environments consistent between the two platforms?

I had thought we were, but... apparently not 🤔

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