From 29cba33d44c27c39e00246d2a9d54242ce6252d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 12 Oct 2023 14:27:35 +0200 Subject: [PATCH] Install PDF dependencies on demand in GitLab CI Building the PDF version of the BIND 9 ARM requires TeX Live to be present on the build host. A TeX Live installation takes up several gigabytes of disk space. This significantly increases the size of the Debian Docker images that include that toolchain, even though only two GitLab CI jobs actually use it. Instead of including TeX Live in the Docker image itself, install the former on demand in a new GitLab CI job that only tests building the PDF version of the BIND 9 ARM. Do the same for qpdf, a tool used for checking the PDF output produced by TeX Live. This enables the size of the "base" Docker image (which a lot of GitLab CI jobs need to pull) to remain within reasonable limits. As downloading and installing TeX Live takes a significant amount of time, only run the new job in scheduled pipelines and for tags. Adjust job dependencies so that the "release" job continues to work. --- .gitlab-ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8679f31f46..6b47176199 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -514,7 +514,6 @@ cross-version-config-tests: script: - *configure - make -j${BUILD_PARALLEL_JOBS:-1} -k doc V=1 - - qpdf --check doc/arm/_build/latex/Bv9ARM.pdf - find doc/man/ -maxdepth 1 -name "*.[0-9]" -exec mandoc -T lint "{}" \; | ( ! grep -v -e "skipping paragraph macro. sp after" -e "unknown font, skipping request. ft C" -e "input text line longer than 80 bytes" ) .respdiff: &respdiff_job @@ -677,6 +676,22 @@ docs:tarball: - job: tarball-create artifacts: true +docs:pdf: + <<: *api_schedules_tags_triggers_web_triggering_rules + <<: *base_image + stage: docs + before_script: + - apt-get -y install qpdf texlive-full texlive-xetex xindy + script: + - *configure + - make -C doc/arm/ pdf V=1 + - qpdf --check doc/arm/_build/latex/Bv9ARM.pdf + needs: + - job: autoreconf + artifacts: true + artifacts: + untracked: true + # Jobs for regular GCC builds on Alpine Linux 3.18 (amd64) gcc:alpine3.18:amd64: @@ -1392,6 +1407,8 @@ release: artifacts: true - job: docs artifacts: true + - job: docs:pdf + artifacts: true only: - tags artifacts: