aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAada2024-06-16 22:45:59 +0200
committerAada2024-06-16 22:45:59 +0200
commite7c82f679589b337eb37b9971868ecfbc5db7ec5 (patch)
treedf4c5daf8f1f0da01f86c1b5e200f362f3735aa0
parentcf923d5099ef0d5edcec1a6a8f6c35eeed5d0403 (diff)
Add CI
-rw-r--r--.gitlab-ci.yml37
-rw-r--r--Containerfile15
2 files changed, 52 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..0110cf7
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,37 @@
+stages:
+ - build-env
+ - publish-env
+ - build-doc
+ - release
+
+variables:
+ CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
+ TARGET_BASE: $CLOUD_CI_URL/Documents/$CI_PROJECT_NAMESPACE
+
+# Build the build environment for this document
+build-env:
+ stage: build-env
+ image: quay.io/podman/stable
+ script:
+ - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+ - podman build -t $CONTAINER_RELEASE_IMAGE .
+ - podman push $CONTAINER_RELEASE_IMAGE
+ rules:
+ - changes:
+ - Containerfile
+
+# Build the document and store artefacts
+build-final:
+ stage: build-doc
+ image: $CONTAINER_RELEASE_IMAGE
+ script:
+ - xelatex heidelberg.tex
+ - inkscape --export-filename=heidelberg.png --export-dpi=300 --export-background=white
+ artifacts:
+ paths:
+ - heidelberg.pdf
+ - heidelberg.png
+ expire_in: 1 week
+ rules:
+ - changes:
+ - "*.tex"
diff --git a/Containerfile b/Containerfile
new file mode 100644
index 0000000..662c5d2
--- /dev/null
+++ b/Containerfile
@@ -0,0 +1,15 @@
+FROM registry.fedoraproject.org/fedora-minimal:39
+
+# Build tools
+RUN microdnf install -y inkscape git
+
+# TeXlive components
+RUN microdnf install -y texlive-scheme-basic \
+ texlive-collection-luatex \
+ texlive-collection-pictures \
+ texlive-collection-latexrecommended \
+ texlive-collection-latexextra \
+ texlive-collection-binextra \
+ texlive-collection-fontsextra
+
+RUN microdnf clean all