From fb4868e7f36f4756a0746050f52041b3b84d9d9e Mon Sep 17 00:00:00 2001 From: Nghi Ho Date: Fri, 17 Jan 2025 09:34:28 -0800 Subject: [PATCH 1/4] Prepare Docker image for CI integration jobs --- .../linux-x86/ubuntu-22.04_base/Dockerfile | 68 +++++++++++++++++-- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile index 4200b3231a..a816f4b228 100644 --- a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile +++ b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile @@ -25,6 +25,11 @@ RUN set -ex && \ apt-get -y --no-install-recommends install \ software-properties-common \ automake \ + autoconf \ + autoconf-archive \ + autogen \ + binutils-dev \ + build-essential \ check \ cmake \ curl \ @@ -32,40 +37,95 @@ RUN set -ex && \ ninja-build \ patch \ perl \ - libunwind-dev \ pkg-config \ git \ - gnutls-dev \ ca-certificates \ + sudo \ wget \ + clang-format \ + doxygen \ + gcovr \ + gettext \ + gobject-introspection \ + gnupg \ + gnutls-dev \ + gperf \ + groff \ + iproute2 \ + lcov \ lld \ llvm \ llvm-dev \ + libcap-dev \ libcryptx-perl \ + libcurl4-openssl-dev \ + libevent-dev \ + libfstrm-dev \ + libftdi-dev \ + libglib2.0-dev \ + libgmp-dev \ libicu-dev \ + libini-config-dev \ libio-socket-ssl-perl \ libipc-run-perl \ libjson-perl \ liblua5.4-dev \ + libcap-ng-dev \ + libcmocka0 \ + libcmocka-dev \ + libjemalloc-dev \ + libjson-c-dev \ + libltdl-dev \ + liblz4-dev \ + liblzo2-dev \ + libnghttp2-dev \ libnet-dev \ libnet-ssleay-perl \ + libnl-3-dev \ + libnl-genl-3-dev \ + libpam-dev \ libpam0g-dev \ libpcap-dev \ libperl-dev \ - libpcre2-dev \ + libpcre3-dev \ + libpsl-dev \ + libprotobuf-c-dev \ libreadline-dev \ libsqlite3-dev \ + libssl-dev \ + libsystemd-dev \ libtool \ libudev-dev \ + libunwind-dev \ + liburcu-dev \ + libusb-1.0-0-dev \ + libuv1-dev \ + libyaml-dev \ + net-tools \ + openjdk-11-jdk \ + openssl \ + pandoc \ + procps \ + protobuf-c-compiler \ + python3 \ + python3-docutils \ + python3-pip \ + python3-pytest \ + python3-six \ + python3-sphinx \ + ruby \ socat \ + uthash-dev \ zlib1g-dev \ dpkg-dev \ flex \ bison \ jq \ + uuid-dev \ unzip && \ # Based on https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html # The awscli is used to publish data to CloudWatch Metrics in some jobs. This requires additional IAM permission + pip3 install gcovr && \ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ unzip awscliv2.zip && \ ./aws/install --bin-dir /usr/bin && \ @@ -84,4 +144,4 @@ RUN set -ex && \ rm -rf /tmp/* COPY install_common_dependencies.sh / -RUN set -ex && /install_common_dependencies.sh && rm install_common_dependencies.sh +RUN set -ex && /install_common_dependencies.sh && rm install_common_dependencies.sh \ No newline at end of file From a50c67f37204b7e3e40733cf1ddcbc685b510614 Mon Sep 17 00:00:00 2001 From: Nghi Ho Date: Fri, 24 Jan 2025 08:46:16 -0800 Subject: [PATCH 2/4] Create a separate integration test image --- .../linux-x86/ubuntu-22.04_base/Dockerfile | 66 +-------------- .../Dockerfile | 80 +++++++++++++++++++ 2 files changed, 83 insertions(+), 63 deletions(-) create mode 100644 tests/ci/docker_images/linux-x86/ubuntu-22.04_gcc-12x_integration/Dockerfile diff --git a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile index a816f4b228..3fcea75a1a 100644 --- a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile +++ b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile @@ -25,11 +25,6 @@ RUN set -ex && \ apt-get -y --no-install-recommends install \ software-properties-common \ automake \ - autoconf \ - autoconf-archive \ - autogen \ - binutils-dev \ - build-essential \ check \ cmake \ curl \ @@ -37,95 +32,40 @@ RUN set -ex && \ ninja-build \ patch \ perl \ + libunwind-dev \ pkg-config \ git \ + gnutls-dev \ ca-certificates \ - sudo \ wget \ - clang-format \ - doxygen \ - gcovr \ - gettext \ - gobject-introspection \ - gnupg \ - gnutls-dev \ - gperf \ - groff \ - iproute2 \ - lcov \ lld \ llvm \ llvm-dev \ - libcap-dev \ libcryptx-perl \ - libcurl4-openssl-dev \ - libevent-dev \ - libfstrm-dev \ - libftdi-dev \ - libglib2.0-dev \ - libgmp-dev \ libicu-dev \ - libini-config-dev \ libio-socket-ssl-perl \ libipc-run-perl \ libjson-perl \ liblua5.4-dev \ - libcap-ng-dev \ - libcmocka0 \ - libcmocka-dev \ - libjemalloc-dev \ - libjson-c-dev \ - libltdl-dev \ - liblz4-dev \ - liblzo2-dev \ - libnghttp2-dev \ libnet-dev \ libnet-ssleay-perl \ - libnl-3-dev \ - libnl-genl-3-dev \ - libpam-dev \ libpam0g-dev \ libpcap-dev \ libperl-dev \ - libpcre3-dev \ - libpsl-dev \ - libprotobuf-c-dev \ + libpcre2-dev \ libreadline-dev \ libsqlite3-dev \ - libssl-dev \ - libsystemd-dev \ libtool \ libudev-dev \ - libunwind-dev \ - liburcu-dev \ - libusb-1.0-0-dev \ - libuv1-dev \ - libyaml-dev \ - net-tools \ - openjdk-11-jdk \ - openssl \ - pandoc \ - procps \ - protobuf-c-compiler \ - python3 \ - python3-docutils \ - python3-pip \ - python3-pytest \ - python3-six \ - python3-sphinx \ - ruby \ socat \ - uthash-dev \ zlib1g-dev \ dpkg-dev \ flex \ bison \ jq \ - uuid-dev \ unzip && \ # Based on https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html # The awscli is used to publish data to CloudWatch Metrics in some jobs. This requires additional IAM permission - pip3 install gcovr && \ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ unzip awscliv2.zip && \ ./aws/install --bin-dir /usr/bin && \ diff --git a/tests/ci/docker_images/linux-x86/ubuntu-22.04_gcc-12x_integration/Dockerfile b/tests/ci/docker_images/linux-x86/ubuntu-22.04_gcc-12x_integration/Dockerfile new file mode 100644 index 0000000000..7751912607 --- /dev/null +++ b/tests/ci/docker_images/linux-x86/ubuntu-22.04_gcc-12x_integration/Dockerfile @@ -0,0 +1,80 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 OR ISC + +FROM ubuntu-22.04:gcc-12x + +SHELL ["/bin/bash", "-c"] + +RUN set -ex && \ + apt-get update && \ + apt-get -y --no-install-recommends upgrade && \ + apt-get -y --no-install-recommends install \ + autoconf \ + autoconf-archive \ + autogen \ + binutils-dev \ + build-essential \ + clang-format \ + doxygen \ + gcovr \ + gettext \ + gobject-introspection \ + gnupg \ + gperf \ + groff \ + iproute2 \ + lcov \ + libcap-dev \ + libcurl4-openssl-dev \ + libevent-dev \ + libfstrm-dev \ + libftdi-dev \ + libglib2.0-dev \ + libgmp-dev \ + libini-config-dev \ + libcap-ng-dev \ + libcmocka0 \ + libcmocka-dev \ + libjemalloc-dev \ + libjson-c-dev \ + libltdl-dev \ + liblz4-dev \ + liblzo2-dev \ + libnghttp2-dev \ + libnl-3-dev \ + libnl-genl-3-dev \ + libpam-dev \ + libpcre3-dev \ + libpsl-dev \ + libprotobuf-c-dev \ + libssl-dev \ + libsystemd-dev \ + liburcu-dev \ + libusb-1.0-0-dev \ + libuv1-dev \ + libyaml-dev \ + net-tools \ + openjdk-11-jdk \ + openssl \ + pandoc \ + procps \ + protobuf-c-compiler \ + python3 \ + python3-docutils \ + python3-pip \ + python3-pytest \ + python3-six \ + python3-sphinx \ + ruby \ + uthash-dev \ + uuid-dev && \ + pip3 install gcovr && \ + apt-get autoremove --purge -y && \ + apt-get clean && \ + apt-get autoclean && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /tmp/* + +RUN adduser --disabled-password --gecos '' integration && \ + adduser integration sudo && \ + echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \ No newline at end of file From 1dcc7f2c7ee6b3128a32fc7ab4bf6c685be98527 Mon Sep 17 00:00:00 2001 From: Nghi Ho Date: Fri, 24 Jan 2025 08:53:30 -0800 Subject: [PATCH 3/4] Update build script --- tests/ci/docker_images/linux-x86/build_images.sh | 1 + tests/ci/docker_images/linux-x86/push_images.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/ci/docker_images/linux-x86/build_images.sh b/tests/ci/docker_images/linux-x86/build_images.sh index 57d4435fd9..8f3b13ef2a 100755 --- a/tests/ci/docker_images/linux-x86/build_images.sh +++ b/tests/ci/docker_images/linux-x86/build_images.sh @@ -31,6 +31,7 @@ docker build -t ubuntu-22.04:clang-14x-sde ubuntu-22.04_clang-14x-sde docker build -t ubuntu-22.04:gcc-10x ubuntu-22.04_gcc-10x docker build -t ubuntu-22.04:gcc-11x ubuntu-22.04_gcc-11x docker build -t ubuntu-22.04:gcc-12x ubuntu-22.04_gcc-12x +docker build -t ubuntu-22.04:gcc-12x_integration ubuntu-22.04_gcc-12x_integration docker build -t amazonlinux-2:base -f amazonlinux-2_base/Dockerfile ../dependencies docker build -t amazonlinux-2:gcc-7x amazonlinux-2_gcc-7x docker build -t amazonlinux-2:gcc-7x-intel-sde amazonlinux-2_gcc-7x-intel-sde diff --git a/tests/ci/docker_images/linux-x86/push_images.sh b/tests/ci/docker_images/linux-x86/push_images.sh index 2b19b37753..576b519b63 100755 --- a/tests/ci/docker_images/linux-x86/push_images.sh +++ b/tests/ci/docker_images/linux-x86/push_images.sh @@ -35,6 +35,7 @@ tag_and_push_img 'ubuntu-22.04:clang-14x-sde' "${ECS_REPO}:ubuntu-22.04_clang-14 tag_and_push_img 'ubuntu-22.04:gcc-10x' "${ECS_REPO}:ubuntu-22.04_gcc-10x" tag_and_push_img 'ubuntu-22.04:gcc-11x' "${ECS_REPO}:ubuntu-22.04_gcc-11x" tag_and_push_img 'ubuntu-22.04:gcc-12x' "${ECS_REPO}:ubuntu-22.04_gcc-12x" +tag_and_push_img 'ubuntu-22.04:gcc-12x_integration' "${ECS_REPO}:ubuntu-22.04_gcc-12x_integration" tag_and_push_img 'ubuntu-22.04:clang-14x_formal-verification-nsym-aarch64' "${ECS_REPO}:ubuntu-22.04_clang-14x_formal-verification-nsym-aarch64" tag_and_push_img 'centos-7:gcc-4x' "${ECS_REPO}:centos-7_gcc-4x" tag_and_push_img 'centos-8:gcc-8x' "${ECS_REPO}:centos-8_gcc-8x" From 9eb68a7f269a78e5251e2d05b2001bc80604cca1 Mon Sep 17 00:00:00 2001 From: Nghi Ho Date: Mon, 27 Jan 2025 13:42:43 -0800 Subject: [PATCH 4/4] Add sudo --- tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile index 3fcea75a1a..fd3dd357ee 100644 --- a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile +++ b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile @@ -29,6 +29,7 @@ RUN set -ex && \ cmake \ curl \ make \ + sudo \ ninja-build \ patch \ perl \ @@ -84,4 +85,4 @@ RUN set -ex && \ rm -rf /tmp/* COPY install_common_dependencies.sh / -RUN set -ex && /install_common_dependencies.sh && rm install_common_dependencies.sh \ No newline at end of file +RUN set -ex && /install_common_dependencies.sh && rm install_common_dependencies.sh