-
Notifications
You must be signed in to change notification settings - Fork 6
121 lines (112 loc) · 3.7 KB
/
rhub.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/rhub2/blob/v1/inst/workflow/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub2::rhub_setup()
#
# It is unlikely that you need to modify this file manually.
name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'clang-asan,valgrind'
name:
description: 'Run name (optional)'
type: string
id:
description: 'Unique ID (optional)'
type: string
jobs:
setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}
steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/rhub2/actions/rhub-setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup
linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}
steps:
- name: Install sudo (Linux)
if: runner.os == 'Linux'
run: |
if command -v cat
then
cat /etc/os-release
fi
if command -v hostnamectl
then
hostnamectl
fi
if command -v uname
then
uname -r
fi
if command -v apt-get &> /dev/null
then
apt-get install sudo
fi
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-hub/rhub2/actions/rhub-checkout@v1
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/rhub2/actions/rhub-setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
extra-packages: TreeDistData=?ignore-before-r=99.0.0
- uses: r-hub/rhub2/actions/rhub-run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}
steps:
- uses: teatimeguest/setup-texlive-action@v3
with:
packages: scheme-basic
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-hub/rhub2/actions/rhub-checkout@v1
- uses: r-hub/rhub2/actions/rhub-setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/rhub2/actions/rhub-platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/rhub2/actions/rhub-setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
extra-packages: TreeDistData=?ignore-before-r=99.0.0
- uses: r-hub/rhub2/actions/rhub-run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}