blob: 90f17723bb927c39c5936e1e774c40dc3de8ff25 [file] [log] [blame]
Marc Kupietz1f5969c2023-05-27 11:36:08 +02001# use the verse rocker image, as it contains tidyverse, devtools and some texlive
2image: rocker/verse
3
4# define stages of runner. at the moment,
5# just build (no test or deploy).
6stages:
7 - build
8
9build-job:
10 stage: build
11
12 cache:
13 key: icc
14 paths:
15 - ./cache
16
17 artifacts:
18 paths:
19 - "target/*"
20
21 before_script:
22 - source `find .. -name section_helper.sh`
23
24 - start_section install_linux_packages "Installing missing Linux packages"
25 - apt-get update
26 - apt-get install -y build-essential libglpk40 libcurl4-gnutls-dev libxml2-dev libsodium-dev libsecret-1-dev libfontconfig1-dev libssl-dev libxt6 libpq-dev imagemagick
27 - locale-gen de_DE.utf8 en_GB.utf8 en_US.utf8
28
29 - end_section install_linux_packages
30
31 - start_section install_fonts "Installing Libertinus and Fira fonts"
32 - wget -O- https://github.com/mozilla/Fira/archive/refs/tags/4.202.tar.gz | tar -C /usr/share/fonts -zx --wildcards "*.otf"
33 - fc-cache
34 - end_section install_fonts
35
36 - start_section install_r_packages "Installing missing R packages"
Marc Kupietz6e21b102023-06-02 18:04:04 +020037 - R -e "install.packages(c('RKorAPClient', 'httr', 'tidytext', 'httpuv', 'scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite'))"
Marc Kupietz1f5969c2023-05-27 11:36:08 +020038 - R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")'
39 - end_section install_r_packages
40
41 script:
42 - start_section render "Running scripts"
Marc Kupietz6e21b102023-06-02 18:04:04 +020043 - R_CACHE_ROOTPATH=./cache R -f ./R/icc_stats.R
44 - R_CACHE_ROOTPATH=./cache R -e "require(rmarkdown); render('R/report.Rmd', output_format='html_document', output_dir='target')"
Marc Kupietz1f5969c2023-05-27 11:36:08 +020045 - end_section render
46