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 <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2023-12-04 18:06:08 +08:00 committed by Xiang Xiao
parent a3cd8f921a
commit a18a0d20eb
1 changed files with 10 additions and 1 deletions

View File

@ -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/