Skip to content
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

[stdlib] Change paths for stdlib job and artifacts #888

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

Steelskin
Copy link
Collaborator

@Steelskin Steelskin commented Jan 30, 2025

Currently, in the stdlib job, the toolchain is extracted to BuildRoot/Library, and the Swift Standard Library is also installed to BuildRoot/Library. Other jobs typically extract the toolchain to BinaryCache/Library. This changes the extraction path to BinaryCache/Library in the stdlib job, bringing it in-line with the rest of the build.

In addition, this changes the Swift Standard Library artifact root to be BuildRoot/Library, rather than the full path to the platform SDK, BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform. This is in preparation for adapting the job to build for macOS, where the Swift Standard Library will be installed under Library/Toolchains/unknown-Asserts-development.xctoolchain/usr.

Extracted from #843

In the stdlib job, the toolchain is now extracted under
`BinaryCache/Library`, rather then under `BuildRoot/Library`. This
allows to change the SDK artifact root path to `BuildRoot/Library`,
simplifying download in subsequent jobs and making room for the macOS
toolchain paths.

Extracted from #843
@Steelskin Steelskin requested a review from compnerd January 30, 2025 20:22
@Steelskin
Copy link
Collaborator Author

PTAL. Here's the test job: https://github.com/thebrowsercompany/swift-build/actions/runs/13060564334
It will make #843 easier to parse.

Copy link
Owner

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

There are two changes here:

  1. rooting the artifacts higher to allow us to avoid having to specify the intermediary components
  2. Changing the location that the toolchain is extracted to

1 is clearly a simplification with no impact.

2 however is interesting. The differentiation between BinaryCache and BinaryRoot is that the BinaryCache is the current job's build artifacts (it is effectively a cache of the output). The BinaryRoot is the partially staged toolchain that we are building up. By separating the two it makes it easier to overlap the content as we build up more components. This would make that more difficult. This is a trade off, and I was wondering if you could go into more details of how you see this simplifying the build.

@Steelskin
Copy link
Collaborator Author

@compnerd Following our offline discussion, I updated the commit message to clarify.

@Steelskin Steelskin requested a review from compnerd January 30, 2025 22:10
Copy link
Owner

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Please squash and merge!

@Steelskin Steelskin merged commit c8227b1 into main Jan 31, 2025
1 check passed
@Steelskin Steelskin deleted the fabrice/stdlib-change-directories branch January 31, 2025 18:46
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.

2 participants