Commit 302a0bc5 authored by Jari-Matti Mäkelä's avatar Jari-Matti Mäkelä
Browse files

Clean up the CI script

parent dc18ffb7
Pipeline #39525 passed with stages
in 6 minutes and 43 seconds
......@@ -13,131 +13,50 @@
image: registry.gitlab.utu.fi/tech/soft/thesis-builder:latest
stages:
- prepare
- build
- test
- deploy
prepare_tests:
stage: prepare
script:
- cd latex
- cp utuftthesis.cls ../tests/utuftthesis.cls
- "sed 's/version=final/version=draft/g' thesis.tex > thesis2.tex"
artifacts:
paths:
- latex/thesis2.tex
- tests/utuftthesis.cls
draft_builder:
draft_version:
stage: build
script:
- cd latex
- "latexmk -pdf --shell-escape thesis2.tex"
- cp thesis2.pdf pdflatex.pdf
- "latexmk -CA thesis2.tex"
- cp -r latex draft
- cd draft
- cp thesis.tex thesis2.tex
- "sed -i 's/version=final/version=draft/g' *.tex"
- "latexmk -pdf --shell-escape thesis.tex"
- "latexmk -xelatex --shell-escape thesis2.tex"
- cp thesis2.pdf xelatex.pdf
artifacts:
paths:
- latex/pdflatex.pdf
- latex/xelatex.pdf
draft_validator:
stage: test
script:
- "pdfinfo latex/pdflatex.pdf |grep '^Pages: *16$'"
- "pdfinfo latex/xelatex.pdf |grep '^Pages: *16$'"
- "pdfinfo thesis.pdf |grep '^Pages: *16$'"
- "pdfinfo thesis2.pdf |grep '^Pages: *16$'"
pdfa_builder:
final_version:
stage: build
script:
- cd latex
- cp thesis.tex thesis2.tex
- "latexmk -pdf --shell-escape thesis.tex"
- cp thesis.pdf pdflatex-pdfa.pdf
- "latexmk -CA thesis.tex"
- "latexmk -xelatex --shell-escape thesis.tex"
- cp thesis.pdf xelatex-pdfa.pdf
- "latexmk -xelatex --shell-escape thesis2.tex"
- "pdfinfo thesis.pdf |grep '^Pages: *16$'"
- "pdfinfo thesis2.pdf |grep '^Pages: *16$'"
- "pdfa-validate thesis.pdf|grep '^PASS'"
- "pdfa-validate thesis2.pdf|grep '^PASS'"
artifacts:
paths:
- latex/thesis.pdf
- latex/pdflatex-pdfa.pdf
- latex/xelatex-pdfa.pdf
pdfa_validator:
stage: test
script:
- "pdfa-validate latex/pdflatex-pdfa.pdf|grep '^PASS'"
- "pdfa-validate latex/xelatex-pdfa.pdf|grep '^PASS'"
- latex/thesis2.pdf
xelatex_builder:
testsuite_pdflatex:
stage: build
script:
- cd tests
- "for i in *.tex; do latexmk -xelatex -output-directory=xelatex/ $i; done"
artifacts:
paths:
- tests/xelatex/test-app1.pdf
- tests/xelatex/test-app2.pdf
- tests/xelatex/test-app3.pdf
- tests/xelatex/test-app4.pdf
- tests/xelatex/test-app5.pdf
- tests/xelatex/test-bilingual.pdf
- tests/xelatex/test-english.pdf
- tests/xelatex/test-finnish.pdf
- tests/xelatex/test-hyperref.pdf
xelatex_content_validator:
stage: test
script:
- cd tests/xelatex
- "for i in *.pdf; do pdftotext $i; done"
- "grep '2 s., 5 liites.' test-app1.txt"
- "grep '2 s., 3 liites.' test-app2.txt"
- "grep '2 s., 1 liites.' test-app3.txt"
- "grep 'TkK-tutkielma, 2 s.$' test-app4.txt"
- "grep 'TkK-tutkielma, 3 s.$' test-app5.txt"
- "grep 'TURUN YLIOPISTO' test-finnish.txt"
- "grep 'TURUN YLIOPISTO' test-bilingual.txt"
- "grep 'UNIVERSITY OF TURKU' test-bilingual.txt"
- "grep 'UNIVERSITY OF TURKU' test-english.txt"
- "pdfinfo test-hyperref.pdf |grep 'LaTeX with hyperref'"
- wget https://tech.utugit.fi/soft/thesis-testsuite/testsuite.tar.gz
- tar xf testsuite.tar.gz
- cp latex/*cls .
- ./bash_unit test_pdflatex.sh
pdflatex_builder:
testsuite_xelatex:
stage: build
script:
- cd tests
- "for i in *.tex; do latexmk -pdf -output-directory=pdflatex/ $i; done"
artifacts:
paths:
- tests/pdflatex/test-app1.pdf
- tests/pdflatex/test-app2.pdf
- tests/pdflatex/test-app3.pdf
- tests/pdflatex/test-app4.pdf
- tests/pdflatex/test-app5.pdf
- tests/pdflatex/test-bilingual.pdf
- tests/pdflatex/test-english.pdf
- tests/pdflatex/test-finnish.pdf
- tests/pdflatex/test-hyperref.pdf
pdflatex_content_validator:
stage: test
script:
- cd tests/pdflatex
- "for i in *.pdf; do pdftotext $i; done"
- "grep '2 s., 5 liites.' test-app1.txt"
- "grep '2 s., 3 liites.' test-app2.txt"
- "grep '2 s., 1 liites.' test-app3.txt"
- "grep 'TkK-tutkielma, 2 s.$' test-app4.txt"
- "grep 'TkK-tutkielma, 3 s.$' test-app5.txt"
- "grep 'TURUN YLIOPISTO' test-finnish.txt"
- "grep 'TURUN YLIOPISTO' test-bilingual.txt"
- "grep 'UNIVERSITY OF TURKU' test-bilingual.txt"
- "grep 'UNIVERSITY OF TURKU' test-english.txt"
- "pdfinfo test-hyperref.pdf |grep 'LaTeX with hyperref'"
- wget https://tech.utugit.fi/soft/thesis-testsuite/testsuite.tar.gz
- tar xf testsuite.tar.gz
- cp latex/*cls .
- ./bash_unit test_xelatex.sh
pages:
stage: deploy
script:
......
......@@ -246,7 +246,12 @@
\RequirePackage{fvextra} % minted
\RequirePackage{csquotes} % quotations
\RequirePackage{datetime2} % month names
\langfin{
\RequirePackage[fi,en-US]{datetime2} % month names
}{
\RequirePackage[en-US,fi]{datetime2} % month names
}
%% !! Update these only if the document's main language is not finnish or english !!
......
@article{crawley2007write,
title={How to Write a Research Proposal and Succeed},
author={Crawley, Gerard M and O'Sullivan, Eoin},
year={2007},
publisher={World Scientific}
}
@article{puasuareanu2009survey,
title={A survey of new trends in symbolic execution for software testing and analysis},
author={P{\u{a}}s{\u{a}}reanu, Corina S and Visser, Willem},
journal={International journal on software tools for technology transfer},
volume={11},
number={4},
pages={339--353},
year={2009},
publisher={Springer}
}
\ No newline at end of file
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\pubtype{tkk}
\title{Tutkielma}
\author{Oma nimi}
\keywords{tähän, lista, avainsanoista}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\chapter{Johdanto}
\blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Lopuksi}
\blindtext
\printbibliography
\appchapter{Liitedokumentti}
sivu 1
\appchapter{Liitedokumentti 2}
sivu 1
\newpage
sivu 2
\appchapter{Liitedokumentti 3}
\Blindtext
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\pubtype{tkk}
\title{Tutkielma}
\author{Oma nimi}
\keywords{tähän, lista, avainsanoista}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\chapter{Johdanto}
\blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Lopuksi}
\blindtext
\printbibliography
\appchapter{Liitedokumentti}
sivu 1
\appchapter{Liitedokumentti 2}
sivu 1
\newpage
sivu 2
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\pubtype{tkk}
\title{Tutkielma}
\author{Oma nimi}
\keywords{tähän, lista, avainsanoista}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\chapter{Johdanto}
\blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Lopuksi}
\blindtext
\printbibliography
\appchapter{Liitedokumentti}
sivu 1
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\pubtype{tkk}
\title{Tutkielma}
\author{Oma nimi}
\keywords{tähän, lista, avainsanoista}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\chapter{Johdanto}
\blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Lopuksi}
\blindtext
\printbibliography
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,countbibpages=true,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\pubtype{tkk}
\title{Tutkielma}
\author{Oma nimi}
\keywords{tähän, lista, avainsanoista}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\chapter{Johdanto}
\blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Lopuksi}
\blindtext
\printbibliography
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\publaben{Laboratory Name}
\pubtype{tkk}
\supervisors{Sauronin silmä, Kalle Yylä, P. Rofessori}
\title{Name of Thesis}
\author{My Name}
\keywords{tähän, lista, avainsanoista}
\keywordstwo{here, a, list, of, keywords}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\begin{abstracten}\blindtext\end{abstracten}
\tableofcontents
\listoffigures
\listoftables
\chapter{Johdanto}
\Blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Väliluku 1}
\Blindtext
\chapter{Väliluku 2}
\section{foobar}
\Blindtext
\chapter{Väliluku 3}
\section{foobar}
\Blindtext
\section{foobar}
\Blindtext
\chapter{Väliluku 4}
\section{foobar}
\Blindtext
\chapter{Väliluku 5}
\Blindtext
\chapter{Väliluku 6}
\Blindtext
\chapter{Lopuksi}
\blindtext
\printbibliography
\appchapter{Liitedokumentti}
\Blindtext
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=english,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Laboratory Name}
\pubtype{tkk}
\supervisors{aa 123,bb 234,cc 345}
\title{Name of Thesis}
\author{My Name}
\keywords{here, a, list, of, keywords}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\listoffigures
\listoftables
\chapter{Johdanto}
\Blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Väliluku 1}
\Blindtext
\chapter{Väliluku 2}
\section{foobar}
\Blindtext
\chapter{Väliluku 3}
\section{foobar}
\Blindtext
\section{foobar}
\Blindtext
\chapter{Väliluku 4}
\section{foobar}
\Blindtext
\chapter{Väliluku 5}
\Blindtext
\chapter{Väliluku 6}
\Blindtext
\chapter{Lopuksi}
\blindtext
\printbibliography
\appchapter{Liitedokumentti}
\Blindtext
\end{document}
% test document for gitlab ci tests
\documentclass[a4paper,12pt,language=finnish,mainfont=none]{utuftthesis}
% how many levels of section numbering
\setcounter{secnumdepth}{2}
% how many levels of section numbering in the TOC
\setcounter{tocdepth}{2}
\usepackage{blindtext}
% suppress complaints about missing finnish blabla
\pretocmd{\blindtext}{\selectlanguage{english}}{}{}
\pretocmd{\Blindtext}{\selectlanguage{english}}{}{}
\addbibresource{Bibliografia.bib}
\pubyear{2018}
\pubmonth{6}
\publab{Labran nimi}
\pubtype{tkk}
\supervisors{Sauronin silmä, Kalle Yylä, P. Rofessori}
\title{Tutkielma}
\author{Oma nimi}
\keywords{tähän, lista, avainsanoista}
\begin{document}
\maketitle
\begin{abstract}\blindtext\end{abstract}
\tableofcontents
\listoffigures
\listoftables
\chapter{Johdanto}
\Blindtext
Viitataan tähän \cite{crawley2007write}.
\chapter{Väliluku 1}
\Blindtext
\chapter{Väliluku 2}
\section{foobar}
\Blindtext
\chapter{Väliluku 3}
\section{foobar}
\Blindtext
\section{foobar}
\Blindtext
\chapter{Väliluku 4}
\section{foobar}
\Blindtext
\chapter{Väliluku 5}
\Blindtext
\chapter{Väliluku 6}
\Blindtext