Skip to content

Commit fb5d2ef

Browse files
committed
a start on porting dockerfile to gha
1 parent db48488 commit fb5d2ef

File tree

3 files changed

+28
-96
lines changed

3 files changed

+28
-96
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ jobs:
3030
- {os: windows-latest, r: 'release'}
3131
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
3232
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
33-
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
33+
# visual tests are only run on linux r-release since the svg generator (orca) isn't cross-platform
34+
- {os: ubuntu-18.04, r: 'release', vdiffr: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3435
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3536
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3637
- {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3738
- {os: ubuntu-18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3839

3940
env:
4041
RSPM: ${{ matrix.config.rspm }}
42+
VDIFFR: ${{ matrix.config.vdiffr }}
4143
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
4244

4345
steps:
@@ -72,6 +74,31 @@ jobs:
7274
pak::local_system_requirements(execute = TRUE)
7375
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
7476
shell: Rscript {0}
77+
78+
- name: Install google chrome
79+
if: runner.vdiffr == true
80+
run: |
81+
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
82+
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
83+
apt-get update -y
84+
apt-get install -y google-chrome-stable
85+
shell: bash
86+
87+
# TODO: maybe this should install via conda or npm instead?
88+
- name: Install orca
89+
if: runner.vdiffr == true
90+
run: |
91+
apt-get -y update
92+
apt-get install -y libgtk2.0-0 libgconf-2-4 xvfb xauth libxtst6 libxss1 libnss3 libasound2 desktop-file-utils
93+
mkdir -p /opt/orca
94+
cd /opt/orca
95+
wget https://github.com/plotly/orca/releases/download/v1.3.1/orca-1.3.1.AppImage
96+
chmod +x orca-1.3.1.AppImage
97+
./orca-1.3.1.AppImage --appimage-extract
98+
rm orca-1.3.1.AppImage
99+
printf '#!/bin/bash \nargs=("$@") \nif [[ ! " ${args[@]} " =~ "--no-sandbox" ]]; then \n args+=("--no-sandbox") \nfi \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /opt/orca/squashfs-root/orca "${args[@]}"' > /usr/bin/orca \
100+
chmod +x /usr/bin/orca
101+
shell: bash
75102

76103
- name: Install dependencies
77104
run: |

inst/docker/Dockerfile.vtest

Lines changed: 0 additions & 95 deletions
This file was deleted.

inst/docker/README.md

Whitespace-only changes.

0 commit comments

Comments
 (0)