Skip to content

Commit

Permalink
Build ninja instead of downloading a pre-built binary (take 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 9, 2024
1 parent be71887 commit ff92d7d
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 60 deletions.
12 changes: 7 additions & 5 deletions integration/linux/build/Dockerfile-centos.template
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ RUN set -ex \
https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz -o /tmp/go.tgz \
&& tar -C /usr/local -xzf /tmp/go.tgz \
&& rm /tmp/go.tgz \
&& 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 \
&& curl -fsSLO --compressed "https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION${CMAKE_ARCH:+-linux-$CMAKE_ARCH}.tar.gz" \
&& curl -fsSLO --compressed "https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-SHA-256.txt" \
&& curl -fsSLO --compressed "https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-SHA-256.txt.asc" \
Expand All @@ -255,11 +262,6 @@ RUN set -ex \
cd ..; \
rm -rf cmake-build; \
fi \
&& rm "cmake-$CMAKE_VERSION${CMAKE_ARCH:+-linux-$CMAKE_ARCH}.tar.gz" "cmake-$CMAKE_VERSION-SHA-256.txt" "cmake-$CMAKE_VERSION-SHA-256.txt.asc" \
&& curl -fsSL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux${NINJA_ARCH:+-$NINJA_ARCH}.zip" -o "ninja.zip" \
&& unzip ninja.zip -d /usr/local/bin \
&& rm -f ninja.zip \
&& chmod +x /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/Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ 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 \
&& export GNUPGHOME="$(mktemp -d)" \
&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
&& for key in \
Expand Down Expand Up @@ -123,6 +119,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 \
&& case "${dpkgArch##*-}" in \
amd64) CMAKE_ARCH='x86_64';; \
arm64) CMAKE_ARCH='aarch64';; \
Expand Down
11 changes: 7 additions & 4 deletions integration/linux/build/Dockerfile-fedora.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ RUN set -ex \
&& curl -fsSLo python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
&& curl -fsSLo git.tar.xz "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.xz" \
&& curl -fsSLo git.tar.sign "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.sign" \
&& 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 \
&& export GNUPGHOME="$(mktemp -d)" \
&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
&& (try=1; while [ $try -le 5 ]; do \
Expand Down Expand Up @@ -76,6 +72,13 @@ RUN set -ex \
&& make prefix=/usr/local install \
&& rm -rf /usr/src/git \
&& git --version \
&& 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 \
&& cd / \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- \
-y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION \
Expand Down
12 changes: 7 additions & 5 deletions integration/linux/build/centos-7/Dockerfile

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

12 changes: 7 additions & 5 deletions integration/linux/build/centos-8/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/debian-bookworm/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/debian-bullseye/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/debian-buster/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/fedora-29/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/ubuntu-bionic/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/ubuntu-focal/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/ubuntu-hirsute/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/ubuntu-jammy/Dockerfile

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

11 changes: 7 additions & 4 deletions integration/linux/build/ubuntu-noble/Dockerfile

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

2 changes: 1 addition & 1 deletion integration/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if [ -z "${VIRTUAL_ENV}"]; then
fi

${PYTHON} -m pip install --upgrade --upgrade-strategy=eager \
git+https://github.com/edgedb/edgedb-pkg@postgis
git+https://github.com/edgedb/edgedb-pkg

for old in "${dest}"/*.tar; do
rm -f "${old}"
Expand Down

0 comments on commit ff92d7d

Please sign in to comment.