]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Install PDF dependencies on demand in GitLab CI
authorMichał Kępień <michal@isc.org>
Thu, 12 Oct 2023 12:27:35 +0000 (14:27 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 12 Oct 2023 12:27:35 +0000 (14:27 +0200)
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

index 8679f31f462cafdf149b1173c5fffb76f1022904..6b47176199d8e2dbda5aa0584754da66842e05dd 100644 (file)
@@ -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: