From d748ffc52724142940d7b7cd09ab015dd4cb7d02 Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Tue, 2 Sep 2025 14:45:48 +0200 Subject: [PATCH 1/3] build: Add multithreading to `make` nproc is a standard util that prints amount of available processes. -j is a flag that specifies how many cores can be utilized by `make` (default is 1) -j$(nproc) allows to use all the available machine cores, potentially significantly speeding up completion of CI actions --- Dockerfile.debian | 2 +- Dockerfile.fedora | 2 +- Dockerfile.ubuntu | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.debian b/Dockerfile.debian index 114aec28..504e01b1 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -47,7 +47,7 @@ RUN git clone -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 WORKDIR /usr/src/profanity diff --git a/Dockerfile.fedora b/Dockerfile.fedora index c8004c11..208c9c28 100644 --- a/Dockerfile.fedora +++ b/Dockerfile.fedora @@ -60,7 +60,7 @@ RUN git clone -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.ubuntu b/Dockerfile.ubuntu index 7f100ddd..1d568517 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -49,7 +49,7 @@ RUN git clone -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 WORKDIR /usr/src/profanity -- 2.49.1 From 0b0b02d6e042ecb4ff048727e8b7f034e2591b8c Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Tue, 2 Sep 2025 15:06:30 +0200 Subject: [PATCH 2/3] build: use local libstrophe version and limit depth `--depth 1` flag ensures that only latest version is loaded (since there is no need to sync full git) Using local libstrophe version increases speed of fetching --- Dockerfile.debian | 2 +- Dockerfile.fedora | 2 +- Dockerfile.ubuntu | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.debian b/Dockerfile.debian index 504e01b1..ff8fb04d 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -36,7 +36,7 @@ RUN mkdir -p /usr/src/{stabber,libstrophe,profanity} WORKDIR /usr/src #RUN git clone https://github.com/boothj5/stabber -RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe +RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrophe #WORKDIR /usr/src/stabber #RUN ./bootstrap.sh diff --git a/Dockerfile.fedora b/Dockerfile.fedora index 208c9c28..889f75eb 100644 --- a/Dockerfile.fedora +++ b/Dockerfile.fedora @@ -56,7 +56,7 @@ WORKDIR /usr/src 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 https://git.jabber.space/devs/libstrophe-gh.git libstrophe WORKDIR /usr/src/libstrophe RUN ./bootstrap.sh RUN ./configure --prefix=/usr diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 1d568517..53761022 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -37,7 +37,7 @@ RUN mkdir -p /usr/src/{stabber,libstrophe,profanity} WORKDIR /usr/src #RUN git clone https://github.com/boothj5/stabber -RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe +RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrophe # TODO: Re-enable once libmicrohttpd-dev has been updated. #WORKDIR /usr/src/stabber -- 2.49.1 From 886372caac14c64ccce8c64edd3d96e9030098ca Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Tue, 2 Sep 2025 15:10:03 +0200 Subject: [PATCH 3/3] build: add cache to ./configure with -C flag Add the -C flag to ./configure to enable caching, reducing redundant resource fetching during builds when packages and the machine remain unchanged. Caching may cause issues only if applied across different machines or if packages are modified, neither of which is the case during the build. --- Dockerfile.debian | 1 + Dockerfile.fedora | 1 + Dockerfile.ubuntu | 1 + ci-build.sh | 8 ++++---- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile.debian b/Dockerfile.debian index ff8fb04d..5b4c1823 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ autoconf \ autoconf-archive \ automake \ + ca-certificates \ expect \ gcc \ git \ diff --git a/Dockerfile.fedora b/Dockerfile.fedora index 889f75eb..3838cde2 100644 --- a/Dockerfile.fedora +++ b/Dockerfile.fedora @@ -9,6 +9,7 @@ RUN dnf install -y \ autoconf-archive \ automake \ awk \ + ca-certificates \ expect-devel \ gcc \ git \ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 53761022..5c353194 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -6,6 +6,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ autoconf \ autoconf-archive \ automake \ + ca-certificates \ expect \ gcc \ git \ diff --git a/ci-build.sh b/ci-build.sh index 82ff76ff..43f01fe5 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -121,11 +121,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 @@ -140,11 +140,11 @@ esac for features in "${tests[@]}" do echo - echo "--> Building with ./configure ${features} $*" + echo "--> Building with ./configure -C ${features} $*" echo # shellcheck disable=SC2086 - ./configure $features $* + ./configure -C $features $* $MAKE CC="${CC}" $MAKE check -- 2.49.1