swiftlang / swift-docker

Docker Official Image packaging for Swift
https://swift.org
Apache License 2.0
1.36k stars 182 forks source link

Reinstate "Use Swift 5.7 base image for Swift CI jobs to support bootstrapping" #341

Closed DougGregor closed 10 months ago

DougGregor commented 1 year ago

With https://github.com/apple/swift/pull/66199, we're close(r) to the point where we can build the Swift compiler that integrates Swift code built using the host Swift.

DougGregor commented 1 year ago

@swift-ci please test

tomerd commented 1 year ago

Ideally all our release images would install into /opt/swift/ instead of /usr

this is where I was going with my questions. I think we should fix this going forward

tomerd commented 1 year ago

cc @etcwilde @MaxDesiatov

etcwilde commented 1 year ago

Yep, using /opt/swift-<version> means we can install toolchains for multiple versions of swift (important since we don’t have ABI stability guarantees on Linux), and so that we don’t conflict with the distribution toolchains. This is consistent with how redhat and centos bundle additional and newer toolchains. It’s also consistent the UNIX directory hierarchy spec.

reserved for the installation of add-on application software packages.

It gives us a lot more flexibility for how we want to distribute things.

tomerd commented 1 year ago

fwiw, not all distributions like things in /opt so this may need to be refined per distribution, but 100% with the approach and we should def fix it in the toolchain packaging itself since its more correct

bnbarham commented 1 year ago

I've updated to use a downloaded toolchain rather than the base image for all Linux platforms - https://github.com/apple/swift-docker/pull/346. Made a new PR since I wanted to rebase + squash.