Skip to content

Commit 647b2c0

Browse files
committed
ci: Add Kitware ninja v1.11.1
This commit adds the Kitware ninja v1.11.1 to the CI Docker image. The Kitware fork of ninja is required to enable the "jobserver" feature, which is currently not available in the upstream ninja codebase. The ninja jobserver client feature is used by the Zephyr CI workflow in conjunction with the twister-side jobserver to globally limit the number of parallel compilations, which is necessary to keep the runner RAM usage under control. Note that Kitware ninja is currently only included in the x86-64 image because pre-compiled AArch64 binary is not available -- for AArch64, the distro-provided vanilla ninja will be used. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 540a6df commit 647b2c0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Dockerfile.ci

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ FROM ${BASE_IMAGE:-zephyrprojectrtos/ci-base:latest}
55

66
ARG ZSDK_VERSION=0.16.5-1
77
ENV ZSDK_VERSION=$ZSDK_VERSION
8+
ARG KITWARE_NINJA_VERSION=1.11.1.g95dee.kitware.jobserver-1
9+
ENV KITWARE_NINJA_VERSION=$KITWARE_NINJA_VERSION
810
ARG DOXYGEN_VERSION=1.9.4
911
ENV DOXYGEN_VERSION=$DOXYGEN_VERSION
1012
ARG RENODE_VERSION=1.14.0
@@ -27,6 +29,14 @@ ARG FVP_CORSTONE310_VERSION=11.24_13
2729
ENV FVP_CORSTONE310_VERSION=$FVP_CORSTONE310_VERSION
2830
ARG WGET_ARGS="-q --show-progress --progress=bar:force:noscroll"
2931

32+
# Install Kitware ninja
33+
# NOTE: Pre-built Kitware ninja binaries are only available for x86_64 host.
34+
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \
35+
wget ${WGET_ARGS} https://github.com/Kitware/ninja/releases/download/v${KITWARE_NINJA_VERSION}/ninja-${KITWARE_NINJA_VERSION}_x86_64-linux-gnu.tar.gz && \
36+
tar xf ninja-${KITWARE_NINJA_VERSION}_x86_64-linux-gnu.tar.gz -C /opt && \
37+
ln -s /opt/ninja-${KITWARE_NINJA_VERSION}_x86_64-linux-gnu/ninja /usr/local/bin && \
38+
rm ninja-${KITWARE_NINJA_VERSION}_x86_64-linux-gnu.tar.gz \
39+
; fi
3040

3141
# Install Doxygen (x86 only)
3242
# NOTE: Pre-built Doxygen binaries are only available for x86_64 host.

0 commit comments

Comments
 (0)