Skip to content

Commit

Permalink
Install chip-testing package in the final docker image (project-chip#…
Browse files Browse the repository at this point in the history
…36285)

* Install cmakeeee from APT

* Install PIP from APT

* Properly install chip-testing package

* Install GI repository dev package
  • Loading branch information
arkq authored Oct 30, 2024
1 parent eb5da6e commit f99a2c3
Showing 1 changed file with 12 additions and 39 deletions.
51 changes: 12 additions & 39 deletions integrations/docker/images/chip-cert-bins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ RUN set -x \
clang \
clang-format \
clang-tidy \
cmake \
curl \
flex \
gcc \
g++ \
gcc \
git \
git-lfs \
gperf \
iproute2 \
jq \
Expand All @@ -54,11 +56,12 @@ RUN set -x \
libcairo2-dev \
libdbus-1-dev \
libdbus-glib-1-dev \
libdmalloc-dev \
libgif-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libical-dev \
libjpeg-dev \
libdmalloc-dev \
libmbedtls-dev \
libncurses5-dev \
libncursesw5-dev \
Expand All @@ -79,55 +82,23 @@ RUN set -x \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-venv \
rsync \
shellcheck \
software-properties-common \
strace \
systemd \
udev \
unzip \
wget \
git-lfs \
zlib1g-dev \
&& git lfs install \
&& : # last line

# Cmake (Mbed OS requires >=3.19.0-rc3 version which is not available in Ubuntu 20.04 repository)
RUN case ${TARGETPLATFORM} in \
"linux/amd64") \
set -x \
&& (cd /tmp \
&& wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \
&& sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \
&& rm -rf cmake-3.19.3-Linux-x86_64.sh) \
&& exec bash \
;; \
"linux/arm64") \
set -x \
&& (cd /tmp \
&& wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-aarch64.sh \
&& sh cmake-3.19.3-Linux-aarch64.sh --exclude-subdir --prefix=/usr/local \
&& rm -rf cmake-3.19.3-Linux-aarch64.sh) \
&& exec bash \
;; \
*) \
test -n "$TARGETPLATFORM" \
echo "Unsupported platform ${TARGETPLATFORM}" \
;; \
esac

# Python 3 and PIP
RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
libgirepository1.0-dev \
software-properties-common \
&& add-apt-repository universe \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3 get-pip.py --break-system-packages \
&& : # last line

RUN set -x \
&& pip3 install attrs coloredlogs PyGithub pygit future portpicker mobly click cxxfilt ghapi pandas tabulate --break-system-packages \
&& pip3 install --break-system-packages \
attrs coloredlogs PyGithub pygit future portpicker mobly click cxxfilt ghapi pandas tabulate \
&& : # last line

# build and install gn
Expand Down Expand Up @@ -327,4 +298,6 @@ RUN pip install --break-system-packages -r /tmp/requirements.txt && rm /tmp/requ
# PIP requires MASON package compilation, which seems to require a JDK
RUN set -x && DEBIAN_FRONTEND=noninteractive apt-get update; apt-get install -fy openjdk-8-jdk

RUN pip install --break-system-packages --no-cache-dir python_lib/controller/python/chip*.whl
RUN pip install --break-system-packages --no-cache-dir \
python_lib/python/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing-*.whl \
python_lib/controller/python/chip*.whl

0 comments on commit f99a2c3

Please sign in to comment.