Commit 494a7c88 authored by Michal Nowak's avatar Michal Nowak Committed by Michał Kępień
Browse files

Build custom software in parallel

Number of make jobs is the same as in the BIND repository.
parent de0f7f2a
......@@ -8,6 +8,7 @@ variables:
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images
CENTOS_ISO_MIRROR_URL: http://isoredirect.centos.org/centos
KYUA_GIT_COMMIT: 2fc3c21c30f9c52efaacb73f6f8b8dc716cf4bc2
BUILD_PARALLEL_JOBS: 6
stages:
- images
......
......@@ -71,6 +71,7 @@ endif
endif
$(TARGETS): ARCH = $(word 3,$(subst -, ,$@))
$(TARGETS): BUILD_PARALLEL_JOBS ?= 1
$(TARGETS): VENDOR = $(word 1,$(subst -, ,$@))
$(TARGETS): VERSION = $(word 2,$(subst -, ,$@))
$(TARGETS): SOURCE_IMAGE = $(subst arm64,arm64v8/,$(subst amd64,,$(subst i386,i386/,$(ARCH))))$(VENDOR):$(VERSION)
......@@ -90,6 +91,7 @@ $(TARGETS):
sed \
-e 's,@ABI_CHECK@,$(ABI_CHECK),g' \
-e 's,@ARCH@,$(ARCH),g' \
-e 's,@BUILD_PARALLEL_JOBS@,$(BUILD_PARALLEL_JOBS),g' \
-e 's,@CLANG@,$(CLANG),g' \
-e 's,@COCCINELLE@,$(COCCINELLE),g' \
-e 's,@COMPILEDB@,$(COMPILEDB),g' \
......
......@@ -45,7 +45,7 @@ RUN if [ ! -s /kyua.tar ]; then \
mkdir /usr/src && curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
......
......@@ -57,18 +57,18 @@ RUN if [ "@VERSION@" = "centos6" ]; then yum -y install \
; fi
RUN if [ "@DNSTAP@" = "yes" ]; then yum -y install fstrm-devel protobuf-c-devel; fi
RUN if [ "@VERSION@" != "centos7" ]; then curl -sSL https://github.com/libuv/libuv/archive/v$LIBUV_VERSION.tar.gz | tar -xz -C /usr/src; fi
RUN if [ "@VERSION@" != "centos7" ]; then cd /usr/src/libuv-$LIBUV_VERSION && ./autogen.sh && ./configure --prefix /usr && make && make install; fi
RUN if [ "@VERSION@" != "centos7" ]; then cd /usr/src/libuv-$LIBUV_VERSION && ./autogen.sh && ./configure --prefix /usr && make -j@BUILD_PARALLEL_JOBS@ && make install; fi
RUN if [ "@VERSION@" = "centos6" ]; then curl -sSL https://github.com/rthalley/dnspython/archive/v$DNSPYTHON_VERSION.tar.gz | tar -xz -C /usr/src; fi
RUN if [ "@VERSION@" = "centos6" ]; then cd /usr/src/dnspython-$DNSPYTHON_VERSION && python3 setup.py install; fi
RUN if [ "@VERSION@" = "centos6" ]; then curl -sSL https://sqlite.org/2018/sqlite-autoconf-$SQLITE_VERSION.tar.gz | tar -xz -C /usr/src; fi
RUN if [ "@VERSION@" = "centos6" ]; then cd /usr/src/sqlite-autoconf-$SQLITE_VERSION && ./configure --prefix /usr && make && make install; fi
RUN if [ "@VERSION@" = "centos6" ]; then cd /usr/src/sqlite-autoconf-$SQLITE_VERSION && ./configure --prefix /usr && make -j@BUILD_PARALLEL_JOBS@ && make install; fi
RUN if [ "@VERSION@" = "centos6" ]; then ldconfig; fi
COPY kyua.tar /
RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/jmmv/atf/releases/download/atf-${ATF_VERSION}/atf-${ATF_VERSION}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/atf-${ATF_VERSION}" && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/atf-${ATF_VERSION}" && \
......@@ -76,7 +76,7 @@ RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/jmmv/lutok/releases/download/lutok-${LUTOK_VERSION}/lutok-${LUTOK_VERSION}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/lutok-${LUTOK_VERSION}" && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/lutok-${LUTOK_VERSION}" && \
......@@ -85,7 +85,7 @@ RUN if [ ! -s /kyua.tar ]; then \
cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
sed -i "s|^set(|tree_set(|; s|^\(\s\+\)set<|\1tree_set<|;" model/metadata.cpp && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
......
......@@ -108,7 +108,7 @@ RUN if [ ! -s /kyua.tar ]; then \
cd "/usr/src/atf-${ATF_VERSION}" && \
autoreconf -fi && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/atf-${ATF_VERSION}" && \
......@@ -117,7 +117,7 @@ RUN if [ ! -s /kyua.tar ]; then \
cd "/usr/src/lutok-${LUTOK_VERSION}" && \
autoreconf -fi && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/lutok-${LUTOK_VERSION}" && \
......@@ -125,7 +125,7 @@ RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
./configure --prefix /usr && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
......
......@@ -44,7 +44,7 @@ RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
CXXFLAGS="-Wno-error=deprecated-declarations" ./configure --prefix /usr --libdir /usr/lib64 && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
......
......@@ -43,7 +43,7 @@ RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/jmmv/atf/releases/download/atf-${ATF_VERSION}/atf-${ATF_VERSION}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/atf-${ATF_VERSION}" && \
./configure --prefix /usr --libdir /usr/lib64 && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/atf-${ATF_VERSION}" && \
......@@ -51,7 +51,7 @@ RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/jmmv/lutok/releases/download/lutok-${LUTOK_VERSION}/lutok-${LUTOK_VERSION}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/lutok-${LUTOK_VERSION}" && \
./configure --prefix /usr --libdir /usr/lib64 && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/lutok-${LUTOK_VERSION}" && \
......@@ -59,7 +59,7 @@ RUN if [ ! -s /kyua.tar ]; then \
curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src && \
cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
./configure --prefix /usr --libdir /usr/lib64 && \
make && \
make -j@BUILD_PARALLEL_JOBS@ && \
make install && \
make install DESTDIR=/tmp/kyua-cache-root && \
cd .. && rm -rf /tmp/kyua-cache-root/usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}" && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment