Added docker files for gcc and clang development environments

This commit is contained in:
Mathieu Champlon 2018-04-08 07:04:01 +02:00
parent 6a68fa728b
commit 47784f992e
5 changed files with 29 additions and 13 deletions

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
*.sh text eol=lf

View file

@ -11,7 +11,7 @@ rem error if BOOST_ROOT not set
set BOOST=%BOOST_ROOT%
pushd ..\test
%BOOST%\b2 -q %*
%BOOST%\b2.exe -q %*
popd
if errorlevel 1 exit /b %ERRORLEVEL%
@ -24,6 +24,6 @@ xcopy /Y /S /Q /I %BOOST%\doc\src\images\*.png ..\doc\html\images
xcopy /Y /S /Q /I %BOOST%\doc\src\images\callouts\*.png ..\doc\html\images\callouts
if errorlevel 1 exit /b %ERRORLEVEL%
pushd ..\doc
%BOOST%\b2 -q %*
%BOOST%\b2.exe -q %*
popd
if errorlevel 1 exit /b %ERRORLEVEL%

View file

@ -18,17 +18,6 @@
<property name="version" value="unreleased"/>
<import file="${env.PONEY_HOME}/poney.xml"/>
<target name="reports" description="generate code analysis reports">
<headers name="turtle" excludes="**/*_iterate.hpp,**/*_template.hpp"/>
<check name="turtle"/>
</target>
<target name="build" description="build tests and documentation">
<run dir="." script="build"/>
</target>
<target name="package" depends="build" description="produce release packages">
<fail unless="version" message="missing version property"/>
<copy file="version.hpp" tofile="${out.dir}/version.hpp" overwrite="true">

17
build/clang/Dockerfile Normal file
View file

@ -0,0 +1,17 @@
# $ docker build --platform=linux -f clang/Dockerfile -t turtle-clang .
FROM buildpack-deps:stretch
RUN apt-get update && apt-get install -y xsltproc docbook-xsl docbook-xml && apt-get autoremove && apt-get clean
ENV DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl \
DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2 \
BOOST_ROOT=/home/dev/cpp/boost/
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - && \
RUN echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --allow-unauthenticated clang-5.0 lld-5.0 libc++1 && \
apt-get autoremove && \
apt-get clean && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100 && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100
RUN echo 'cd /home/dev/cpp/turtle/build' >> ~/.bashrc
# $ docker run --platform=linux --rm -v C:/dev:/home/dev -m 32g -it turtle-clang
# ./build.sh --toolset=clang "cxxflags=-std=c++17 -stdlib=libc++ -Wno-unused-variable"

9
build/gcc/Dockerfile Normal file
View file

@ -0,0 +1,9 @@
# $ docker build -f Dockerfile -t turtle-gcc .
FROM gcc
RUN apt-get update && apt-get install -y xsltproc docbook-xsl docbook-xml && apt-get autoremove && apt-get clean
ENV DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl \
DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2 \
BOOST_ROOT=/home/dev/cpp/boost/
RUN echo 'cd /home/dev/cpp/turtle/build' >> ~/.bashrc
# $ docker run --platform=linux --rm -v C:/dev:/home/dev -m 16g -it turtle-gcc
# ./build.sh --toolset=gcc "cxxflags=-std=c++17 -Wno-noexcept-type -Wno-unused-variable -Wno-unused-function -Wno-deprecated-declarations"