Switch to chrome as chromium lacks support on Ubunutu
Change-Id: I9629291ed65fbd84e1686adca0fe332551715ff9
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 71836ac..004f184 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
# use the verse rocker image, as it contains tidyverse, devtools and some texlive
-image: rocker/verse
+image: rocker/tidyverse
# define stages of runner. at the moment,
# just build (no test or deploy).
@@ -23,25 +23,24 @@
- start_section install_linux_packages "Installing missing Linux packages"
- apt-get update
- - 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 ghostscript software-properties-common inkscape scour
- - add-apt-repository ppa:saiarcot895/chromium-beta
- - apt update
- - apt install -y chromium-browser
+ - 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 ghostscript inkscape scour
+ - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
+ - dpkg -i google-chrome-stable_current_amd64.deb || apt-get install -y -f
- locale-gen de_DE.utf8 en_GB.utf8 en_US.utf8
- end_section install_linux_packages
+ - start_section testing_chromium "Testing chromium PDF export"
+ - ./ci/html2pdf https://google.com test.pdf 1
+ - ls -l ./test.pdf
+ - end_section testing_chromium
+
- start_section install_fonts "Installing Libertinus and Fira fonts"
- wget -O- https://github.com/mozilla/Fira/archive/refs/tags/4.202.tar.gz | tar -C /usr/share/fonts -zx --wildcards "*.otf"
- fc-cache
- end_section install_fonts
- - start_section testing_chromium Testing chromium PDF export
- - chromium-browser --headless --disable-gpu --no-sandbox --run-all-compositor-stages-before-draw --no-pdf-header-footer --print-to-pdf-no-header --print-to-pdf=./test.pdf https://www.ids-mannheim.de/
- - ls -l ./test.pdf
- - end_section testing_chromium
-
- start_section install_r_packages "Installing missing R packages"
- - R -e "install.packages(c('scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite'))"
+ - R -e "install.packages(c('devtools', 'scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite'))"
- R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")'
- R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/posterdown")'
- end_section install_r_packages
diff --git a/ci/html2pdf b/ci/html2pdf
index 04dbac7..9341aea 100755
--- a/ci/html2pdf
+++ b/ci/html2pdf
@@ -1,6 +1,6 @@
#!/bin/sh -eu
in=$1 out=$2 page0=${3:-} page1=${4:-$page0}
-chromium-browser --headless --disable-gpu --no-sandbox --run-all-compositor-stages-before-draw --no-pdf-header-footer --print-to-pdf-no-header --print-to-pdf="$out" "$in"
+google-chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window --disable-gpu --run-all-compositor-stages-before-draw --no-pdf-header-footer --print-to-pdf="$out" "$in"
GS_ARGS=
if [ -n "$page0" ]; then
GS_ARGS="-dFirstPage=$page0 -dLastPage=$page1"