Skip to content

install deps package by package if global installation fails #150

install deps package by package if global installation fails

install deps package by package if global installation fails #150

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }}
runs-on: ubuntu-latest
name: ${{ matrix.image }}:${{ matrix.tag }}
container:
image: ${{ matrix.repo }}${{ matrix.image }}:${{ matrix.tag }}
strategy:
fail-fast: false
matrix:
include:
- {image: 'centos', tag: 'centos7', repo: 'ghcr.io/cran4linux/r-'}
- {image: 'centos', tag: 'stream8', repo: 'ghcr.io/cran4linux/r-'}
- {image: 'centos', tag: 'stream9', repo: 'ghcr.io/cran4linux/r-'}
- {image: 'ubuntu', tag: '20.04', repo: 'rocker/r-'}
- {image: 'ubuntu', tag: '22.04', repo: 'rocker/r-'}
#- {image: 'base', tag: 'latest', repo: 'rocker/r-'} # units not available
#- {image: 'leap', tag: '15.4', repo: 'opensuse/'}
#- {image: 'leap', tag: '15.5', repo: 'opensuse/'}
steps:
- name: Install dependencies (Ubuntu)
if: ${{ matrix.image == 'ubuntu' || matrix.image == 'base' }}
run: |
apt update && apt install -y apt-file
- name: Install dependencies (openSUSE)
if: ${{ matrix.image == 'leap' }}
run: |
zypper addrepo https://download.opensuse.org/repositories/Education/${{ matrix.tag }}/Education.repo
zypper --no-gpg-checks install -y tar R-base # no binaries available :(
- uses: actions/checkout@v3
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
export LANG=$(locale -a | grep utf8 | head -n1)
Rscript -e 'install.packages(c("renv", "tinytest"), repos="https://cran.r-project.org")'
R CMD build . && mkdir check
useradd -m rspm && chown rspm:rspm check
su rspm -c "R CMD check rspm_*.tar.gz --no-manual -o check"
- name: Upload check results
if: ${{ failure() }}
uses: actions/upload-artifact@master
with:
name: r-${{ matrix.image }}-${{ matrix.tag }}-results
path: check