Add Ubuntu20 with Qt6 for CI.
This commit is contained in:
parent
e8af1a4240
commit
af6a6f9f59
4 changed files with 278 additions and 4 deletions
163
.gitlab-ci-files/job-linux-desktop-ubuntu-2004.yml
Normal file
163
.gitlab-ci-files/job-linux-desktop-ubuntu-2004.yml
Normal file
|
|
@ -0,0 +1,163 @@
|
||||||
|
|
||||||
|
|
||||||
|
.factorize_ubuntu2004: &docker_image_platform_and_runner_tag
|
||||||
|
tags: [ "docker" ]
|
||||||
|
image: gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-20-04-lts:$UBUNTU_2004_IMAGE_VERSION
|
||||||
|
|
||||||
|
job-ubuntu2004-ninja-gcc:
|
||||||
|
except:
|
||||||
|
refs:
|
||||||
|
- schedules
|
||||||
|
variables:
|
||||||
|
CMAKE_GENERATOR: Ninja
|
||||||
|
CMAKE_OPTIONS: -DENABLE_PQCRYPTO=ON
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
extends: .job-linux-desktop
|
||||||
|
<<: *docker_image_platform_and_runner_tag
|
||||||
|
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
# Nightly
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
job-ubuntu2004-makefile-gcc:
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $NIGHTLY_MASTER
|
||||||
|
variables:
|
||||||
|
CMAKE_GENERATOR: Unix Makefiles
|
||||||
|
CMAKE_OPTIONS: -DENABLE_PQCRYPTO=ON
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
|
||||||
|
extends: .job-linux-desktop
|
||||||
|
<<: *docker_image_platform_and_runner_tag
|
||||||
|
|
||||||
|
job-ubuntu2004-ninja-clang:
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $NIGHTLY_MASTER
|
||||||
|
variables:
|
||||||
|
CMAKE_OPTIONS: -DENABLE_DOC=ON -DENABLE_G729=ON -DENABLE_PQCRYPTO=ON -DENABLE_GPL_THIRD_PARTIES=ON
|
||||||
|
CMAKE_GENERATOR: Ninja
|
||||||
|
CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
extends: .job-linux-desktop
|
||||||
|
<<: *docker_image_platform_and_runner_tag
|
||||||
|
|
||||||
|
job-ubuntu2004-ninja-clang-small:
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $NIGHTLY_MASTER
|
||||||
|
variables:
|
||||||
|
CMAKE_OPTIONS: -DENABLE_VIDEO=NO -DENABLE_ADVANCED_IM=NO -DENABLE_DB_STORAGE=NO -DENABLE_PQCRYPTO=OFF
|
||||||
|
extends: job-ubuntu2004-ninja-clang
|
||||||
|
|
||||||
|
job-ubuntu2004-makefile-gcc:
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $NIGHTLY_MASTER
|
||||||
|
- $DEPLOY_PLUGINS
|
||||||
|
variables:
|
||||||
|
CMAKE_OPTIONS: -DLINPHONE_BUILDER_SIGNING_IDENTITY=$GPG_SIGNING_KEYID -DENABLE_G729=ON -DENABLE_PQCRYPTO=ON -DENABLE_GPL_THIRD_PARTIES=ON
|
||||||
|
CMAKE_GENERATOR: Unix Makefiles
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
|
||||||
|
APPIMAGETOOL_SIGN_PASSPHRASE: $GPG_SIGNING_PASS
|
||||||
|
script:
|
||||||
|
- echo "$GPG_SIGNING_PUB" > file.key && sed -i 's/\r /\n/g' file.key && chmod 600 file.key
|
||||||
|
- gpg --import file.key
|
||||||
|
- rm -f file.key
|
||||||
|
- echo "$GPG_SIGNING_KEY" > file.key && sed -i 's/\r /\n/g' file.key && chmod 600 file.key
|
||||||
|
- base64 -w 0 file.key | base64 -d | gpg --import --no-tty --batch --yes
|
||||||
|
- rm -f file.key
|
||||||
|
- cmake --version
|
||||||
|
- export CC=$CC
|
||||||
|
- export CXX=$CXX
|
||||||
|
- mkdir -p build/OUTPUT
|
||||||
|
- echo $CI_BUILD_TYPE
|
||||||
|
- echo $CMAKE_GENERATOR
|
||||||
|
- echo $DEFAULT_LINUX_CMAKE_OPTIONS
|
||||||
|
- echo $CMAKE_SANITIZER_OPTIONS
|
||||||
|
- cd build
|
||||||
|
- cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS
|
||||||
|
- cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS
|
||||||
|
extends: .job-linux-desktop
|
||||||
|
<<: *docker_image_platform_and_runner_tag
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
# Package - Nightly
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
job-ubuntu2004-makefile-gcc-package:
|
||||||
|
stage: package
|
||||||
|
tags: [ "docker-test-liblinphone" ]
|
||||||
|
image: gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-20-04-lts:$UBUNTU_2004_IMAGE_VERSION
|
||||||
|
dependencies: []
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $NIGHTLY_MASTER
|
||||||
|
- $PACKAGE_LINUX
|
||||||
|
- $DEPLOY_LINUX
|
||||||
|
variables:
|
||||||
|
CMAKE_OPTIONS: -DENABLE_APP_PACKAGING=YES -DLINPHONE_BUILDER_SIGNING_IDENTITY=$GPG_SIGNING_KEYID -DENABLE_G729=ON -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$LINUX_PLATFORM/$APP_FOLDER -DENABLE_PQCRYPTO=ON -DENABLE_GPL_THIRD_PARTIES=ON
|
||||||
|
CMAKE_GENERATOR: Unix Makefiles
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
APPIMAGETOOL_SIGN_PASSPHRASE: $GPG_SIGNING_PASS
|
||||||
|
extends: .job-linux-desktop
|
||||||
|
script:
|
||||||
|
- echo "$GPG_SIGNING_PUB" > file.key && sed -i 's/\r /\n/g' file.key && chmod 600 file.key
|
||||||
|
- gpg --import file.key
|
||||||
|
- rm -f file.key
|
||||||
|
- echo "$GPG_SIGNING_KEY" > file.key && sed -i 's/\r /\n/g' file.key && chmod 600 file.key
|
||||||
|
- base64 -w 0 file.key | base64 -d | gpg --import --no-tty --batch --yes
|
||||||
|
- rm -f file.key
|
||||||
|
- cmake --version
|
||||||
|
- export CC=$CC
|
||||||
|
- export CXX=$CXX
|
||||||
|
- mkdir -p build/OUTPUT
|
||||||
|
- echo $CI_BUILD_TYPE
|
||||||
|
- echo $CMAKE_GENERATOR
|
||||||
|
- echo $DEFAULT_LINUX_CMAKE_OPTIONS
|
||||||
|
- echo $CMAKE_SANITIZER_OPTIONS
|
||||||
|
- cd build
|
||||||
|
- cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS
|
||||||
|
- cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- build/OUTPUT/*
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
# Deploy - Nightly
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
#job-ubuntu2004-makefile-gcc-deploy:
|
||||||
|
# stage: deploy
|
||||||
|
# tags: [ "deploy" ]
|
||||||
|
# needs:
|
||||||
|
# - job-ubuntu2004-makefile-gcc-package
|
||||||
|
# only:
|
||||||
|
# variables:
|
||||||
|
# - $NIGHTLY_MASTER
|
||||||
|
# - $DEPLOY_LINUX
|
||||||
|
# script:
|
||||||
|
# - rsync -rlv --ignore-existing build/OUTPUT/Packages/*.AppImage $DEPLOY_SERVER:$UPLOAD_ROOT_PATH/$LINUX_PLATFORM/$APP_FOLDER
|
||||||
|
# - rsync -rlv build/OUTPUT/RELEASE $DEPLOY_SERVER:$UPLOAD_ROOT_PATH/$LINUX_PLATFORM
|
||||||
|
# - rsync -rlv build/OUTPUT/RELEASE $MAIN_DEPLOY_SERVER:$UPLOAD_ROOT_PATH/$LINUX_PLATFORM
|
||||||
|
|
||||||
|
|
||||||
|
#job-ubuntu2004-makefile-gcc-plugins-deploy:
|
||||||
|
# stage: deploy
|
||||||
|
# tags: [ "deploy" ]
|
||||||
|
# needs:
|
||||||
|
# - job-ubuntu2004-makefile-gcc
|
||||||
|
# only:
|
||||||
|
# variables:
|
||||||
|
# - $DEPLOY_PLUGINS
|
||||||
|
# script:
|
||||||
|
# - rsync -rlv --ignore-existing build/OUTPUT/plugins/app/*.so $DEPLOY_SERVER:$UPLOAD_ROOT_PATH/$LINUX_PLATFORM/$APP_FOLDER/plugins/
|
||||||
|
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
echo $DEFAULT_LINUX_CMAKE_OPTIONS
|
echo $DEFAULT_LINUX_CMAKE_OPTIONS
|
||||||
echo $CMAKE_SANITIZER_OPTIONS
|
echo $CMAKE_SANITIZER_OPTIONS
|
||||||
cd build
|
cd build
|
||||||
|
eval "$(qtchooser -qt=$QT_LINUX_VER -print-env)"
|
||||||
|
export PATH=${QTTOOLDIR}:$PATH
|
||||||
cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS
|
cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS
|
||||||
cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS
|
cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ variables:
|
||||||
DEBIAN_9_QT_IMAGE_VERSION: 20230417_qtopen_gstreamer
|
DEBIAN_9_QT_IMAGE_VERSION: 20230417_qtopen_gstreamer
|
||||||
DEBIAN_10_IMAGE_VERSION: 20210217_python3
|
DEBIAN_10_IMAGE_VERSION: 20210217_python3
|
||||||
UBUNTU_ROLLING_IMAGE_VERSION: 20211012_add_qtwebview
|
UBUNTU_ROLLING_IMAGE_VERSION: 20211012_add_qtwebview
|
||||||
UBUNTU_1804_IMAGE_VERSION: 20230706_add_deps_for_av1
|
UBUNTU_2004_IMAGE_VERSION: 20231013_init
|
||||||
|
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
|
|
@ -47,9 +47,9 @@ workflow:
|
||||||
ALL_JOB_VARIABLE: ""
|
ALL_JOB_VARIABLE: ""
|
||||||
|
|
||||||
include:
|
include:
|
||||||
# - '.gitlab-ci-files/job-linux-prepare.yml'
|
- '.gitlab-ci-files/job-linux-prepare.yml'
|
||||||
# - '.gitlab-ci-files/job-linux-desktop.yml'
|
- '.gitlab-ci-files/job-linux-desktop.yml'
|
||||||
# - '.gitlab-ci-files/job-linux-desktop-ubuntu-1804.yml'
|
- '.gitlab-ci-files/job-linux-desktop-ubuntu-2004.yml'
|
||||||
- '.gitlab-ci-files/job-windows-desktop.yml'
|
- '.gitlab-ci-files/job-windows-desktop.yml'
|
||||||
- '.gitlab-ci-files/job-macosx-desktop.yml'
|
- '.gitlab-ci-files/job-macosx-desktop.yml'
|
||||||
|
|
||||||
|
|
|
||||||
109
docker-files/bc-dev-ubuntu-20-04-lts
Normal file
109
docker-files/bc-dev-ubuntu-20-04-lts
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
###############################################################################
|
||||||
|
# Dockerfile used to make gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu-20-04-lts:20231004
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
# Qt on Ubuntu 20.04 is too old. Use a downloader.
|
||||||
|
ARG QT_VERSION=5.15.2
|
||||||
|
ARG QT6_VERSION=6.5.3
|
||||||
|
ARG QT_MODULES=qtwebengine qtnetworkauth qtquick3d
|
||||||
|
|
||||||
|
MAINTAINER Julien Wadel <julien.wadel@belledonne-communications.com>
|
||||||
|
|
||||||
|
# Use a french mirror
|
||||||
|
RUN sed -i -E 's/(archive|security)\.ubuntu\.com/fr.archive.ubuntu.com/' /etc/apt/sources.list
|
||||||
|
|
||||||
|
# add fallbacks for timeout connections.
|
||||||
|
#Swiss
|
||||||
|
RUN echo "deb http://ch.archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list
|
||||||
|
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main restricted" >> /etc/apt/sources.list
|
||||||
|
RUN echo "deb http://ch.archive.ubuntu.com/ubuntu/ bionic-updates main restricted" >> /etc/apt/sources.list
|
||||||
|
#Belgium
|
||||||
|
RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list
|
||||||
|
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main restricted" >> /etc/apt/sources.list
|
||||||
|
RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ bionic-updates main restricted" >> /etc/apt/sources.list
|
||||||
|
#International
|
||||||
|
RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list
|
||||||
|
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main restricted" >> /etc/apt/sources.list
|
||||||
|
RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted" >> /etc/apt/sources.list
|
||||||
|
|
||||||
|
# Configure locale
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y locales && \
|
||||||
|
apt-get clean && \
|
||||||
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
|
locale-gen
|
||||||
|
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||||
|
ENV TZ=Europe/Paris
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
ENV SHELL=/bin/bash
|
||||||
|
#ENV PS1='\[\e[33m\]\u@bc-dev-ubuntu-20-04>\[\e[0m\] '
|
||||||
|
|
||||||
|
# Install common general tools
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y nano sudo vim && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
# Install development tools
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y alien at autoconf bison ccache clang doxygen elfutils g++ gdb git graphviz intltool libtool lsb-release make ninja-build openssh-client patch perl python3-pip python3-pystache python-six python3-jsonschema python3-jinja2 meson yasm && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
# Install linphone & flexisip dependencies development packages
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libjansson-dev libmariadb-dev-compat libmbedtls-dev libopus-dev libpq-dev libprotobuf-dev libpulse-dev libqt5svg5-dev libsnmp-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev protobuf-compiler qttools5-dev qttools5-dev-tools xsdcxx && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
# Install signing tools
|
||||||
|
RUN sudo apt-get install -y gnupg2
|
||||||
|
|
||||||
|
# Install configuration tools
|
||||||
|
RUN sudo apt-get install -y wget
|
||||||
|
|
||||||
|
# Configure user bc
|
||||||
|
RUN useradd -ms /bin/bash bc && \
|
||||||
|
echo 'bc:cotcot' | chpasswd && \
|
||||||
|
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|
||||||
|
# Install newest cmake. Documented at https://gist.github.com/bmegli/4049b7394f9cfa016c24ed67e5041930
|
||||||
|
RUN wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3.tar.gz && \
|
||||||
|
tar -zvxf cmake-3.25.3.tar.gz && \
|
||||||
|
cd cmake-3.25.3 && ./bootstrap && make -j8 && \
|
||||||
|
sudo apt-get install checkinstall && sudo checkinstall --pkgname=cmake --pkgversion="3.25-custom" --default && hash -r && \
|
||||||
|
cd .. && sudo rm -rf cmake-3.25.3 && rm -rf cmake-3.25.3.tar.gz
|
||||||
|
|
||||||
|
# Install nasm from source as we need a newer version than the one being packaged
|
||||||
|
RUN curl --fail --silent --show-error --location https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.gz | \
|
||||||
|
tar --extract --gzip --file - && cd nasm-2.16.01 && \
|
||||||
|
./configure --prefix=/usr/local && make && make install && \
|
||||||
|
cd .. && rm -rf nasm-2.16.01
|
||||||
|
|
||||||
|
########### QT
|
||||||
|
|
||||||
|
RUN sudo apt-get update && sudo apt-get install -y libxkbcommon* flite1-dev libspeechd-dev speech-dispatcher libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libx11-xcb* libxcb* qdbus-qt5 libqt5dbus5 libdbus-1-dev libdbus-glib-1-dev libatspi2.0-0 libatspi2.0-dev
|
||||||
|
RUN sudo apt-get update && sudo apt-get install -y libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev
|
||||||
|
|
||||||
|
USER bc
|
||||||
|
WORKDIR /home/bc
|
||||||
|
|
||||||
|
RUN sudo pip3 install --upgrade setuptools
|
||||||
|
RUN sudo pip3 install ez_setup
|
||||||
|
|
||||||
|
## Install Qt download tool
|
||||||
|
RUN sudo pip3 install py7zr aqtinstall
|
||||||
|
RUN sudo python3 -m aqt install $QT_VERSION linux desktop -O /opt/Qt -m $QT_MODULES
|
||||||
|
RUN sudo python3 -m aqt install $QT6_VERSION linux desktop -O /opt/Qt -m $QT_MODULES
|
||||||
|
|
||||||
|
RUN sudo chown -R bc:bc /opt/Qt/
|
||||||
|
|
||||||
|
RUN qtchooser -install $QT_VERSION /opt/Qt/$QT_VERSION/gcc_64/bin/qmake
|
||||||
|
RUN qtchooser -install $QT6_VERSION /opt/Qt/$QT6_VERSION/gcc_64/bin/qmake
|
||||||
|
|
||||||
|
RUN eval "$(qtchooser -qt=$QT_VERSION -print-env)"
|
||||||
|
ENV Qt5_DIR=${QTLIBDIR}/cmake/Qt5
|
||||||
|
ENV PATH=${QTTOOLDIR}:$PATH
|
||||||
|
|
||||||
|
CMD bash
|
||||||
Loading…
Reference in a new issue