Skip to content

Commit 511dc4a

Browse files
committed
Add r-hub-ci workflow
1 parent f542080 commit 511dc4a

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

.github/workflows/rhub-ci.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: rhub-ci.yaml
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions: read-all
10+
11+
jobs:
12+
13+
setup:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
containers: ${{ steps.rhub-setup.outputs.containers }}
17+
platforms: ${{ steps.rhub-setup.outputs.platforms }}
18+
19+
steps:
20+
# NO NEED TO CHECKOUT HERE
21+
- uses: r-hub/actions/setup@main
22+
with:
23+
config: clang-asan,clang-ubsan,rchk,valgrind
24+
id: rhub-setup
25+
26+
linux-containers:
27+
needs: setup
28+
if: ${{ needs.setup.outputs.containers != '[]' }}
29+
runs-on: ubuntu-latest
30+
name: ${{ matrix.config.label }}
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
config: ${{ fromJson(needs.setup.outputs.containers) }}
35+
container:
36+
image: ${{ matrix.config.container }}
37+
38+
steps:
39+
- uses: r-hub/actions/checkout@main
40+
- uses: r-hub/actions/platform-info@main
41+
with:
42+
token: ${{ secrets.RHUB_TOKEN }}
43+
job-config: ${{ matrix.config.job-config }}
44+
- uses: r-hub/actions/setup-deps@main
45+
with:
46+
token: ${{ secrets.RHUB_TOKEN }}
47+
job-config: ${{ matrix.config.job-config }}
48+
- uses: r-hub/actions/run-check@main
49+
with:
50+
token: ${{ secrets.RHUB_TOKEN }}
51+
job-config: ${{ matrix.config.job-config }}
52+
53+
other-platforms:
54+
needs: setup
55+
if: ${{ needs.setup.outputs.platforms != '[]' }}
56+
runs-on: ${{ matrix.config.os }}
57+
name: ${{ matrix.config.label }}
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
config: ${{ fromJson(needs.setup.outputs.platforms) }}
62+
63+
steps:
64+
- uses: r-hub/actions/checkout@main
65+
- uses: r-hub/actions/setup-r@main
66+
with:
67+
job-config: ${{ matrix.config.job-config }}
68+
token: ${{ secrets.RHUB_TOKEN }}
69+
- uses: r-hub/actions/platform-info@main
70+
with:
71+
token: ${{ secrets.RHUB_TOKEN }}
72+
job-config: ${{ matrix.config.job-config }}
73+
- uses: r-hub/actions/setup-deps@main
74+
with:
75+
job-config: ${{ matrix.config.job-config }}
76+
token: ${{ secrets.RHUB_TOKEN }}
77+
- uses: r-hub/actions/run-check@main
78+
with:
79+
job-config: ${{ matrix.config.job-config }}
80+
token: ${{ secrets.RHUB_TOKEN }}

0 commit comments

Comments
 (0)