thebrowsercompany / swift-build

Swift toolchain builds by The Browser Company
350 stars 11 forks source link

Relationship between projects #109

Closed chawyehsu closed 6 months ago

chawyehsu commented 6 months ago

There are currently two different swift-build I found:

I was guided to here by thebrowsercompany/windows-samples writing:

Install latest Swift SDK from thebrowsercompany/swift-build

Though it seems both of them are primarily maintained by @compnerd ?? the Swift Windows champion, only in this repo snapshot releases are built and provided, via GitHub CI. Yet both READMEs recommend latest build from the downloads page of Swift website, while the snapshot release on the Swift downloads website falls behind builds on this repo.

So I'm confused, if I want to get Swift snapshots for Win, which one is now recommended and the most active? Builds from this repo, from the Swift website or from compnerd/swift-build (no downloadable artifacts provided there though)?

Thanks in advance.

compnerd commented 6 months ago

https://github.com/compnerd/swift-build is the original (upstream) swift build. It has the definitions for the CI. This is a fork of it with a few changes (dependent on paid services). It routinely syncs from upstream, the only visible difference being the cadence at which the builds occur (there is a scheduled build). Other non-visible changes are for internal usage at The Browser Company.

Neither of these repositories provides official releases. They are custom builds. The official releases of Swift are available at https://download.swift.org. You are free to try to use one of the builds here (with no expectation of support). The reason that compnerd/swift-build does not have releases is that it was originally using the Azure builders and there were pinned builds there and the GHA builds did not always complete.

chawyehsu commented 6 months ago

Thanks for the clarification. I will try these different builds since it's difficult to build Swift from source myself.

And may I ask one more question if checksums for builds from this repo could be provided together with installers. I believe the following changes will simply do the job:

diff --git a/swift-toolchain.yml b/swift-toolchain.yml
index f6788ea..1ea4778 100644
--- a/swift-toolchain.yml
+++ b/swift-toolchain.yml
@@ -2529,6 +2529,10 @@ jobs:
           cd ${{ github.workspace }}/tmp/amd64
           mv installer.exe installer-amd64.exe
           gh release upload ${{ needs.context.outputs.swift_tag }} installer-amd64.exe -R ${{ github.repository }}
+          shasum -a 256 installer-amd64.exe > installer-amd64.exe.sha256
+          gh release upload ${{ needs.context.outputs.swift_tag }} installer-amd64.exe.sha256 -R ${{ github.repository }}
           cd ${{ github.workspace }}/tmp/arm64
           mv installer.exe installer-arm64.exe
           gh release upload ${{ needs.context.outputs.swift_tag }} installer-arm64.exe -R ${{ github.repository }}
+          shasum -a 256 installer-arm64.exe > installer-arm64.exe.sha256
+          gh release upload ${{ needs.context.outputs.swift_tag }} installer-arm64.exe.sha256 -R ${{ github.repository }}
compnerd commented 6 months ago

That is pretty reasonable. Would you mind opening a PR against compnerd/swift-build with the change?