Marc Kupietz | 1f5969c | 2023-05-27 11:36:08 +0200 | [diff] [blame] | 1 | # use the verse rocker image, as it contains tidyverse, devtools and some texlive |
| 2 | image: rocker/verse |
| 3 | |
| 4 | # define stages of runner. at the moment, |
| 5 | # just build (no test or deploy). |
| 6 | stages: |
| 7 | - build |
| 8 | |
| 9 | build-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 Kupietz | 6e21b10 | 2023-06-02 18:04:04 +0200 | [diff] [blame] | 37 | - R -e "install.packages(c('RKorAPClient', 'httr', 'tidytext', 'httpuv', 'scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite'))" |
Marc Kupietz | 1f5969c | 2023-05-27 11:36:08 +0200 | [diff] [blame] | 38 | - R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")' |
Marc Kupietz | 96c3af3 | 2023-06-14 07:31:46 +0200 | [diff] [blame^] | 39 | - R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/posterdown")' |
Marc Kupietz | 1f5969c | 2023-05-27 11:36:08 +0200 | [diff] [blame] | 40 | - end_section install_r_packages |
| 41 | |
| 42 | script: |
| 43 | - start_section render "Running scripts" |
Marc Kupietz | 6e21b10 | 2023-06-02 18:04:04 +0200 | [diff] [blame] | 44 | - R_CACHE_ROOTPATH=./cache R -f ./R/icc_stats.R |
| 45 | - R_CACHE_ROOTPATH=./cache R -e "require(rmarkdown); render('R/report.Rmd', output_format='html_document', output_dir='target')" |
Marc Kupietz | 96c3af3 | 2023-06-14 07:31:46 +0200 | [diff] [blame^] | 46 | - R_CACHE_ROOTPATH=./cache R -e "require(rmarkdown); render('R/poster.Rmd', output_format='posterdown::posterdown_ids', output_dir='target')" |
Marc Kupietz | 1f5969c | 2023-05-27 11:36:08 +0200 | [diff] [blame] | 47 | - end_section render |
| 48 | |