Skip to content

Commit

Permalink
WIP. docker: add Ubuntu Noble images
Browse files Browse the repository at this point in the history
Also, switch CI to use new images

Change-Id: I034b1eca7bae199271d16ec4c422964930a1d586
  • Loading branch information
ABBAPOH committed Oct 6, 2024
1 parent 6ae9ac9 commit 7bdc5f4
Show file tree
Hide file tree
Showing 9 changed files with 1,029 additions and 959 deletions.
1,508 changes: 740 additions & 768 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

115 changes: 38 additions & 77 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,104 +23,73 @@ x-default-service: &linux
hard: -1

services:
jammy-qt6: &jammy-qt6
noble-qt6: &noble-qt6
<< : *linux
hostname: jammy-qt6
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-qt6-6.5.3_2.1.2-2
hostname: noble-qt6
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-qt6-6.5.3_2.3.2-0
build:
dockerfile: docker/jammy/Dockerfile
dockerfile: docker/noble/Dockerfile
context: .
args:
QT_VERSION: 6.5.3
QTCREATOR_VERSION: 11.0.3
QTCREATOR_VERSION: 13.0.2

jammy-qt5:
<< : *linux
hostname: jammy-qt5
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-5.15.2_2.1.2-2
build:
dockerfile: docker/jammy/Dockerfile
context: .
args:
QT_VERSION: 5.15.2
QTCREATOR_VERSION: 11.0.3

jammy:
<< : *jammy-qt6

jammy-qt6-static:
<< : *linux
hostname: jammy-qt6-static
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-qt6-static-6.5.0_2.1.2-0
build:
dockerfile: docker/jammy/test-qt6-static.Dockerfile
context: .
args:
QT_VERSION: 6.5.0
QTCREATOR_VERSION: 11.0.3
noble:
<< : *noble-qt6

jammy-android-515:
noble-qt5:
<< : *linux
hostname: jammy-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-android-5.15.2-1
hostname: noble-qt5
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-5.15.2_2.3.2-0
build:
dockerfile: docker/jammy/test-android.Dockerfile
dockerfile: docker/noble/Dockerfile
context: .
args:
QT_VERSION: 5.15.2
ANDROID_NDK_VERSION: 23.0.7599858
QTCREATOR_VERSION: 13.0.2

jammy-android-62:
noble-qt6-static:
<< : *linux
hostname: jammy-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-android-6.2.4-1
hostname: noble-qt6-static
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-qt6-static-6.5.3_2.3.2-0
build:
dockerfile: docker/jammy/test-android.Dockerfile
dockerfile: docker/noble/test-qt6-static.Dockerfile
context: .
args:
QT_VERSION: 6.2.4
ANDROID_NDK_VERSION: 23.0.7599858
QT_VERSION: 6.5.3
QTCREATOR_VERSION: 13.0.2

jammy-android-65:
noble-android-65:
<< : *linux
hostname: jammy-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-android-6.5.0-1
hostname: noble-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-android-6.5.3-0
build:
dockerfile: docker/jammy/test-android.Dockerfile
dockerfile: docker/noble/test-android.Dockerfile
context: .
args:
QT_VERSION: 6.5.0
QT_VERSION: 6.5.3
ANDROID_NDK_VERSION: 25.1.8937393

jammy-android-ndk-r19c:
noble-android-515:
<< : *linux
hostname: jammy-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-android-ndk-r19c-1
hostname: noble-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-android-5.15.2-0
build:
dockerfile: docker/jammy/test-android-no-qt.Dockerfile
dockerfile: docker/noble/test-android.Dockerfile
context: .
args:
ANDROID_NDK_VERSION: 19.2.5345600

jammy-android-ndk-r21e:
<< : *linux
hostname: jammy-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-android-ndk-r21e-1
build:
dockerfile: docker/jammy/test-android-no-qt.Dockerfile
context: .
args:
ANDROID_NDK_VERSION: 21.4.7075529
QT_VERSION: 5.15.2
ANDROID_NDK_VERSION: 23.0.7599858

jammy-android-ndk-r23:
noble-android-ndk-r25:
<< : *linux
hostname: jammy-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-android-ndk-r23-1
hostname: noble-android
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-android-ndk-r25-0
build:
dockerfile: docker/jammy/test-android-no-qt.Dockerfile
dockerfile: docker/noble/test-android-no-qt.Dockerfile
context: .
args:
ANDROID_NDK_VERSION: 23.0.7599858
ANDROID_NDK_VERSION: 25.1.8937393

jammy-baremetal:
<< : *linux
Expand All @@ -130,20 +99,12 @@ services:
dockerfile: docker/jammy/test-baremetal.Dockerfile
context: .

jammy-qt4:
<< : *linux
hostname: jammy-qt4
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-qt4-1
build:
dockerfile: docker/jammy/test-qt4.Dockerfile
context: .

jammy-qt6-wasm:
noble-qt6-wasm:
<< : *linux
hostname: jammy-qt6-wasm
image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-qt6-wasm-6.7.0-0
hostname: noble-qt6-wasm
image: ${DOCKER_USER:-qbsbuild}/qbsdev:noble-qt6-wasm-6.7.0-0
build:
dockerfile: docker/jammy/test-qt6-wasm.Dockerfile
dockerfile: docker/noble/test-qt6-wasm.Dockerfile
context: .
args:
QT_VERSION: 6.7.0
Expand Down
41 changes: 0 additions & 41 deletions docker/jammy/test-qt4.Dockerfile

This file was deleted.

