-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test formatting issues as part of sanity check (#84)
motivaiton: unified format changes: * use official docker image 🎉 * fix outstanding formatting issues * add a call to swiftformat as part of sanity script * fix sanity script language check debugging statements
- Loading branch information
Showing
12 changed files
with
82 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# file options | ||
|
||
--exclude .build | ||
|
||
# format options | ||
|
||
--self insert | ||
--patternlet inline | ||
--stripunusedargs unnamed-only | ||
--self insert | ||
--patternlet inline | ||
--stripunusedargs unnamed-only | ||
--comments ignore | ||
--ifdef no-indent | ||
|
||
# rules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,35 @@ | ||
ARG ubuntu_version=18.04 | ||
FROM ubuntu:$ubuntu_version | ||
ARG swift_version=5.0 | ||
ARG ubuntu_version=bionic | ||
FROM swift:$swift_version-$ubuntu_version | ||
# needed to do again after FROM due to docker limitation | ||
ARG swift_version | ||
ARG ubuntu_version | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
# do not start services during installation as this will fail and log a warning / error. | ||
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d | ||
# 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 | ||
|
||
# basic dependencies | ||
RUN apt-get update && apt-get install -y wget git build-essential software-properties-common pkg-config locales | ||
RUN apt-get update && apt-get install -y libicu-dev libblocksruntime0 curl libcurl4-openssl-dev libz-dev | ||
|
||
# local | ||
RUN locale-gen en_US.UTF-8 | ||
RUN locale-gen en_US en_US.UTF-8 | ||
RUN dpkg-reconfigure locales | ||
RUN echo 'export LANG=en_US.UTF-8' >> $HOME/.profile | ||
RUN echo 'export LANGUAGE=en_US:en' >> $HOME/.profile | ||
RUN echo 'export LC_ALL=en_US.UTF-8' >> $HOME/.profile | ||
|
||
# known_hosts | ||
RUN mkdir -p $HOME/.ssh | ||
RUN touch $HOME/.ssh/known_hosts | ||
RUN ssh-keyscan github.com 2> /dev/null >> $HOME/.ssh/known_hosts | ||
|
||
# clang | ||
RUN apt-get update && apt-get install -y clang-3.9 | ||
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100 | ||
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100 | ||
# dependencies | ||
RUN apt-get update && apt-get install -y wget | ||
RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools # used by integration tests | ||
|
||
# ruby and jazzy for docs generation | ||
#ARG skip_ruby_from_ppa | ||
#RUN [ -n "$skip_ruby_from_ppa" ] || apt-add-repository -y ppa:brightbox/ruby-ng | ||
#RUN [ -n "$skip_ruby_from_ppa" ] || { apt-get update && apt-get install -y ruby2.4 ruby2.4-dev; } | ||
#RUN [ -z "$skip_ruby_from_ppa" ] || { apt-get update && apt-get install -y ruby ruby-dev; } | ||
#RUN apt-get update && apt-get install -y libsqlite3-dev | ||
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev | ||
RUN gem install jazzy --no-ri --no-rdoc | ||
|
||
# swift | ||
ARG swift_version=4.2.3 | ||
ARG swift_flavour=RELEASE | ||
ARG swift_builds_suffix=release | ||
# tools | ||
RUN mkdir -p $HOME/.tools | ||
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile | ||
|
||
# script to allow mapping framepointers on linux (until part of the toolchain) | ||
RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal | ||
RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal | ||
|
||
RUN mkdir $HOME/.swift | ||
RUN wget -q "https://swift.org/builds/swift-${swift_version}-${swift_builds_suffix}/ubuntu$(echo $ubuntu_version | sed 's/\.//g')/swift-${swift_version}-${swift_flavour}/swift-${swift_version}-${swift_flavour}-ubuntu${ubuntu_version}.tar.gz" -O $HOME/swift.tar.gz | ||
RUN tar xzf $HOME/swift.tar.gz --directory $HOME/.swift --strip-components=1 | ||
RUN echo 'export PATH="$HOME/.swift/usr/bin:$PATH"' >> $HOME/.profile | ||
RUN echo 'export LINUX_SOURCEKIT_LIB_PATH="$HOME/.swift/usr/lib"' >> $HOME/.profile | ||
# swiftformat (until part of the toolchain) | ||
|
||
# script to allow mapping framepointers on linux | ||
RUN mkdir -p $HOME/.scripts | ||
RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.scripts/symbolicate-linux-fatal | ||
RUN chmod 755 $HOME/.scripts/symbolicate-linux-fatal | ||
RUN echo 'export PATH="$HOME/.scripts:$PATH"' >> $HOME/.profile | ||
ARG swiftformat_version=0.40.11 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters