From c125746f6e8d7a142fcc3c9e0a4e5f81932a6641 Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Fri, 16 Jan 2026 19:33:56 +0300 Subject: [PATCH] perf: optimize build with configure cache and parallel make - Add -C flag to ./configure for caching results - Use --depth 1 for git clone (faster) - Use make -j$(nproc) for stabber/libstrophe builds Borrowed optimizations from build/multicore branch. --- Dockerfile.arch | 4 ++-- Dockerfile.debian | 8 ++++---- Dockerfile.fedora | 8 ++++---- Dockerfile.tumbleweed | 4 ++-- Dockerfile.ubuntu | 8 ++++---- ci-build.sh | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Dockerfile.arch b/Dockerfile.arch index 3b3e7f14..fb68a128 100644 --- a/Dockerfile.arch +++ b/Dockerfile.arch @@ -63,12 +63,12 @@ USER root RUN pacman -U --noconfirm libstrophe-git/libstrophe-git-*.pkg.tar.zst WORKDIR /usr/src -RUN git clone -c http.sslverify=false https://git.jabber.space/devs/stabber +RUN git clone --depth 1 -c http.sslverify=false https://git.jabber.space/devs/stabber WORKDIR /usr/src/stabber RUN ./bootstrap.sh RUN ./configure --prefix=/usr --disable-dependency-tracking -RUN make +RUN make -j$(nproc) RUN make install WORKDIR /usr/src/profanity diff --git a/Dockerfile.debian b/Dockerfile.debian index bbeb7bab..d0f454f1 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -39,19 +39,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN mkdir -p /usr/src/{stabber,libstrophe,profanity} WORKDIR /usr/src -RUN git clone -c http.sslverify=false https://git.jabber.space/devs/stabber -RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe +RUN git clone --depth 1 -c http.sslverify=false https://git.jabber.space/devs/stabber +RUN git clone --depth 1 -c http.sslverify=false https://github.com/strophe/libstrophe WORKDIR /usr/src/stabber RUN ./bootstrap.sh RUN ./configure --prefix=/usr --disable-dependency-tracking -RUN make +RUN make -j$(nproc) RUN make install WORKDIR /usr/src/libstrophe RUN ./bootstrap.sh RUN ./configure --prefix=/usr -RUN make +RUN make -j$(nproc) RUN make install WORKDIR /usr/src/profanity diff --git a/Dockerfile.fedora b/Dockerfile.fedora index 6fd4013e..19983dce 100644 --- a/Dockerfile.fedora +++ b/Dockerfile.fedora @@ -49,20 +49,20 @@ ENV TERM=xterm RUN mkdir -p /usr/src WORKDIR /usr/src -RUN git clone -c http.sslverify=false https://git.jabber.space/devs/stabber +RUN git clone --depth 1 -c http.sslverify=false https://git.jabber.space/devs/stabber WORKDIR /usr/src/stabber RUN ./bootstrap.sh RUN ./configure --prefix=/usr --disable-dependency-tracking -RUN make +RUN make -j$(nproc) RUN make install WORKDIR /usr/src RUN mkdir -p /usr/src/libstrophe -RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe +RUN git clone --depth 1 -c http.sslverify=false https://github.com/strophe/libstrophe WORKDIR /usr/src/libstrophe RUN ./bootstrap.sh RUN ./configure --prefix=/usr -RUN make +RUN make -j$(nproc) RUN make install RUN mkdir -p /usr/src/profanity diff --git a/Dockerfile.tumbleweed b/Dockerfile.tumbleweed index bd9e69f2..292214c2 100644 --- a/Dockerfile.tumbleweed +++ b/Dockerfile.tumbleweed @@ -48,11 +48,11 @@ ENV TERM=xterm RUN mkdir -p /usr/src WORKDIR /usr/src -RUN git clone -c http.sslverify=false https://git.jabber.space/devs/stabber +RUN git clone --depth 1 -c http.sslverify=false https://git.jabber.space/devs/stabber WORKDIR /usr/src/stabber RUN ./bootstrap.sh RUN ./configure --prefix=/usr --disable-dependency-tracking -RUN make +RUN make -j$(nproc) RUN make install RUN mkdir -p /usr/src/profanity diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index f89ec5ea..8af14224 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -38,19 +38,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN mkdir -p /usr/src/{stabber,libstrophe,profanity} WORKDIR /usr/src -RUN git clone -c http.sslverify=false https://git.jabber.space/devs/stabber -RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe +RUN git clone --depth 1 -c http.sslverify=false https://git.jabber.space/devs/stabber +RUN git clone --depth 1 -c http.sslverify=false https://github.com/strophe/libstrophe WORKDIR /usr/src/stabber RUN ./bootstrap.sh RUN ./configure --prefix=/usr --disable-dependency-tracking -RUN make +RUN make -j$(nproc) RUN make install WORKDIR /usr/src/libstrophe RUN ./bootstrap.sh RUN ./configure --prefix=/usr -RUN make +RUN make -j$(nproc) RUN make install WORKDIR /usr/src/profanity diff --git a/ci-build.sh b/ci-build.sh index 03a9572f..99407308 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -107,11 +107,11 @@ esac case "$ARCH" in linux*) echo - echo "--> Building with ./configure ${tests[0]} --enable-valgrind $*" + echo "--> Building with ./configure -C ${tests[0]} --enable-valgrind $*" echo # shellcheck disable=SC2086 - ./configure ${tests[0]} --enable-valgrind $* + ./configure -C ${tests[0]} --enable-valgrind $* $MAKE CC="${CC}" if grep '^ID=' /etc/os-release | grep -q -e debian; then @@ -133,13 +133,13 @@ build_and_test() { { echo "=== Build $idx started at $(date) ===" - echo "--> Building in $build_dir with ./configure $features $extra_args" + echo "--> Building in $build_dir with ./configure -C $features $extra_args" mkdir -p "$build_dir" cd "$build_dir" # shellcheck disable=SC2086 - ../configure $features $extra_args + ../configure -C $features $extra_args $MAKE CC="${CC}" $MAKE check-functional-parallel