Skip to content

utils: add support for testing self-hosted SPM #71341

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
Feb 4, 2024

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Feb 2, 2024

-Test swiftpm will use the self-hosted build of SPM to run the test suite. By using the SWIFTCI_USE_LOCAL_DEPS=1 environment variable, we do reduce some of the cost of this by not recloning the repositories, but the entire dependency tree must be built a second time due to the switch in the build system.

@compnerd
Copy link
Member Author

compnerd commented Feb 2, 2024

CC: @bnbarham @hyp @hjyamauchi

@compnerd
Copy link
Member Author

compnerd commented Feb 2, 2024

@swift-ci please smoke test

@bnbarham
Copy link
Contributor

bnbarham commented Feb 2, 2024

Thanks 🙇‍♂️!

We can use this PR and cross-PR test in SPM to get it green. Either by making it default for now here, or by adding the -Test swiftpm to the existing job. (Or we can merge this, then have another PR that just enables it by default for cross-PR testing)

@compnerd
Copy link
Member Author

compnerd commented Feb 2, 2024

I personally would prefer the latter - this functionality is useful for local development. #71349 will fail due to the -parse-as-library change being required to make progress.

@bnbarham
Copy link
Contributor

bnbarham commented Feb 3, 2024

Sure, sounds reasonable to me 👍 Thanks for putting that up already!

@compnerd
Copy link
Member Author

compnerd commented Feb 3, 2024

Ah, found a small difference between my local usage and CI usage - will tweak this to make sure it works on both.

`-Test swiftpm` will use the self-hosted build of SPM to run the test
suite. By using the `SWIFTCI_USE_LOCAL_DEPS=1` environment variable, we
do reduce some of the cost of this by not recloning the repositories,
but the entire dependency tree must be built a second time due to the
switch in the build system.
@compnerd
Copy link
Member Author

compnerd commented Feb 3, 2024

@swift-ci please smoke test

@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2024

I am going to merge this for now as it improves the build.ps1 state to allow local development with this. swiftlang/swift-package-manager#7320 tracks the universal enablement while #71349 demonstrated that this does function on CI though the test suite crashes during execution.

@compnerd compnerd merged commit 4b72554 into swiftlang:main Feb 4, 2024
@compnerd compnerd deleted the swiftpm branch February 4, 2024 19:25
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