From 5b5a4bd03f5e80b038d55f70203589dd3d11ac90 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Fri, 16 Feb 2024 21:27:29 +0100 Subject: docker: upgrade baremetal image to Jammy Change-Id: I8881561219215c534ec41261511d3210faa815d6 Reviewed-by: Christian Kandeler --- .github/workflows/main.yml | 30 ++++++++++---------- docker-compose.yml | 8 +++--- docker/focal/test-baremetal.Dockerfile | 50 ---------------------------------- docker/jammy/test-baremetal.Dockerfile | 50 ++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 docker/focal/test-baremetal.Dockerfile create mode 100644 docker/jammy/test-baremetal.Dockerfile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fe723045..fc6801e9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -463,23 +463,23 @@ jobs: - name: Unpack artifact run: mkdir -p release/install-root/ && tar xzf qbs-linux-${{ github.run_id }}.tar.gz -C release/install-root/ - name: Pull the Docker Image - run: docker-compose pull focal-baremetal - - name: arm-none-eabi-gcc-9_2 - run: QBS_AUTOTEST_PROFILE=arm-none-eabi-gcc-9_2 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + run: docker-compose pull jammy-baremetal + - name: arm-none-eabi-gcc-10_3 + run: QBS_AUTOTEST_PROFILE=arm-none-eabi-gcc-10_3 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - name: avr-gcc-5_4 - run: QBS_AUTOTEST_PROFILE=avr-gcc-5_4 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + run: QBS_AUTOTEST_PROFILE=avr-gcc-5_4 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - name: msp430-gcc-4_6 - run: QBS_AUTOTEST_PROFILE=msp430-gcc-4_6 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - - name: xtensa-lx106-elf-gcc-9_2 - run: QBS_AUTOTEST_PROFILE=xtensa-lx106-elf-gcc-9_2 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - - name: riscv64-unknown-elf-gcc-9_3 - run: QBS_AUTOTEST_PROFILE=riscv64-unknown-elf-gcc-9_3 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - - name: sdcc-3_8_0-mcs51 - run: QBS_AUTOTEST_PROFILE=sdcc-3_8_0-mcs51 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - - name: sdcc-3_8_0-stm8 - run: QBS_AUTOTEST_PROFILE=sdcc-3_8_0-stm8 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin - - name: sdcc-3_8_0-hcs8 - run: QBS_AUTOTEST_PROFILE=sdcc-3_8_0-hcs8 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + run: QBS_AUTOTEST_PROFILE=msp430-gcc-4_6 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + - name: riscv64-unknown-elf-gcc-10_2 + run: QBS_AUTOTEST_PROFILE=riscv64-unknown-elf-gcc-10_2 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + - name: sdcc-4_0_0-hcs8 + run: QBS_AUTOTEST_PROFILE=sdcc-4_0_0-hcs8 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + - name: sdcc-4_0_0-mcs51 + run: QBS_AUTOTEST_PROFILE=sdcc-4_0_0-mcs51 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + - name: sdcc-4_0_0-stm8 + run: QBS_AUTOTEST_PROFILE=sdcc-4_0_0-stm8 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin + - name: xtensa-lx106-elf-gcc-10_3 + run: QBS_AUTOTEST_PROFILE=xtensa-lx106-elf-gcc-10_3 docker-compose run jammy-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin test-baremetal-windows: name: Run Baremetal tests (Windows) diff --git a/docker-compose.yml b/docker-compose.yml index faaf764f1..4ccd7a58a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -128,12 +128,12 @@ services: args: ANDROID_NDK_VERSION: 23.0.7599858 - focal-baremetal: + jammy-baremetal: << : *linux - hostname: focal-baremetal - image: ${DOCKER_USER:-qbsbuild}/qbsdev:focal-baremetal-4 + hostname: jammy-baremetal + image: ${DOCKER_USER:-qbsbuild}/qbsdev:jammy-baremetal-0 build: - dockerfile: docker/focal/test-baremetal.Dockerfile + dockerfile: docker/jammy/test-baremetal.Dockerfile context: . focal-qt4: diff --git a/docker/focal/test-baremetal.Dockerfile b/docker/focal/test-baremetal.Dockerfile deleted file mode 100644 index 5bef208ca..000000000 --- a/docker/focal/test-baremetal.Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Baremetal toolchains for testing Qbs -# -FROM ubuntu:focal -LABEL Description="Ubuntu baremetal test environment for Qbs" - -# 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 && \ - 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/focal/entrypoint.sh /sbin/entrypoint.sh -ENTRYPOINT ["/sbin/entrypoint.sh"] - -# Install baremetal toolchains and Qbs runtime dependencies. -RUN apt-get update -qq && \ - apt-get install -qq -y \ - libasan5 \ - libglib2.0-0 \ - libgssapi-krb5-2 \ - libgl1-mesa-glx \ - gcc-arm-none-eabi \ - gcc-avr \ - avr-libc \ - gcc-msp430 \ - sdcc \ - binutils-xtensa-lx106 \ - gcc-xtensa-lx106 \ - gcc-riscv64-unknown-elf - -# Work-around for QTBUG-79020. -RUN echo "export QT_NO_GLIB=1" >> /etc/profile.d/qt.sh diff --git a/docker/jammy/test-baremetal.Dockerfile b/docker/jammy/test-baremetal.Dockerfile new file mode 100644 index 000000000..774885797 --- /dev/null +++ b/docker/jammy/test-baremetal.Dockerfile @@ -0,0 +1,50 @@ +# +# Baremetal toolchains for testing Qbs +# +FROM ubuntu:jammy +LABEL Description="Ubuntu baremetal test environment for Qbs" + +# 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 && \ + 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"] + +# Install baremetal toolchains and Qbs runtime dependencies. +RUN apt-get update -qq && \ + apt-get install -qq -y \ + libasan5 \ + libglib2.0-0 \ + libgssapi-krb5-2 \ + libgl1-mesa-glx \ + gcc-arm-none-eabi \ + gcc-avr \ + avr-libc \ + gcc-msp430 \ + sdcc \ + binutils-xtensa-lx106 \ + gcc-xtensa-lx106 \ + gcc-riscv64-unknown-elf + +# Work-around for QTBUG-79020. +RUN echo "export QT_NO_GLIB=1" >> /etc/profile.d/qt.sh -- cgit v1.2.3