Skip to content

Commit

Permalink
Build ninja instead of downloading a pre-built binary (take 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 9, 2024
1 parent ff92d7d commit ee96f76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions integration/linux/build/Dockerfile-rockylinux.template
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ ENV NINJA_VERSION 1.12.1
RUN set -ex \
&& curl -fsSLo python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
&& curl -fsSLo python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
&& curl -fsSLo ninja-linux.zip "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip" \
&& unzip ninja-linux.zip -d /usr/local/bin \
&& rm -f ninja-linux.zip \
&& chmod +x /usr/local/bin/ninja \
&& for key in \
"${PYTHON_KEYS[@]}"
; do \
Expand Down Expand Up @@ -118,6 +114,13 @@ RUN set -ex \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& curl -fsSL "https://github.com/ninja-build/ninja/archive/refs/tags/v${NINJA_VERSION}.tar.gz" -o /tmp/ninja.tar.gz \
&& mkdir -p /usr/src/ninja \
&& tar -xzC /usr/src/ninja --strip-components=1 -f /tmp/ninja.tar.gz \
&& rm /tmp/ninja.tar.gz \
&& cd /usr/src/ninja \
&& ./configure.py --bootstrap --verbose \
&& cp -a ./ninja /usr/local/bin/ninja \
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
&& rm -rf "$GNUPGHOME" \
\
Expand Down
11 changes: 7 additions & 4 deletions integration/linux/build/rockylinux-9/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee96f76

Please sign in to comment.