blob: 92f7eec34a842a993d247c5b84dad2ab0c44960e [file] [log] [blame]
# use the verse rocker image, as it contains tidyverse, devtools and some texlive
image: rocker/tidyverse
# define stages of runner. at the moment,
# just build (no test or deploy).
stages:
- build
build-job:
stage: build
cache:
key: korap
paths:
- ./cache
before_script:
- source `find .. -name section_helper.sh`
- start_section install_linux_packages "Installing missing Linux packages"
- apt-get update
- apt-get install -y libvulkan1 libu2f-udev build-essential libglpk40 libcurl4-gnutls-dev libxml2-dev libsodium-dev libsecret-1-dev libfontconfig1-dev libssl-dev libxt6 libpq-dev curl
- end_section install_linux_packages
- start_section install_r_packages "Installing missing R packages"
- R -e "install.packages(c('devtools', 'RKorAPClient', 'httr', 'shiny', 'shinythemes', 'highcharter'))"
- R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")'
- end_section install_r_packages
script:
- start_section render "Running scripts"
- echo 'options(shiny.port=18000)' >> ~/.Rprofile
- R_CACHE_ROOTPATH=./cache Rscript shinyCorpusComposition.R &
- PID=$!
- sleep 10
- curl http://127.0.0.1:18000/
- kill $PID
- end_section render