#
# This GitLab CI configuration builds the thesis on each push
# The thesis is stored as an repository artifact
#
# It works with the gitlab.mff.cuni.cz instance.
#

stages:
  - build
  - verify

latexmk:
  stage: build
  image: aergus/latex
  script: |
    latexmk thesis && latexmk abstract-cz && latexmk abstract-en;
  artifacts:
    paths:
      - thesis.pdf
      - abstract-cz.pdf
      - abstract-en.pdf

verapdf:
  stage: verify
  image: ghcr.io/mff-cuni-cz/cuni-thesis-validator
  script: |
    verify *.pdf |tee /dev/stderr |grep -qE 'nonCompliant="0"'
