forked from cran4linux/rspm
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.92 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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: '18.04', repo: 'rocker/r-'}
- {image: 'ubuntu', tag: '20.04', repo: 'rocker/r-'}
- {image: 'ubuntu', tag: '22.04', repo: 'rocker/r-'}
#- {image: 'leap', tag: '15.3', repo: 'opensuse/'}
#- {image: 'leap', tag: '15.4', repo: 'opensuse/'}
steps:
- name: Install dependencies (Ubuntu)
if: ${{ matrix.image == 'ubuntu' }}
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