Skip to content

Install a Swift 5.8.1 toolchain in all swift-ci images #346

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 5 commits into from
Aug 22, 2023

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jul 6, 2023

Installs a Swift 5.8.1 toolchain into /opt/swift/<version> on each Linux platform. Removes clang since the toolchain clang can be used instead.

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

There's no way to share this code across Dockerfiles?

@bnbarham
Copy link
Contributor Author

bnbarham commented Jul 6, 2023

@shahmishal has some docker-compose ideas here IIUC.

With the base docker... not really. You could share a common base image, but this is the other way around - ie. we have a bunch of images that we then want to add a toolchain on top of. Could do some generator-like hackery I suppose, but I'm not sure that's really better (eg. could just have a makefile that concats a bunch of files together 😅). Another alternative would be something like edrevo/dockerfile-plus.

@shahmishal
Copy link
Member

@swift-ci test

@bnbarham bnbarham force-pushed the add-host-swift-to-linux-swift-ci branch from 7e3bb17 to 83d9b67 Compare July 6, 2023 16:44
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz

ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}"

Copy link
Contributor

Choose a reason for hiding this comment

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

should we use the RPM packages instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

We currently mark those as "experimental use only" on swift.org/download. Are we willing to try those out here anyway, or is description on that page outdated?

@tomerd
Copy link
Contributor

tomerd commented Jul 6, 2023

There's no way to share this code across Dockerfiles?

some of this can be made into a script that is that can be copied & used in the docker file

@bnbarham
Copy link
Contributor Author

bnbarham commented Jul 6, 2023

There's no way to share this code across Dockerfiles?

some of this can be made into a script that is that can be copied & used in the docker file

Ah that's a good point. Could do that, the extra curl for Ubuntu is a little annoying but we could install based on a parameter for that script.

@tomerd
Copy link
Contributor

tomerd commented Jul 6, 2023

the extra curl for Ubuntu is a little annoying but we could install based on a parameter for that script.

a bit less efficient from docker caching pov but we can install curl on ubuntu before the ADD and RUN commands for the script, then remove after. or even a more lazy approach, we can just include curl on these images in the main dependencies list even if we dont really need it for anything else

Installs a Swift 5.8.1 toolchain into `/opt/swift/<version>` on each
Linux platform. Removes clang since the toolchain clang can be used
instead.
@bnbarham bnbarham force-pushed the add-host-swift-to-linux-swift-ci branch from 83d9b67 to 4b27da7 Compare July 7, 2023 05:40
shahmishal and others added 4 commits July 6, 2023 22:43
This was only changed for Ubuntu, also update for Amazon Linux, CentOS,
and UBI.
This presumably came through clang previously as a transitive
dependency. Add it directly.
@MaxDesiatov
Copy link
Contributor

@swift-ci test

1 similar comment
@bnbarham
Copy link
Contributor Author

@swift-ci test

@bnbarham bnbarham force-pushed the add-host-swift-to-linux-swift-ci branch from 7da791c to d2463e0 Compare August 21, 2023 20:19
@bnbarham
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@shahmishal shahmishal merged commit 529bd9c into main Aug 22, 2023
@shahmishal shahmishal deleted the add-host-swift-to-linux-swift-ci branch August 22, 2023 04:45
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.

5 participants