forked from apple/swift-nio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: set up continuous integration Modifications: * update docker file to include all dependencies required for build, unit tests, integration tests and doc generation * remove dependency steps from doc generation script * add integration tests driver script Result: able to set up docker based continuous integration
- Loading branch information
Showing
3 changed files
with
58 additions
and
44 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,24 +1,56 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER [email protected] | ||
ENTRYPOINT /bin/bash | ||
|
||
# install dependencies | ||
RUN apt-get -y update && apt-get -y install curl git libicu-dev clang-3.8 libpython2.7-dev libxml2 python-lldb-3.9 wget libssl-dev | ||
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100 | ||
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100 | ||
|
||
# install swiftenv | ||
RUN git clone https://github.com/kylef/swiftenv.git ~/.swiftenv | ||
RUN echo 'export SWIFTENV_ROOT="$HOME/.swiftenv"' >> ~/.bashrc | ||
RUN echo 'export PATH="$SWIFTENV_ROOT/bin:$PATH"' >> ~/.bashrc | ||
RUN echo 'export PATH="$HOME/scripts:$PATH"' >> ~/.bashrc | ||
RUN echo 'eval "$(swiftenv init -)"' >> ~/.bashrc | ||
|
||
#install script to allow mapping framepointers on linux | ||
RUN mkdir $HOME/scripts | ||
RUN wget -q https://raw.githubusercontent.com/apple/swift/1e078fbdfa768e211e0473cf917511efd73aec86/utils/symbolicate-linux-fatal -O $HOME/scripts/symbolicate-linux-fatal | ||
RUN chmod 755 $HOME/scripts/symbolicate-linux-fatal | ||
|
||
# install swift | ||
ARG version | ||
RUN $HOME/.swiftenv/bin/swiftenv install ${version:-4.0} | ||
|
||
# local | ||
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 | ||
|
||
# basic dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y wget git software-properties-common pkg-config | ||
RUN apt-get install -y libicu-dev libblocksruntime0 | ||
RUN apt-get install -y lsof dnsutils # used by integration tests | ||
|
||
# clang | ||
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - | ||
RUN apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" | ||
RUN apt-get update | ||
RUN apt-get install -y clang-5.0 lldb-5.0 | ||
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100 | ||
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100 | ||
|
||
# modern curl | ||
#RUN apt-get install -y curl | ||
RUN apt-get install -y build-essential libssl-dev | ||
RUN mkdir $HOME/.curl | ||
RUN wget -q http://curl.haxx.se/download/curl-7.50.3.tar.gz -O $HOME/curl.tar.gz | ||
RUN tar xzf $HOME/curl.tar.gz --directory $HOME/.curl --strip-components=1 | ||
RUN cd $HOME/.curl && ./configure --with-ssl && make && make install && cd - | ||
RUN ldconfig | ||
|
||
# swift | ||
ARG version=4.0.2 | ||
RUN mkdir $HOME/.swift | ||
RUN wget -q https://swift.org/builds/swift-${version}-release/ubuntu1404/swift-${version}-RELEASE/swift-${version}-RELEASE-ubuntu14.04.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 | ||
|
||
# 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 | ||
|
||
# ruby | ||
RUN apt-add-repository -y ppa:brightbox/ruby-ng | ||
RUN apt-get update | ||
RUN apt-get install -y ruby2.4 ruby2.4-dev libsqlite3-dev | ||
|
||
# known_hosts | ||
RUN mkdir -p $HOME/.ssh | ||
RUN touch $HOME/.ssh/known_hosts | ||
RUN ssh-keyscan github.com >> $HOME/.ssh/known_hosts |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p .build # for the junit.xml file | ||
./IntegrationTests/run-tests.sh --junit-xml .build/junit-sh-tests.xml |