diff --git a/ci/Jenkinsfile.linux b/ci/Jenkinsfile.linux index 5d283cda19..9c3cd6db79 100644 --- a/ci/Jenkinsfile.linux +++ b/ci/Jenkinsfile.linux @@ -3,7 +3,7 @@ pipeline { /* privileged mode is necessary for fuse */ docker { label 'linux-new' - image 'statusteam/linux-desktop-ubuntu:16.04' + image 'statusteam/linux-desktop-ubuntu:qt-5.11.2' args ( "--privileged "+ "-v /dev/fuse:/dev/fuse "+ @@ -32,7 +32,7 @@ pipeline { LC_ALL = 'en_US.UTF-8' NPM_CONFIG_CACHE = '/var/tmp/npm' LEIN_HOME = '/var/tmp/lein' - QT_PATH = '/opt/qt59' + QT_PATH = '/opt/qt' STATUSIM_APPIMAGE = '/opt/StatusImAppImage.zip' } diff --git a/ci/Jenkinsfile.macos b/ci/Jenkinsfile.macos index 65e5717845..3f93510dfa 100644 --- a/ci/Jenkinsfile.macos +++ b/ci/Jenkinsfile.macos @@ -13,8 +13,8 @@ pipeline { LANG = 'en_US.UTF-8' LANGUAGE = 'en_US.UTF-8' LC_ALL = 'en_US.UTF-8' - QT_PATH = '/Users/administrator/qt/5.9.1' - PATH = "${env.QT_PATH}/clang_64/bin:${env.PATH}" + QT_PATH = '/usr/local/opt/qt' + PATH = "/usr/local/opt/qt/bin:${env.PATH}" } stages { diff --git a/ci/android.groovy b/ci/android.groovy index 180b25b7b2..070c6c562c 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -1,18 +1,5 @@ common = load 'ci/common.groovy' -def uploadArtifact() { - def artifact_dir = pwd() + '/android/app/build/outputs/apk/release/' - println (artifact_dir + 'app-release.apk') - def artifact = (artifact_dir + 'app-release.apk') - def server = Artifactory.server('artifacts') - def filename = "im.status.ethereum-${GIT_COMMIT.take(6)}-n-fl.apk" - def newArtifact = (artifact_dir + filename) - sh "cp ${artifact} ${newArtifact}" - def uploadSpec = '{ "files": [ { "pattern": "*apk/release/' + filename + '", "target": "nightlies-local" }]}' - def buildInfo = server.upload(uploadSpec) - return 'http://artifacts.status.im:8081/artifactory/nightlies-local/' + filename -} - def compile(type = 'nightly') { common.tagBuild() def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' " diff --git a/desktop/docker/Dockerfile b/desktop/docker/Dockerfile index 602f190879..f9925c0a8b 100644 --- a/desktop/docker/Dockerfile +++ b/desktop/docker/Dockerfile @@ -1,22 +1,33 @@ FROM ubuntu:16.04 AS qt_build +ARG QT_VERSION + RUN apt-get update && apt-get -y install \ git libx11-xcb1 libxss1 libasound2 libfontconfig1 libdbus-1-3 && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ADD qt-opensource-linux-x64-5.9.1.run /tmp/ +# This variable defines which parts of QT will be extracted from the .run file. +# You can list available packages in a Qt .run file by using: +# extract-qt-installer --list-packages qt-installer.run +ENV QT_CI_PACKAGES qt.qt5.5112.gcc_64,qt.qt5.5112.qtwebengine.gcc_64 + +# We run this as part of a separate container to reduce number of stages. +# We also remove some of the static-linked binaries since they are so big. +# Crucial ones: qmake,rcc,moc,uic,qdbuscpp2xml,qdbusxml2cpp,lrelease,lupdate,lconvert +ADD qt-opensource-linux-x64-${QT_VERSION}.run /tmp/ RUN git clone --depth=1 https://github.com/benlau/qtci.git /tmp/qtci && \ - /tmp/qtci/bin/extract-qt-installer /tmp/qt-opensource-linux-x64-5.9.1.run /opt/qt && \ - cd /opt/qt && \ - rm -fr Examples Docs Tools 5.9.1/android_armv7 \ - MaintenanceTool.dat MaintenanceTool MaintenanceTool.ini + /tmp/qtci/bin/extract-qt-installer --disable-progress-report \ + /tmp/qt-opensource-linux-x64-${QT_VERSION}.run /opt/qt-all && \ + find /opt/qt-all/${QT_VERSION}/gcc_64/bin -type f -regextype posix-egrep -regex \ + '.*\/(qdoc|qgltf|linguist|designer|assistant|qhelpconverter|qmlprofiler)$' -delete FROM ubuntu:16.04 -COPY --from=qt_build /opt/qt /opt/qt -RUN ln -s /opt/qt/5.9.1/gcc_64/mkspecs /usr/local/mkspecs && \ - ln -s /opt/qt/5.9.1/gcc_64/plugins /usr/local/plugins && \ - ln -s /opt/qt/5.9.1/gcc_64 /opt/qt59 +ARG QT_VERSION + +COPY --from=qt_build /opt/qt-all/${QT_VERSION}/gcc_64 /opt/qt +RUN ln -s /opt/qt/mkspecs /usr/local/mkspecs && \ + ln -s /opt/qt/plugins /usr/local/plugins ENV LANG en_US.UTF-8 \ LC_ALL en_US.UTF-8 \ @@ -24,18 +35,19 @@ ENV LANG en_US.UTF-8 \ LEIN_HOME /var/tmp/lein \ NPM_CONFIG_CACHE /var/tmp/npm -# We have to do this because Jenkins doens't let us +# We have to do this because Jenkins doesn't let us # https://issues.jenkins-ci.org/browse/JENKINS-49076 -ENV PATH /opt/qt59/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH /opt/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -RUN apt-get update && apt-get -y --no-install-recommends install curl software-properties-common && \ +RUN apt-get update && apt-get -q -y --no-install-recommends install curl software-properties-common && \ curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ add-apt-repository -y ppa:longsleep/golang-backports && \ apt-get remove -y software-properties-common && \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + DEBIAN_FRONTEND=noninteractive \ + apt-get -q -y --no-install-recommends install \ wget git unzip golang-go nodejs yarn file python \ apt-transport-https locales openjdk-8-jdk-headless \ extra-cmake-modules build-essential gcc g++ fuse \ diff --git a/desktop/docker/Makefile b/desktop/docker/Makefile index 8e264fa22b..52a77eb774 100644 --- a/desktop/docker/Makefile +++ b/desktop/docker/Makefile @@ -1,16 +1,23 @@ GIT_COMMIT = $(shell git rev-parse --short HEAD) -IMAGE_NAME = statusteam/linux-desktop-ubuntu:16.04 -QT_MD5SUM = b8dd904894ac6b09076b5f61d8b9d71a -QT_ARCHIVE = qt-opensource-linux-x64-5.9.1.run +# WARNING: Change version in Dockerfile too +QT_VERSION = 5.11.2 +QT_VER_MJR = 5.11 +QT_ARCHIVE = qt-opensource-linux-x64-$(QT_VERSION).run +QT_MD5SUM = 974fda61267cfb6e45984ee5f0a285f8 +QT_URL = https://download.qt.io/archive/qt + +IMAGE_TAG = qt-$(QT_VERSION) +IMAGE_NAME = statusteam/linux-desktop-ubuntu:$(IMAGE_TAG) build: $(QT_ARCHIVE) docker build \ - --label "commit=$(GIT_COMMIT)" \ + --build-arg="QT_VERSION=$(QT_VERSION)" \ + --label="commit=$(GIT_COMMIT)" \ -t $(IMAGE_NAME) . $(QT_ARCHIVE): - wget https://download.qt.io/archive/qt/5.9/5.9.1/$(QT_ARCHIVE) + wget $(QT_URL)/$(QT_VER_MJR)/$(QT_VERSION)/$(QT_ARCHIVE) echo "$(QT_MD5SUM) $(QT_ARCHIVE)" | md5sum --check push: build diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh index e0fe2119e4..a3e20ba0b1 100755 --- a/scripts/build-desktop.sh +++ b/scripts/build-desktop.sh @@ -237,7 +237,7 @@ function bundleMacOS() { cp -f ../deployment/macos/qt-reportApp.conf Status.app/Contents/Resources ln -sf ../Resources/qt-reportApp.conf Status.app/Contents/MacOS/qt.conf install_name_tool -add_rpath "@executable_path/../Frameworks" \ - -delete_rpath "$(joinExistingPath "$QT_PATH" 'clang_64/lib')" \ + -delete_rpath "${QT_PATH}/lib" \ 'Status.app/Contents/MacOS/reportApp' cp -f ../deployment/macos/Info.plist Status.app/Contents cp -f ../deployment/macos/status-icon.icns Status.app/Contents/Resources