From a18a0d20eba74b26bfe915d18a346d90497f7798 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Mon, 4 Dec 2023 18:06:08 +0800 Subject: [PATCH] ci_sim: the version of gn obtained by apt install is too low so dynamically download and install the latest gn tools Signed-off-by: zhanghongyu --- tools/ci/docker/linux/Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index 9ffc9dbde7..5a63fc28d3 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -28,6 +28,7 @@ FROM builder-base AS nuttx-tools RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ bison \ + clang \ cmake \ flex \ g++ \ @@ -67,6 +68,11 @@ RUN mkdir -p $CARGO_HOME \ && $CARGO_HOME/bin/rustup target add thumbv6m-none-eabi \ && $CARGO_HOME/bin/rustup target add thumbv7m-none-eabi +RUN mkdir /tools/gn -p \ + && cd /tools/gn \ + && git clone https://gn.googlesource.com/gn gn \ + && cd gn && ./build/gen.py && cd out && ninja + ENV ZAP_INSTALL_PATH=/tools/zap_release RUN mkdir $ZAP_INSTALL_PATH -p \ && cd $ZAP_INSTALL_PATH \ @@ -269,7 +275,6 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q clang-tidy \ gcc-avr \ gcc-multilib \ - generate-ninja \ genromfs \ gettext \ git \ @@ -397,6 +402,10 @@ COPY --from=nuttx-toolchain-wasm /tools/wasi-sdk/ wasi-sdk/ ENV WASI_SDK_PATH="/tools/wasi-sdk" ENV PATH="/tools/wamr:$PATH" +# gn tool +COPY --from=nuttx-tools /tools/gn/ /tools/gn/ +ENV PATH="/tools/gn/gn/out:$PATH" + # ZAP tool and nodejs packet COPY --from=nuttx-tools /tools/zap/ /tools/zap/ COPY --from=nuttx-tools /tools/zap_release/ /tools/zap_release/