From 2f336c6cc668d1c9d2856396d3d61a6895a2448a Mon Sep 17 00:00:00 2001 From: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> Date: Fri, 21 Jul 2023 12:19:35 -0300 Subject: [PATCH] Fix chip-cert-bin Dockerfile (#28079) * Build all binaries using build_examples.py * Update integrations/docker/images/chip-cert-bins/Dockerfile --- .../docker/images/chip-cert-bins/Dockerfile | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index e12de34ee0fd94..ba4d4ff5deef8d 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -203,14 +203,9 @@ WORKDIR /root/connectedhomeip/ RUN git checkout ${COMMITHASH} RUN ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux RUN bash scripts/bootstrap.sh -SHELL ["/bin/bash", "-c"] -RUN set -x && \ - source scripts/activate.sh \ - && gn gen out/debug --args='chip_mdns="platform" chip_inet_config_enable_ipv4=false' \ - && ninja -C out/debug # Stage 2: Build. -from chip-build-cert as chip-build-cert-bins +FROM chip-build-cert as chip-build-cert-bins SHELL ["/bin/bash", "-c"] @@ -222,6 +217,9 @@ RUN case ${TARGETPLATFORM} in \ set -x \ && source scripts/activate.sh \ && scripts/build/build_examples.py \ + --target linux-x64-chip-tool-ipv6only-platform-mdns \ + --target linux-x64-shell-ipv6only-platform-mdns \ + --target linux-x64-chip-cert-ipv6only-platform-mdns \ --target linux-x64-all-clusters-ipv6only \ --target linux-x64-all-clusters-minimal-ipv6only \ --target linux-x64-bridge-ipv6only \ @@ -234,6 +232,9 @@ RUN case ${TARGETPLATFORM} in \ --target linux-x64-lock-ipv6only \ --target linux-x64-simulated-app1-ipv6only \ build \ + && mv out/linux-x64-chip-tool-ipv6only-platform-mdns/chip-tool out/chip-tool \ + && mv out/linux-x64-shell-ipv6only-platform-mdns/chip-shell out/chip-shell \ + && mv out/linux-x64-chip-cert-ipv6only-platform-mdns/chip-cert out/chip-cert \ && mv out/linux-x64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ && mv out/linux-x64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ && mv out/linux-x64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ @@ -250,6 +251,9 @@ RUN case ${TARGETPLATFORM} in \ set -x \ && source scripts/activate.sh \ && scripts/build/build_examples.py \ + --target linux-arm64-chip-tool-ipv6only-platform-mdns \ + --target linux-arm64-shell-ipv6only-platform-mdns \ + --target linux-arm64-chip-cert-ipv6only-platform-mdns \ --target linux-arm64-all-clusters-ipv6only \ --target linux-arm64-all-clusters-minimal-ipv6only \ --target linux-arm64-bridge-ipv6only \ @@ -262,6 +266,9 @@ RUN case ${TARGETPLATFORM} in \ --target linux-arm64-lock-ipv6only \ --target linux-arm64-simulated-app1-ipv6only \ build \ + && mv out/linux-arm64-chip-tool-ipv6only-platform-mdns/chip-tool out/chip-tool \ + && mv out/linux-arm64-shell-ipv6only-platform-mdns/chip-shell out/chip-shell \ + && mv out/linux-arm64-chip-cert-ipv6only-platform-mdns/chip-cert out/chip-cert \ && mv out/linux-arm64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ && mv out/linux-arm64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ && mv out/linux-arm64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ @@ -277,7 +284,7 @@ RUN case ${TARGETPLATFORM} in \ *) ;; \ esac -RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i no +RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true # Stage 3: Copy relevant cert bins to a minimal image to reduce size. FROM ubuntu:22.04 @@ -287,9 +294,9 @@ RUN apt-get update -y RUN apt-get install -y libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev avahi-utils iproute2 libcairo2-dev libgirepository1.0-dev python3-pip WORKDIR /root/ COPY --from=chip-build-cert-bins /root/.sdk-sha-version .sdk-sha-version -COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-tool chip-tool -COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-shell chip-shell -COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-cert chip-cert +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-tool chip-tool +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-shell chip-shell +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-cert chip-cert COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-all-clusters-app chip-all-clusters-app COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-all-clusters-minimal-app chip-all-clusters-minimal-app COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lighting-app chip-lighting-app