126 changes: 126 additions & 0 deletions docker/noble/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#
# Install Qt and Qbs for Linux
#
FROM ubuntu:noble
LABEL Description="Ubuntu development environment for Qbs with Qt and various dependencies for testing Qbs modules and functionality"
ARG QT_VERSION
ARG QTCREATOR_VERSION

# Allow colored output on command line.
ENV TERM=xterm-color

#
# Make it possible to change UID/GID in the entrypoint script. The docker
# container usually runs as root user on Linux hosts. When the Docker container
# mounts a folder on the host and creates files there, those files would be
# owned by root instead of the current user. Thus we create a user here who's
# UID will be changed in the entrypoint script to match the UID of the current
# host user.
#
ARG USER_UID=1000
ARG USER_NAME=devel
RUN apt-get update -qq && \
apt-get install -qq -y \
ca-certificates \
gosu \
sudo && \
userdel ubuntu && \
groupadd -g ${USER_UID} ${USER_NAME} && \
useradd -s /bin/bash -u ${USER_UID} -g ${USER_NAME} -o -c "" -m ${USER_NAME} && \
usermod -a -G sudo ${USER_NAME} && \
echo "%devel ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers

COPY docker/entrypoint.sh /sbin/entrypoint.sh
ENTRYPOINT ["/sbin/entrypoint.sh"]

# Qbs build dependencies
RUN apt-get update -qq && \
DEBIAN_FRONTEND="noninteractive" apt-get install -qq -y --no-install-recommends \
bison \
build-essential \
ca-certificates \
capnproto \
ccache \
clang-18 \
clang-tidy-18 \
cmake \
curl \
flex \
git \
gdb \
help2man \
icoutils \
libcapnp-dev \
libclang-rt-18-dev \
libdbus-1-3 \
libfreetype6 \
libfontconfig1 \
libgl1-mesa-dev \
libnanopb-dev \
libprotobuf-dev \
libgrpc++-dev \
libxkbcommon-x11-0 \
locales \
nanopb \
ninja-build \
nsis \
pkg-config \
protobuf-compiler \
protobuf-compiler-grpc \
psmisc \
python3-pip \
python3-setuptools \
python3-venv \
p7zip-full \
subversion \
unzip \
zip && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 && \
update-alternatives --install /usr/bin/clang-check clang-check /usr/bin/clang-check-18 100 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 100

ENV LLVM_INSTALL_DIR=/usr/lib/llvm-18

# Set up Python
RUN python3 -m venv /venv && \
/venv/bin/pip3 install beautifulsoup4 lxml protobuf==3.19.1 pyyaml conan

ENV PATH=/venv/bin:${PATH}

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

#
# Install Qt and Qbs for Linux from qt.io
#
COPY scripts/install-qt.sh install-qt.sh

RUN ./install-qt.sh --version ${QT_VERSION} qtbase qtdeclarative qttools qtx11extras qtscxml qt5compat icu && \
./install-qt.sh --version ${QTCREATOR_VERSION} qtcreator && \
echo "export PATH=/opt/Qt/${QT_VERSION}/gcc_64/bin:/opt/Qt/Tools/QtCreator/bin:\${PATH}" > /etc/profile.d/qt.sh

ENV PATH=/opt/Qt/${QT_VERSION}/gcc_64/bin:/opt/Qt/Tools/QtCreator/bin:${PATH}

# Configure Qbs
USER $USER_NAME
RUN qbs-setup-toolchains /usr/bin/g++ gcc && \
qbs-setup-toolchains /usr/bin/clang clang && \
qbs-setup-qt /opt/Qt/${QT_VERSION}/gcc_64/bin/qmake qt-gcc_64 && \
qbs config profiles.qt-gcc_64.baseProfile gcc && \
qbs-setup-qt /opt/Qt/${QT_VERSION}/gcc_64/bin/qmake qt-clang_64 && \
qbs config profiles.qt-clang_64.baseProfile clang && \
qbs config defaultProfile qt-gcc_64

# Configure Conan
RUN conan profile detect --name qbs-test

# Switch back to root user for the entrypoint script.
USER root

# Work-around for QTBUG-79020
RUN echo "export QT_NO_GLIB=1" >> /etc/profile.d/qt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Android SDK/NDK for testing Qbs
#
FROM ubuntu:jammy
FROM ubuntu:noble
LABEL Description="Ubuntu test environment for Qbs for Android"

# Allow colored output on command line.
Expand All @@ -22,6 +22,7 @@ RUN apt-get update -qq && \
ca-certificates \
gosu \
sudo && \
userdel ubuntu && \
groupadd -g ${USER_UID} ${USER_NAME} && \
useradd -s /bin/bash -u ${USER_UID} -g ${USER_NAME} -o -c "" -m ${USER_NAME} && \
usermod -a -G sudo ${USER_NAME} && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Android SDK/NDK + Qt for Android for testing Qbs
#
FROM ubuntu:jammy
FROM ubuntu:noble
LABEL Description="Ubuntu test environment for Qbs and Qt for Android"

# Allow colored output on command line.
Expand All @@ -22,6 +22,7 @@ RUN apt-get update -qq && \
ca-certificates \
gosu \
sudo && \
userdel ubuntu && \
groupadd -g ${USER_UID} ${USER_NAME} && \
useradd -s /bin/bash -u ${USER_UID} -g ${USER_NAME} -o -c "" -m ${USER_NAME} && \
usermod -a -G sudo ${USER_NAME} && \
Expand Down
Loading

0 comments on commit 7bdc5f4

Please sign in to comment.