build: Fixed docker builds

* fixed Boost c++ standard
* build with docker on mac
* added mail script
* fixed cxx index sample test on mac
* disabled gradle source group test for linux docker builds
This commit is contained in:
Eberhard Graether
2018-11-03 03:18:06 +01:00
parent bff7b0d70a
commit 466f094800
7 changed files with 69 additions and 10 deletions
@@ -4,6 +4,8 @@ MAINTAINER "Andreas Stallinger" <astallinger@coati.io>
WORKDIR /opt
RUN rpm --rebuilddb; yum install -y yum-plugin-ovl ca-certificates;
RUN yum -y install wget && \
wget https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-4.1/repo/\
epel-6/mlampe-devtoolset-4.1-epel-6.repo -O /etc/yum.repos.d/mlampe-devtoolset.repo && \
@@ -36,13 +38,14 @@ tar xzf apache-maven-3.5.0-bin.tar.gz && \
ln -s apache-maven-3.5.0 maven && \
rm apache-maven-3.5.0-bin.tar.gz
ENV M2_HOME=/opt/maven
ENV M2_HOME=/opt/maven
ENV PATH=${M2_HOME}/bin:${PATH}
# Install Qt
ARG QVERSION_SHORT=5.10
ARG QTVERSION=5.10.1
# Install Qt
RUN mkdir -p /qt && cd /qt && \
wget http://download.qt.io/archive/qt/${QVERSION_SHORT}/${QTVERSION}/\
single/qt-everywhere-src-${QTVERSION}.tar.xz && \
@@ -50,10 +53,34 @@ tar xvf qt-everywhere-src-${QTVERSION}.tar.xz && \
ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++ && \
ln -sf /opt/rh/devtoolset-4/root/usr/bin/c++ /usr/bin/c++ && \
cd /qt/qt-everywhere-src-${QTVERSION} && \
./configure -v -prefix /opt/qt${QTVERSION} -skip qtgamepad -platform linux-g++ -qt-pcre \
-qt-xcb -qt-xkbcommon -xkb-config-root /usr/share/X11/xkb \
-no-pch -confirm-license -opensource && \
make -j 8 || make -j 1 install; make -j8 install && rm -Rf /qt
./configure -v \
-prefix /opt/qt${QTVERSION} \
-skip qtgamepad \
-platform linux-g++ \
-qt-pcre \
-qt-xcb \
-qt-xkbcommon \
-no-pch \
-xkb-config-root /usr/share/X11/xkb \
-no-use-gold-linker \
-release \
-no-compile-examples \
-confirm-license \
-opensource \
-nomake examples \
-nomake tests \
-skip sensors \
-skip webchannel \
-skip webengine \
-skip 3d \
-skip doc \
-skip multimedia \
-skip tools \
-skip connectivity \
-skip androidextras \
-skip canvas3d && \
make -j8 && \
make -j8 install && rm -Rf /qt
## set env
ENV CXX=g++ \
@@ -101,7 +128,7 @@ BOOST_VERSION_UNDERSCORE=${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}
RUN wget http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && \
tar -xzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && cd boost_${BOOST_VERSION_UNDERSCORE} && \
./bootstrap.sh --with-libraries=filesystem,program_options,system,date_time --prefix=/opt/boost && \
./b2 install --link=static --variant=release --threading=multi --runtime-link=static --cxxflags=-fPIC && \
./b2 install cxxstd=14 --link=static --variant=release --threading=multi --runtime-link=static --cxxflags="-std=c++14 -fPIC" && \
cd .. && rm boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && rm boost_${BOOST_VERSION_UNDERSCORE} -r
## Ninja
@@ -78,7 +78,6 @@ cd /botan && \
ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++ && \
ln -sf /opt/rh/devtoolset-4/root/usr/bin/c++ /usr/bin/c++ && \
git checkout 2.1.0 && \
./configure.py --disable-shared --prefix=/opt/botan && \
make -j8 && make install && \
rm -rf /botan
@@ -93,7 +92,7 @@ BOOST_VERSION_UNDERSCORE=${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}
RUN wget http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && \
tar -xzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && cd boost_${BOOST_VERSION_UNDERSCORE} && \
./bootstrap.sh --with-libraries=filesystem,program_options,system,date_time --prefix=/opt/boost && \
./b2 install --link=static --variant=release --threading=multi --runtime-link=static --cxxflags=-fPIC && \
./b2 install cxxstd=14 --link=static --variant=release --threading=multi --runtime-link=static --cxxflags="-std=c++14 -fPIC" && \
cd .. && rm boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && rm boost_${BOOST_VERSION_UNDERSCORE} -r
## Ninja
@@ -4,6 +4,8 @@ MAINTAINER "Andreas Stallinger" <astallinger@coati.io>
WORKDIR /opt
RUN rpm --rebuilddb; yum install -y yum-plugin-ovl ca-certificates;
RUN yum -y install centos-release-scl epel-release && \
yum -y install wget devtoolset-4-gcc devtoolset-4-gcc-c++ devtoolset-4-binutils \
wget tar bzip2 git libtool which fuse fuse-devel libpng-devel automake \
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
OUTPUT="csv.txt"
touch $OUTPUT
echo "NAME\tMAIL\tDATE" > $OUTPUT
for FILE in ./*.eml
do
TEST=$(grep -E -o "test license" $FILE)
INVITE=$(grep -E -o "invited" $FILE)
UPGRADE=$(grep -E -o "Upgrade" $FILE)
MAIL=$(grep -E -o "^To: [A-Za-z0-9._%+-]*@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}" $FILE | sed 's .\{4\} ')
NAME=$(grep -E -o "<p>Hello .*,</p>" $FILE | sed 's .\{9\} ' | sed 's .\{5\}$ ' | sed 's/=/\\x/g')
DATE=$(grep -E -o "Delivery-date: .*" $FILE | sed 's .\{20\} ' | sed 's .\{15\}$ ')
RECORD="$NAME\t$MAIL"
# if [[ ! -z "$INVITE" ]]
# if [[ ! -z "$UPGRADE" ]]
if [[ ! -z "$TEST" ]]
then
RECORD="$RECORD\t$DATE"
echo $RECORD
echo $RECORD >> $OUTPUT
fi
done
+1 -1
View File
@@ -171,7 +171,7 @@ private:
std::shared_ptr<TextAccess> parseCode(const FilePath& sourceFilePath, const FilePath& projectDataSrcRoot)
{
const std::set<FilePath> indexedPaths = { projectDataSrcRoot };
const std::set<FilePath> indexedPaths = { projectDataSrcRoot.getCanonical() };
const std::set<FilePathFilter> excludedFilters = {};
const std::set<FilePathFilter> includedFilters = {};
const FilePath workingDirectory(L".");
+2
View File
@@ -297,6 +297,7 @@ public:
void test_sourcegroup_java_gradle_generates_expected_output()
{
#ifndef __linux__
const std::wstring projectName = L"java_gradle";
ProjectSettings projectSettings;
@@ -323,6 +324,7 @@ public:
applicationSettings->setJreSystemLibraryPaths(storedJreSystemLibraryPaths);
AppPath::setAppPath(storedAppPath);
#endif
}
void test_sourcegroup_java_maven_generates_expected_output()
+2 -1
View File
@@ -5,6 +5,7 @@
#include "AccessKind.h"
#include "Edge.h"
#include "FilePath.h"
#include "IntermediateStorage.h"
#include "LocationType.h"
#include "NameHierarchy.h"
@@ -20,7 +21,7 @@ public:
std::map<Id, FilePath> filePathMap;
for (const StorageFile& file : getStorageFiles())
{
filePathMap.emplace(file.id, file.filePath);
filePathMap.emplace(file.id, FilePath(file.filePath));
files.emplace(file.filePath);
addLine(L"FILE: " + FilePath(file.filePath).fileName() + (file.indexed ? L"" : L" non-indexed"));