chore(Qt5.15.2): Update linux CI to use docker image with Qt5.15.2 installed
We're using a base ubuntu:18.04 Docker image and install Qt5.15.2 on top using aqt installer and linuxdeplyqt. Upgrade of ubuntu_build_setup.sh is left to a separate PR due to Squish being tied to old Qt.
This commit is contained in:
parent
6e6693a428
commit
db3b63e29d
|
@ -13,5 +13,5 @@ docker run -it --rm \
|
|||
-u jenkins:$(getent group $(whoami) | cut -d: -f3) \
|
||||
-v "${PWD}:/status-desktop" \
|
||||
-w /status-desktop \
|
||||
statusteam/nim-status-client-build:1.1.4 \
|
||||
statusteam/nim-status-client-build:1.2.0-qt5.15.2 \
|
||||
./docker-linux-app-image.sh
|
||||
|
|
106
ci/Dockerfile
106
ci/Dockerfile
|
@ -1,33 +1,70 @@
|
|||
FROM a12e/docker-qt:5.14-gcc_64
|
||||
ARG QT_VERSION=5.15.2
|
||||
|
||||
# $QT_PATH and $QT_PLATFORM are provided by the docker image
|
||||
# $QT_PATH/$QT_VERSION/$QT_PLATFORM/bin is already prepended to $PATH
|
||||
# However $QT_VERSION is not exposed to environment so set it here
|
||||
ENV QT_VERSION="5.14.0"
|
||||
ENV QTDIR="${QT_PATH}/${QT_VERSION}/${QT_PLATFORM}"
|
||||
ENV LD_LIBRARY_PATH="${QTDIR}/lib:${LD_LIBRARY_PATH}"
|
||||
# $OPENSSL_PREFIX is provided by the docker image
|
||||
ENV LIBRARY_PATH="${OPENSSL_PREFIX}/lib:${LIBRARY_PATH}"
|
||||
ENV OPENSSL_ROOT_DIR="${OPENSSL_PREFIX}"
|
||||
# QT Installation Image --------------------------------------------------------
|
||||
FROM ubuntu:18.04 AS qt-install
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& sudo apt update -yq \
|
||||
&& sudo apt install -yq software-properties-common \
|
||||
&& sudo add-apt-repository -y ppa:git-core/ppa \
|
||||
&& sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||
&& sudo apt update -yq \
|
||||
&& sudo apt purge -yq gnupg \
|
||||
&& sudo apt install -yq --fix-missing \
|
||||
jq git s3cmd gnupg2 ca-certificates \
|
||||
build-essential extra-cmake-modules gcc-9 g++-9 \
|
||||
libpcre3-dev libnss3 libxcomposite1 libxtst6 libpcsclite-dev \
|
||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
|
||||
gstreamer1.0-plugins-ugly gstreamer1.0-libav \
|
||||
gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-pulseaudio
|
||||
ARG QT_VERSION
|
||||
|
||||
# C++17 is required
|
||||
RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||
RUN apt update && apt full-upgrade -y && apt install -y --no-install-recommends sudo python3 python3-pip \
|
||||
&& apt-get -qq clean
|
||||
|
||||
RUN chmod -R 777 /opt
|
||||
|
||||
# Install QT
|
||||
RUN python3 -m pip install setuptools \
|
||||
&& python3 -m pip install -U pip \
|
||||
&& python3 -m pip install aqtinstall \
|
||||
&& python3 -m aqt install --output /opt/qt ${QT_VERSION} linux desktop -m qtwebengine
|
||||
|
||||
# Build Image ------------------------------------------------------------------
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ARG LINUXDEPLOYQT_VERSION=continuous
|
||||
ARG QT_VERSION
|
||||
|
||||
# Adapted from a12e/docker-qt by Aurélien Brooke
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
QMAKESPEC=linux-g++ \
|
||||
QT_PATH=/opt/qt \
|
||||
QT_PLATFORM=gcc_64 \
|
||||
QT_VERSION=$QT_VERSION
|
||||
|
||||
ENV PATH=${QT_PATH}/${QT_VERSION}/${QT_PLATFORM}/bin:$PATH \
|
||||
QTDIR=${QT_PATH}/${QT_VERSION}/${QT_PLATFORM}
|
||||
|
||||
ENV LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
|
||||
|
||||
# Install dependencies
|
||||
RUN apt update -yq && apt install -yq software-properties-common \
|
||||
&& add-apt-repository -y ppa:git-core/ppa \
|
||||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||
&& apt update -yq && apt full-upgrade -yq && apt install -yq --no-install-recommends --fix-missing \
|
||||
git openssh-client ca-certificates locales sudo curl build-essential pkg-config libgl1-mesa-dev libsm6 libice6 libxext6 libxrender1 \
|
||||
libfontconfig1 libdbus-1-3 libz-dev fuse file libxkbcommon-dev libxkbcommon-x11-dev wget make libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm \
|
||||
libncurses5-dev libncursesw5-dev xz-utils tk-dev libgstreamer-plugins-base1.0-0 libpcsclite-dev cmake extra-cmake-modules s3cmd libpcre3-dev libnss3 libxcomposite1 libxtst6 jq \
|
||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa libpulse-mainloop-glib0 \
|
||||
gstreamer1.0-pulseaudio libxrandr2 libxcursor1 libxi6 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-render0 libxcb-xinerama0 gnupg2 gcc-9 g++-9 \
|
||||
&& update-alternatives \
|
||||
--install /usr/bin/gcc gcc /usr/bin/gcc-9 100 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
|
||||
&& apt-get -qq clean
|
||||
|
||||
# Install linuxdeployqt
|
||||
RUN mkdir -p /usr/local/bin \
|
||||
&& curl -Lo/usr/local/bin/linuxdeployqt "https://github.com/probonopd/linuxdeployqt/releases/download/$LINUXDEPLOYQT_VERSION/linuxdeployqt-$LINUXDEPLOYQT_VERSION-x86_64.AppImage" \
|
||||
&& chmod a+x /usr/local/bin/linuxdeployqt
|
||||
|
||||
# Reconfigure locale
|
||||
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
|
||||
|
||||
# Copy QT toolchain
|
||||
RUN chmod -R 777 /opt && mkdir -p /opt/qt/$QT_VERSION
|
||||
COPY --from=qt-install /opt/qt/$QT_VERSION /opt/qt/$QT_VERSION/.
|
||||
|
||||
# Fix LetsEncrypt X3 root certificate expliration
|
||||
RUN sudo sed -i 's#\(mozilla/DST_Root_CA_X3.crt\)#!\1#' /etc/ca-certificates.conf \
|
||||
&& sudo dpkg-reconfigure -fnoninteractive ca-certificates
|
||||
|
||||
# CMake 3.16 or higher is required
|
||||
RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.sh \
|
||||
|
@ -37,26 +74,15 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1
|
|||
&& rm -f cmake-3.22.1-linux-x86_64.sh
|
||||
ENV PATH="/opt/cmake/bin:${PATH}"
|
||||
|
||||
# Fix LetsEncrypt X3 root certificate expliration
|
||||
RUN sudo sed -i 's#\(mozilla/DST_Root_CA_X3.crt\)#!\1#' /etc/ca-certificates.conf \
|
||||
&& sudo dpkg-reconfigure -fnoninteractive ca-certificates
|
||||
|
||||
# Installing Golang
|
||||
RUN GOLANG_SHA256="9e5de37f9c49942c601b191ac5fba404b868bfc21d446d6960acc12283d6e5f2" \
|
||||
&& GOLANG_TARBALL="go1.18.5.linux-amd64.tar.gz" \
|
||||
RUN GOLANG_SHA256="36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95" \
|
||||
&& GOLANG_TARBALL="go1.19.5.linux-amd64.tar.gz" \
|
||||
&& wget -q "https://dl.google.com/go/${GOLANG_TARBALL}" \
|
||||
&& echo "${GOLANG_SHA256} ${GOLANG_TARBALL}" | sha256sum -c \
|
||||
&& sudo tar -C /usr/local -xzf "${GOLANG_TARBALL}" \
|
||||
&& rm "${GOLANG_TARBALL}" \
|
||||
&& sudo ln -s /usr/local/go/bin/go /usr/local/bin
|
||||
|
||||
# Re-install Qt with QtWebEngine by adjusting QT_CI_PACKAGES
|
||||
# The http_proxy=invalid is a fix for getting stuck on 'Welcome Page'
|
||||
RUN sudo sed /tmp/build/install-qt.sh -i \
|
||||
-e 's/^QT_CI_PACKAGES=.*/export QT_CI_PACKAGES=qt.qt5.5140.gcc_64,qt.qt5.5140.qtwebengine,qt.qt5,qt.qt5.5140.qtlottie/' \
|
||||
-e '\#^/tmp/build/bin/extract-qt-installer.*#i export http_proxy=invalid' \
|
||||
&& sudo -E /tmp/build/install-qt.sh
|
||||
|
||||
# Jenkins user needs a specific UID/GID to work
|
||||
RUN sudo groupadd -g 1001 jenkins \
|
||||
&& sudo useradd --create-home -u 1001 -g 1001 jenkins
|
||||
|
|
|
@ -49,7 +49,7 @@ pipeline {
|
|||
/* Disable colors in Nim compiler logs */
|
||||
NIMFLAGS = '--colors:off'
|
||||
/* Makefile assumes the compiler folder is included */
|
||||
QTDIR = '/opt/qt/5.14.2/gcc_64'
|
||||
QTDIR = '/opt/qt/5.15.2/gcc_64'
|
||||
/* Include library in order to compile the project */
|
||||
LD_LIBRARY_PATH = "$QTDIR/lib:$WORKSPACE/vendor/status-go/build/bin:$WORKSPACE/vendor/status-keycard-go/build/libkeycard/"
|
||||
/* Container ports */
|
||||
|
|
|
@ -7,7 +7,7 @@ pipeline {
|
|||
agent {
|
||||
docker {
|
||||
label 'linux'
|
||||
image 'statusteam/nim-status-client-build:1.1.5'
|
||||
image 'statusteam/nim-status-client-build:1.2.0-qt5.15.2'
|
||||
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */
|
||||
args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ pipeline {
|
|||
/* Disable colors in Nim compiler logs */
|
||||
NIMFLAGS = '--colors:off'
|
||||
/* Makefile assumes the compiler folder is included */
|
||||
QTDIR = "/opt/qt/5.14.0/gcc_64"
|
||||
QTDIR = "/opt/qt/5.15.2/gcc_64"
|
||||
/* Control output the filename */
|
||||
STATUS_CLIENT_APPIMAGE = "pkg/${utils.pkgFilename(ext: 'AppImage')}"
|
||||
STATUS_CLIENT_TARBALL = "pkg/${utils.pkgFilename(ext: 'tar.gz')}"
|
||||
|
|
|
@ -7,7 +7,7 @@ pipeline {
|
|||
agent {
|
||||
docker {
|
||||
label 'linux'
|
||||
image 'statusteam/nim-status-client-build:1.1.5'
|
||||
image 'statusteam/nim-status-client-build:1.2.0-qt5.15.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ pipeline {
|
|||
/* Disable colors in Nim compiler logs */
|
||||
NIMFLAGS = '--colors:off'
|
||||
/* Makefile assumes the compiler folder is included */
|
||||
QTDIR = "/opt/qt/5.14.2/gcc_64"
|
||||
QTDIR = "/opt/qt/5.15.2/gcc_64"
|
||||
/* Include library in order to compile the project */
|
||||
LD_LIBRARY_PATH = "$QTDIR/lib"
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ https://ci.status.im/job/nim-status-client/
|
|||
|
||||
## Linux
|
||||
|
||||
In order to build the Linux version of the application we use a modified `a12e/docker-qt:5.14-gcc_64` Docker image with the addition of Git and Golang.
|
||||
In order to build the Linux version of the application we use the ubuntu:18.04 Docker image where we install the Qt 5.15.2 provided by [aqt](https://github.com/miurahr/aqtinstall), linuxdeployqt provided by https://github.com/probonopd/linuxdeployqt and other dependencies (go, cmake, gcc etc.). We're using Ubuntu 18.04 to ensure glibc compatibility with the oldest still-supported LTS release and to comply with linuxdeployqt requirements.
|
||||
|
||||
The image is built with [`Dockerfile`](./Dockerfile) using:
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue