From f5040c50737fbe86e1c0fd115e9629a1cf69e36b Mon Sep 17 00:00:00 2001 From: Carolina Lopes Date: Wed, 19 Jul 2023 13:32:27 -0300 Subject: [PATCH 1/2] Build all binaries using build_examples.py --- .../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 9046a2cb346fea..1c875768ccda05 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-chip-tool-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 From 90e0cd48d4006080d8c7f006c08b9180ce790109 Mon Sep 17 00:00:00 2001 From: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:42:11 -0300 Subject: [PATCH 2/2] Update integrations/docker/images/chip-cert-bins/Dockerfile --- integrations/docker/images/chip-cert-bins/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 1c875768ccda05..2f3fd22cdf2494 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -252,7 +252,7 @@ RUN case ${TARGETPLATFORM} in \ && source scripts/activate.sh \ && scripts/build/build_examples.py \ --target linux-arm64-chip-tool-ipv6only-platform-mdns \ - --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 \