From e7c82f679589b337eb37b9971868ecfbc5db7ec5 Mon Sep 17 00:00:00 2001 From: Aada Date: Sun, 16 Jun 2024 22:45:59 +0200 Subject: Add CI --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ Containerfile | 15 +++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Containerfile 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 -- cgit v1.2.3