-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (74 loc) · 3.44 KB
/
R-CMD-check.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
# Generated by r6-generator-maven-plugin: remove this line if you want to make manual changes and dont want them to get overwritten
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
## uncomment this to run on a fixed schedule
# schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '0 12 * * *'
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
continue-on-error: false
name: ${{ matrix.config.os }} R:(${{ matrix.config.r }} Java:${{ matrix.config.java }})
# Windows R before 4.2.0 uses multiarch to check both i386 and x64 packages. This
# is a major problem for CI of rJava packages as both i386 and x64 Java distributions
# have to be installed and rJava installed supporting multiple architectures. This is
# avoidable using the --no-multiarch flag in R CMD install if CI is testing a rJava package
# however a transitive dependency on an in-development package specified as a Remote this flag is not propagated
# and the dependency package installation will fail.
# The only strategy to avoid this is to avoid CI on windows pre 4.2.0. In real life installation from source
# needs to be done with the --no-multiarch flag on windows in R versions prior to 4.2.0.
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release', java: 11, distribution: zulu}
- {os: macOS-latest, r: 'release', java: 11, distribution: zulu}
- {os: windows-latest, r: 'release', java: 11, distribution: zulu}
- {os: ubuntu-latest, r: 'oldrel-1', java: 8, distribution: zulu}
- {os: ubuntu-latest, r: 'release', java: 17, distribution: zulu}
- {os: ubuntu-latest, r: 'devel', java: 17, distribution: zulu, http-user-agent: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
if: "!contains(github.event.head_commit.message, 'minor')"
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.config.java }}
distribution: ${{ matrix.config.distribution }}
java-package: jdk
cache: 'maven'
- name: Info
run: "bash -c 'java -version && which java && echo $PATH && echo $JAVA_HOME'"
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 3
extra-packages: any::rcmdcheck
needs: check
- name: Setup R Java support
if: runner.os != 'Windows'
run: "echo export PATH=$PATH > reconf.sh; echo export JAVA_HOME=$JAVA_HOME >> reconf.sh; echo R CMD javareconf >> reconf.sh; sudo bash reconf.sh; rm reconf.sh;"
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--no-multiarch", "--as-cran")'
upload-snapshots: true
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.os }}-${{ matrix.config.r }}-${{ matrix.config.java }}-results
path: check