blob: 4158920ea119fb78d9efbb8782dfd8d7b5734a2b [file] [log] [blame]
Marc Kupietzb80aa782023-10-08 23:33:26 +02001# use the verse rocker image, as it contains tidyverse, devtools and some texlive
2image: rocker/tidyverse
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: revealjs
14 paths:
15 - ./cache
16
17 artifacts:
18 paths:
19 - "target/*"
Marc Kupietzfbf254d2023-10-09 15:10:42 +020020 - "target/ids_files/*"
Marc Kupietzb80aa782023-10-08 23:33:26 +020021
22 before_script:
23 - source `find .. -name section_helper.sh`
24
25 - start_section install_linux_packages "Installing missing Linux packages"
26 - apt-get update
Marc Kupietzfbf254d2023-10-09 15:10:42 +020027 - apt-get install -y libvulkan1 libu2f-udev fonts-liberation build-essential libglpk40 libcurl4-gnutls-dev libxml2-dev libsodium-dev libsecret-1-dev libfontconfig1-dev libssl-dev libxt6 libpq-dev imagemagick
28 - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
29 - dpkg -i google-chrome-stable_current_amd64.deb || apt-get install -y -f
Marc Kupietzb80aa782023-10-08 23:33:26 +020030 - locale-gen de_DE.utf8 en_GB.utf8 en_US.utf8
Marc Kupietzb80aa782023-10-08 23:33:26 +020031 - end_section install_linux_packages
32
Marc Kupietzfbf254d2023-10-09 15:10:42 +020033
34 - start_section install_fonts "Installing Libertinus and Fira fonts"
35 - wget -O- https://github.com/mozilla/Fira/archive/refs/tags/4.202.tar.gz | tar -C /usr/share/fonts -zx --wildcards "*.otf"
36 - fc-cache
37 - end_section install_fonts
38
Marc Kupietzb80aa782023-10-08 23:33:26 +020039 - start_section install_r_packages "Installing missing R packages"
Marc Kupietze8dc30b2023-10-09 12:16:30 +020040 - R -e "install.packages(c('devtools', 'RKorAPClient', 'httr', 'tidytext', 'httpuv', 'scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite', 'qrcode', 'rsvg', 'highcharter'))"
Marc Kupietzb80aa782023-10-08 23:33:26 +020041 - R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")'
Marc Kupietz2b548bc2023-10-09 07:21:59 +020042 - R -e 'devtools::install(".")'
Marc Kupietzb80aa782023-10-08 23:33:26 +020043 - end_section install_r_packages
44
45 script:
46 - start_section render "Running scripts"
47 - R_CACHE_ROOTPATH=./cache R -e "require(rmarkdown); render('examples/ids.Rmd', output_format='revealjs::revealjs_presentation', output_dir='target')"
Marc Kupietzfbf254d2023-10-09 15:10:42 +020048 - ./ci/screenshot target/ids.html target/title.png
49 - ./ci/screenshot file://`pwd`/target/ids.html#/light-verb-constructions target/lvc.png
50 - ./ci/screenshot file://`pwd`/target/ids.html#/registered-users target/users.png
51 - ./ci/screenshot file://`pwd`/target/ids.html#/references target/references.png
Marc Kupietzb80aa782023-10-08 23:33:26 +020052 - end_section render