diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8176fe21..c5b788e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ variables: MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" - IMAGE_64: coatisoftware/centos6_64_qt_llvm:qt5101-llvm700 - IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm700 + IMAGE_64: coatisoftware/centos6_64_qt_llvm:qt5101-llvm800 + IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm800 ## Templates ## @@ -15,7 +15,7 @@ variables: script: - ./script/buildonly.sh all - ./script/buildonly.sh package - - ./script/build.sh release test + # - ./script/build.sh release test artifacts: name: "$CI_JOB_NAME" paths: @@ -42,10 +42,7 @@ variables: build:Linux64: image: $IMAGE_64 - only: - - /^release.*$/ - - master - - tags + when: manual cache: key: cache_linux_64 paths: @@ -55,16 +52,12 @@ build:Linux64: build:Linux32: image: $IMAGE_32 - only: - - /^release.*$/ - - master - - tags + when: manual cache: key: cache_linux_32 paths: - ccache/ - java_indexer/.m2/repository - when: manual <<: *build_def LicenseGenerator: diff --git a/cmake/linux_package.cmake b/cmake/linux_package.cmake index 39e15244..5ba9cdd8 100644 --- a/cmake/linux_package.cmake +++ b/cmake/linux_package.cmake @@ -49,12 +49,15 @@ function(AddSharedToComponent) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/data DESTINATION Sourcetrail - PATTERN "log/*" EXCLUDE - PATTERN "data/src" EXCLUDE - PATTERN "projects" EXCLUDE - PATTERN "data/install" EXCLUDE + PATTERN "install" EXCLUDE PATTERN "ProjectSettings_template.xml" EXCLUDE PATTERN "color_scheme_template.xml" EXCLUDE + PATTERN "python/SourcetrailPythonIndexer" EXCLUDE + ) + + INSTALL(PROGRAMS + ${CMAKE_SOURCE_DIR}/bin/app/data/python/SourcetrailPythonIndexer + DESTINATION Sourcetrail/data/python ) INSTALL(FILES @@ -105,6 +108,7 @@ function(AddSharedToComponent) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/user DESTINATION Sourcetrail + PATTERN "log/*" EXCLUDE PATTERN "ApplicationSettings.xml" EXCLUDE PATTERN "ApplicationSettings_template.xml" EXCLUDE ) diff --git a/deployment/dockerfiles/README.md b/deployment/dockerfiles/README.md index 80771980..f070aafe 100644 --- a/deployment/dockerfiles/README.md +++ b/deployment/dockerfiles/README.md @@ -11,7 +11,7 @@ docker build -t /: Upload docker images -------------------- -docker login +docker login docker push /: @@ -24,6 +24,10 @@ $ docker image ls $ docker rmi coatisoftware/centos6_64_qt_llvm: $ docker rmi coatisoftware/centos6_32_qt_llvm: +# docker clean up + +$ docker system prune + # change library version numbers in docker files # build and upload docker images with new e.g. qt591-llvm500: diff --git a/deployment/dockerfiles/linux/centos6_32/Dockerfile b/deployment/dockerfiles/linux/centos6_32/Dockerfile index 4d86f1f6..60327111 100755 --- a/deployment/dockerfiles/linux/centos6_32/Dockerfile +++ b/deployment/dockerfiles/linux/centos6_32/Dockerfile @@ -7,23 +7,18 @@ 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 && \ -wget https://copr.fedorainfracloud.org/coprs/tmz/git/repo/epel-6/tmz-git-epel-6.repo \ - -O /etc/yum.repos.d/git.repo && \ -yum -y install epel-release && \ -wget https://centos6.iuscommunity.org/ius-release.rpm && \ -rpm -Uvh ius-release*.rpm && \ +wget https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-6/repo/\ +epel-6/mlampe-devtoolset-6-epel-6.repo -O /etc/yum.repos.d/mlampe-devtoolset.repo && \ yum -y update && \ -yum -y install devtoolset-4-gcc devtoolset-4-gcc-c++ devtoolset-4-binutils \ - wget tar bzip2 git libtool which fuse fuse-devel libpng-devel automake \ - glibc-headers libstdc++-devel gcc-c++ freetype-devel fontconfig-devel \ - ibxml2-devel libstdc++-devel libXrender-devel patch xcb-util-keysyms-devel \ - libXi-devel libudev-devel openssl-devel sqlite-devel \ - gperftools gperf libicu-devel boost-devel \ - libxslt-devel docbook-style-xsl.noarch python27 \ - xz mesa-libEGL-devel mesa-libGL-devel glib-devel \ - java-1.8.0-openjdk-devel ccache re2c ImageMagick vim lftp unzip && \ +yum -y install devtoolset-6-gcc devtoolset-6-gcc-c++ devtoolset-6-binutils \ + wget tar bzip2 git libtool which fuse fuse-devel libpng-devel automake \ + glibc-headers libstdc++-devel gcc-c++ freetype-devel fontconfig-devel \ + ibxml2-devel libstdc++-devel libXrender-devel patch xcb-util-keysyms-devel \ + libXi-devel libudev-devel openssl-devel sqlite-devel \ + gperftools gperf libicu-devel boost-devel \ + libxslt-devel docbook-style-xsl.noarch python27 \ + xz mesa-libEGL-devel mesa-libGL-devel glib-devel \ + java-1.8.0-openjdk-devel ccache re2c ImageMagick vim lftp unzip && \ yum clean all # CMake and Maven @@ -50,8 +45,8 @@ RUN mkdir -p /qt && cd /qt && \ wget http://download.qt.io/archive/qt/${QVERSION_SHORT}/${QTVERSION}/\ single/qt-everywhere-src-${QTVERSION}.tar.xz && \ 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++ && \ +ln -sf /opt/rh/devtoolset-6/root/usr/bin/g++ /usr/bin/g++ && \ +ln -sf /opt/rh/devtoolset-6/root/usr/bin/c++ /usr/bin/c++ && \ cd /qt/qt-everywhere-src-${QTVERSION} && \ ./configure -v \ -prefix /opt/qt${QTVERSION} \ @@ -85,11 +80,17 @@ make -j8 install && rm -Rf /qt ## set env ENV CXX=g++ \ CC=gcc \ -DEVTOOLSET=/opt/rh/devtoolset-4/root/usr/ +DEVTOOLSET=/opt/rh/devtoolset-6/root/usr/ + +RUN wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz && \ +tar xzf Python-2.7.13.tgz && \ +cd Python-2.7.13 && \ +./configure && \ +make altinstall ## Install llvm -ARG LLVM_VERSION=7.0.0 -RUN alias python=/usr/bin/python2.7 && mkdir -p /llvm && cd /llvm && \ +ARG LLVM_VERSION=8.0.0 +RUN alias python=/usr/local/bin/python2.7 && mkdir -p /llvm && cd /llvm && \ wget http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz && \ tar xf llvm-${LLVM_VERSION}.src.tar.xz && \ cd llvm-${LLVM_VERSION}.src && pwd && \ @@ -99,9 +100,7 @@ tar xf cfe-${LLVM_VERSION}.src.tar.xz && \ cd /llvm/llvm-${LLVM_VERSION}.src/projects && \ wget http://llvm.org/releases/${LLVM_VERSION}/compiler-rt-${LLVM_VERSION}.src.tar.xz && \ tar xf compiler-rt-${LLVM_VERSION}.src.tar.xz && \ -#. /opt/rh/python27/enable && \ -. /opt/rh/devtoolset-4/enable && \ -python --version && \ +. /opt/rh/devtoolset-6/enable && \ cd /llvm/llvm-${LLVM_VERSION}.src && mkdir -p build && cd build && \ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/llvm/ \ -DCMAKE_BUILD_TYPE=Release \ @@ -148,17 +147,17 @@ git checkout 4.4 RUN useradd builder # Make sure the above SCLs are already enabled -#ENTRYPOINT ["/bin/bash", "-c", "source", "/opt/rh/devtoolset-4/enable"] -#CMD ["/bin/bash", "-c", "source", "/opt/rh/devtoolset-4/enable"] +#ENTRYPOINT ["/bin/bash", "-c", "source", "/opt/rh/devtoolset-6/enable"] +#CMD ["/bin/bash", "-c", "source", "/opt/rh/devtoolset-6/enable"] RUN GCC_VERSION=$(g++ -dumpversion) && \ -ln -s /opt/rh/devtoolset-4/root/usr/include/c++/${GCC_VERSION} /usr/include/c++/${GCC_VERSION} && \ -ln -s /opt/rh/devtoolset-4/root/usr/lib/gcc/i686-redhat-linux/${GCC_VERSION} \ +ln -s /opt/rh/devtoolset-6/root/usr/include/c++/${GCC_VERSION} /usr/include/c++/${GCC_VERSION} && \ +ln -s /opt/rh/devtoolset-6/root/usr/lib/gcc/i686-redhat-linux/${GCC_VERSION} \ /usr/lib/gcc/i686-redhat-linux/${GCC_VERSION} && \ -echo "source /opt/rh/devtoolset-4/enable" >> /etc/bashrc -## set env -ENV CXX=/opt/rh/devtoolset-4/root/usr/bin/g++ \ -CC=/opt/rh/devtoolset-4/root/usr/bin/gcc \ +echo "source /opt/rh/devtoolset-6/enable" >> /etc/bashrc + +ENV CXX=/opt/rh/devtoolset-6/root/usr/bin/g++ \ +CC=/opt/rh/devtoolset-6/root/usr/bin/gcc \ BOTAN_DIR=/opt/botan \ CXX_TEST_DIR=/opt/cxxtest \ JAVA_HOME=/usr/lib/jvm/java-openjdk \ diff --git a/deployment/dockerfiles/linux/centos6_64/Dockerfile b/deployment/dockerfiles/linux/centos6_64/Dockerfile index dcdcd51a..bb30ae98 100755 --- a/deployment/dockerfiles/linux/centos6_64/Dockerfile +++ b/deployment/dockerfiles/linux/centos6_64/Dockerfile @@ -1,4 +1,4 @@ -FROM coatisoftware/centos6_64_gcc +FROM coatisoftware/centos6_64_base MAINTAINER "Andreas Stallinger" @@ -20,8 +20,8 @@ RUN mkdir -p /qt && cd /qt && \ wget http://download.qt.io/archive/qt/${QVERSION_SHORT}/${QTVERSION}/\ single/qt-everywhere-src-${QTVERSION}.tar.xz && \ 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++ && \ +ln -sf /opt/rh/devtoolset-6/root/usr/bin/g++ /usr/bin/g++ && \ +ln -sf /opt/rh/devtoolset-6/root/usr/bin/c++ /usr/bin/c++ && \ cd /qt/qt-everywhere-src-${QTVERSION} && \ ./configure -v \ -prefix /opt/qt${QTVERSION} \ @@ -54,7 +54,7 @@ make -j8 && \ make -j8 install && rm -Rf /qt ## Install llvm -ARG LLVM_VERSION=7.0.0 +ARG LLVM_VERSION=8.0.0 RUN mkdir -p /llvm && cd /llvm && \ wget http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz && \ tar xvf llvm-${LLVM_VERSION}.src.tar.xz && \ @@ -63,7 +63,7 @@ cd tools && \ wget http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz && \ tar xvf cfe-${LLVM_VERSION}.src.tar.xz && \ . /opt/rh/python27/enable && \ -. /opt/rh/devtoolset-4/enable && \ +. /opt/rh/devtoolset-6/enable && \ python --version && \ cd /llvm/llvm-${LLVM_VERSION}.src && mkdir -p build && cd build && \ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/llvm/ \ @@ -75,8 +75,8 @@ WORKDIR /opt ## Botan RUN git clone https://github.com/randombit/botan.git /botan && \ 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++ && \ +ln -sf /opt/rh/devtoolset-6/root/usr/bin/g++ /usr/bin/g++ && \ +ln -sf /opt/rh/devtoolset-6/root/usr/bin/c++ /usr/bin/c++ && \ git checkout 2.1.0 && \ ./configure.py --disable-shared --prefix=/opt/botan && \ make -j8 && make install && \ @@ -112,13 +112,8 @@ git checkout 4.4 RUN useradd -u 1000 builder # Make sure the above SCLs are already enabled -ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-4", "git19", "--"] -CMD ["/usr/bin/scl", "enable", "python27", "devtoolset-4", "git19", "--", "/bin/bash"] - -RUN GCC_VERSION=$(g++ -dumpversion) && \ -ln -s /opt/rh/devtoolset-4/root/usr/include/c++/${GCC_VERSION} /usr/include/c++/${GCC_VERSION} && \ -ln -s /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/${GCC_VERSION} \ -/usr/lib/gcc/x86_64-redhat-linux/${GCC_VERSION} +ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "--"] +CMD ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "--", "/bin/bash"] WORKDIR /home/builder USER builder diff --git a/deployment/dockerfiles/linux/centos6_64_base/Dockerfile b/deployment/dockerfiles/linux/centos6_64_base/Dockerfile index c6e55671..2e1cddba 100755 --- a/deployment/dockerfiles/linux/centos6_64_base/Dockerfile +++ b/deployment/dockerfiles/linux/centos6_64_base/Dockerfile @@ -7,14 +7,14 @@ 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 \ +yum -y install wget devtoolset-6-gcc devtoolset-6-gcc-c++ devtoolset-6-binutils \ wget tar bzip2 git libtool which fuse fuse-devel libpng-devel automake \ glibc-headers libstdc++-devel gcc-c++ freetype-devel fontconfig-devel\ libxml2-devel libstdc++-devel libXrender-devel patch xcb-util-keysyms-devel \ libXi-devel libudev-devel.x86_64 openssl-devel sqlite-devel.x86_64 \ gperftools.x86_64 gperf.x86_64 libicu-devel.x86_64 boost-devel.x86_64 \ libxslt-devel.x86_64 python27.x86_64 \ - xz mesa-libEGL-devel mesa-libGL-devel glib-devel git19 \ + xz mesa-libEGL-devel mesa-libGL-devel glib-devel \ java-1.8.0-openjdk-devel re2c ccache ImageMagick vim lftp unzip && \ yum clean all @@ -31,15 +31,10 @@ rm apache-maven-3.5.0-bin.tar.gz ENV M2_HOME=/opt/maven \ JAVA_HOME=/usr/lib/jvm/java-openjdk \ -DEVTOOLSET=/opt/rh/devtoolset-4/root/usr/ +DEVTOOLSET=/opt/rh/devtoolset-6/root/usr/ ENV PATH=${M2_HOME}/bin:${PATH} # Make sure the above SCLs are already enabled -ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-4", "git19", "--"] -CMD ["/usr/bin/scl", "enable", "python27", "devtoolset-4", "git19", "--", "/bin/bash"] - -RUN GCC_VERSION=$(g++ -dumpversion) && \ -ln -s /opt/rh/devtoolset-4/root/usr/include/c++/${GCC_VERSION} /usr/include/c++/${GCC_VERSION} && \ -ln -s /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/${GCC_VERSION} \ -/usr/lib/gcc/x86_64-redhat-linux/${GCC_VERSION} +ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "git", "--"] +CMD ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "git", "--", "/bin/bash"]