-
Notifications
You must be signed in to change notification settings - Fork 197
Reinstate "Use Swift 5.7 base image for Swift CI jobs to support bootstrapping" #341
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
Changes from all commits
b0e6864
aeb7675
9b7f447
1c3ad26
243fd5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ FROM centos:7 | |
|
||
RUN yum install shadow-utils.x86_64 -y | ||
|
||
RUN groupadd -g 998 build-user && \ | ||
RUN groupadd -g 1000 build-user && \ | ||
useradd -m -r -u 42 -g build-user build-user | ||
|
||
RUN yum install -y epel-release centos-release-scl | ||
|
@@ -48,6 +48,38 @@ RUN ldconfig | |
|
||
RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h | ||
|
||
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561 | ||
ARG SWIFT_PLATFORM=centos7 | ||
ARG SWIFT_BRANCH=swift-5.7.3-release | ||
ARG SWIFT_VERSION=swift-5.7.3-RELEASE | ||
ARG SWIFT_WEBROOT=https://download.swift.org | ||
|
||
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ | ||
SWIFT_PLATFORM=$SWIFT_PLATFORM \ | ||
SWIFT_BRANCH=$SWIFT_BRANCH \ | ||
SWIFT_VERSION=$SWIFT_VERSION \ | ||
SWIFT_WEBROOT=$SWIFT_WEBROOT | ||
|
||
RUN set -e; \ | ||
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)" \ | ||
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \ | ||
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ | ||
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. | ||
&& export GNUPGHOME="$(mktemp -d)" \ | ||
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ | ||
&& gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ | ||
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ | ||
&& mkdir -p /opt/swift \ | ||
# - Unpack the toolchain, set libs permissions, and clean up. | ||
&& tar -xzf swift.tar.gz --directory /opt/swift/ --strip-components=1 \ | ||
&& chmod -R o+r /opt/swift/usr/lib/swift \ | ||
&& ln -s /opt/swift/usr/lib/swift /usr/lib/swift \ | ||
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz | ||
|
||
ENV PATH="/opt/swift/usr/bin:${PATH}" | ||
|
||
RUN swift --version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a surprising change. why do we need to do this? should we fix the docker image instead if this is fixing something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally all our release images would install into Without this change, Swift uses the toolchain-clang to build and then uses the system C++ stdlib instead of devtoolset as it should. The system stdlib is wildly out of date (unsurprising) and thus doesn't have any new C++ features. @shahmishal given all the other images are using the toolchain clang, perhaps we should make this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, that make sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We can change this in 5.9 release, if the community is ok with the change. I would like to avoid this type of change in dot release. |
||
|
||
USER build-user | ||
|
||
WORKDIR /home/build-user | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be pinned to 5.7 or use the latest release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinned makes sense to me given that we support releases up to 12 months back. So 5.7/5.8/.5.9. Though ideally we'd have a build for 5.8 + 5.9 going as well.