mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Make Swift 5.2 the minimum requirement, dropping support for Swift 5.0 and 5.1. Motivation: Whenever we have problems, Swift 5.0 and 5.1 seem to be the culprits. Dropping support for these very old versions will require less maintenance and free up our time to work on new features. Modifications: Set the tools version in Package.swift to 5.2 Remove CI configurations for 5.0 and 5.1 Update the various readmes to reflect that this change will be rolled out in NIO 2.30.0 Result: Swift 5.2 is the minimum version of Swift required to use NIO.
36 lines
1.3 KiB
Docker
36 lines
1.3 KiB
Docker
ARG swift_version=5.2
|
|
ARG ubuntu_version=bionic
|
|
ARG base_image=swift:$swift_version-$ubuntu_version
|
|
FROM $base_image
|
|
# needed to do again after FROM due to docker limitation
|
|
ARG swift_version
|
|
ARG ubuntu_version
|
|
|
|
# set as UTF-8
|
|
RUN apt-get update && apt-get install -y locales locales-all
|
|
ENV LC_ALL en_US.UTF-8
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US.UTF-8
|
|
|
|
# dependencies
|
|
RUN apt-get update && apt-get install -y wget
|
|
RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools curl jq # used by integration tests
|
|
|
|
# ruby and jazzy for docs generation
|
|
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev build-essential
|
|
# switch of gem docs building
|
|
RUN echo "gem: --no-document" > ~/.gemrc
|
|
# jazzy no longer works on xenial as ruby is too old.
|
|
RUN if [ "${ubuntu_version}" != "xenial" ] ; then gem install jazzy; fi
|
|
|
|
# tools
|
|
RUN mkdir -p $HOME/.tools
|
|
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
|
|
|
|
# swiftformat (until part of the toolchain)
|
|
|
|
ARG swiftformat_version=0.40.12
|
|
RUN git clone --branch $swiftformat_version --depth 1 https://github.com/nicklockwood/SwiftFormat $HOME/.tools/swift-format
|
|
RUN cd $HOME/.tools/swift-format && swift build -c release
|
|
RUN ln -s $HOME/.tools/swift-format/.build/release/swiftformat $HOME/.tools/swiftformat
|