Skip to content
Snippets Groups Projects
Commit 1e9d4a3c authored by Philip Bergmann's avatar Philip Bergmann
Browse files

build the PDF via CI

parent 70c347cd
No related branches found
No related tags found
No related merge requests found
Pipeline #68022 passed
# SPDX-FileCopyrightText: 2024 Philip Bergmann <philip.bergmann@uni-wuerzburg.de>
# SPDX-FileCopyrightText: 2024-2025 Philip Bergmann <philip.bergmann@uni-wuerzburg.de>
# SPDX-License-Identifier: CC0-1.0
default:
......@@ -7,10 +7,26 @@ default:
- linux
- docker
stages:
- lint
- build
# Snippet from https://reuse.software/dev/
reuse:
stage: lint
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint
build-as-is:
stage: build
image: registry.gitlab.com/islandoftex/images/texlive:latest
script:
- "./build.sh"
artifacts:
name: "$CI_PROJECT_NAME-job$CI_JOB_ID"
expire_in: "5 days"
paths:
- "writeup.pdf"
build.sh 0 → 100755
#!/bin/sh
# Builds the document using the 'current' documentclass configuration
# SPDX-FileCopyrightText: 2025 Philip Bergmann <philip.bergmann@uni-wuerzburg.de>
# SPDX-License-Identifier: CC0-1.0
set -eu
# Absolute path to $0's directory, resolving all symlinks in the path
script_dir="$(dirname "$(readlink -f "$0")")"
readonly script_dir
cd -- "$script_dir"
# Config: job name
readonly default_jobname="writeup"
readonly jobname="${jobname:-$default_jobname}"
# latexmk sometimes has/had(?) problems with recognozing the source has changed
# after a git checkout/... and therefore decidied no rebuild was needed
# (even though it was!).
# We solve this by always deleting the PDF before the latexmk call in build.sh
rm -f -- "$jobname.pdf"
# Increase latex max line length, this makes it easier to read the log
# from https://tex.stackexchange.com/a/52994
export max_print_line=1000
export error_line=254
export half_error_line=238
# Run latexmk with the options specified in latexmkrc
latexmk "$jobname"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment