Skip to content

Commit e6253e4

Browse files
Merge pull request #2 from TanguyBarthelemy/RCMD-check-invalid-file
Rcmd check invalid file
2 parents 9322ec6 + 472102f commit e6253e4

1 file changed

Lines changed: 35 additions & 72 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 35 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -7,100 +7,63 @@ on:
77
branches:
88
- develop
99
- master
10+
workflow_dispatch:
1011

1112
name: R-CMD-check
1213

1314
jobs:
1415
R-CMD-check:
1516
runs-on: ${{ matrix.config.os }}
1617

17-
name: ${{ matrix.config.os-name }}, R ${{ matrix.config.r }}, Java ${{ matrix.config.java }}
18+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
1819

1920
strategy:
2021
fail-fast: false
2122
matrix:
2223
config:
23-
- {os: windows-latest, r: 'release', java: 12, os-name: windows}
24-
- {os: windows-latest, r: 'devel', java: 12, os-name: windows}
25-
#- {os: windows-latest, r: 'oldrel', java: 12, os-name: windows}
26-
- {os: macOS-latest, r: 'release', java: 13, os-name: macos}
27-
- {os: macOS-latest, r: 'devel', java: 17, os-name: macos}
28-
#- {os: macOS-latest, r: 'oldrel', java: 12, os-name: macos}
29-
- {os: windows-latest, r: 'devel', java: 17, os-name: windows}
30-
#- {os: ubuntu-20.04, r: 'release', java: 12,os-name: ubuntu}
31-
#- {os: ubuntu-20.04, r: 'devel', java: 12,os-name: ubuntu}
32-
#- {os: ubuntu-20.04, r: 'release', java: 16,os-name: ubuntu}
24+
- {os: macos-latest, r: 'release'}
25+
- {os: macos-latest, r: 'oldrel-1'}
26+
- {os: macos-latest, r: 'oldrel-2'}
3327

34-
steps:
35-
- uses: actions/checkout@v2
36-
37-
- uses: actions/setup-java@v4
38-
with:
39-
distribution: 'zulu'
40-
java-version: ${{ matrix.config.java }}
28+
- {os: windows-latest, r: 'devel', http-user-agent: 'release'}
29+
- {os: windows-latest, r: 'release'}
30+
- {os: windows-latest, r: 'oldrel-1'}
31+
- {os: windows-latest, r: 'oldrel-2'}
4132

42-
- uses: r-lib/actions/setup-r@v2
43-
with:
44-
r-version: ${{ matrix.config.r }}
33+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
34+
- {os: ubuntu-latest, r: 'release'}
35+
- {os: ubuntu-latest, r: 'oldrel-1'}
36+
- {os: ubuntu-latest, r: 'oldrel-2'}
37+
- {os: ubuntu-latest, r: 'oldrel-3'}
4538

46-
- name: Info
47-
run: "bash -c 'java -version && which java && echo $PATH && echo $JAVA_HOME'"
39+
env:
40+
R_KEEP_PKG_SOURCE: yes
4841

49-
- name: Setup R Java support
50-
if: runner.os != 'Windows'
51-
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"
42+
steps:
5243

53-
- name: print effective R version
54-
run: version
55-
shell: Rscript {0}
44+
- uses: actions/checkout@v4
5645

5746
- uses: r-lib/actions/setup-pandoc@v2
5847

59-
- name: Query dependencies
60-
run: |
61-
install.packages('remotes')
62-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
63-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
64-
shell: Rscript {0}
65-
66-
- name: Restore R package cache
67-
uses: actions/cache@v4
48+
- uses: actions/setup-java@v4
6849
with:
69-
path: ${{ env.R_LIBS_USER }}
70-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
71-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
72-
73-
- name: Install system dependencies
74-
if: runner.os == 'Linux'
75-
run: |
76-
while read -r cmd
77-
do
78-
eval sudo $cmd
79-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
80-
81-
- name: Install system dependencies
82-
if: runner.os == 'macOS'
83-
run: |
84-
brew unlink gettext && brew link --force gettext
85-
find /usr -name libintl* -print 2>/dev/null
50+
distribution: 'zulu' # See 'Supported distributions' for available options
51+
java-version: '17'
8652

87-
- uses: r-lib/actions/setup-r-dependencies@v2
88-
with:
89-
extra-packages: any::rcmdcheck
90-
needs: check
53+
- uses: r-lib/actions/setup-r@v2
54+
with:
55+
r-version: ${{ matrix.config.r }}
56+
http-user-agent: ${{ matrix.config.http-user-agent }}
57+
use-public-rspm: true
9158

92-
- name: Check
93-
env:
94-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
95-
run: |
96-
options(crayon.enabled = TRUE)
97-
pkgbuild::check_build_tools(debug = TRUE)
98-
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-multiarch", "--run-donttest"), error_on = "warning", check_dir = "check")
99-
shell: Rscript {0}
59+
- uses: r-lib/actions/setup-r-dependencies@v2
60+
with:
61+
extra-packages: any::rcmdcheck
62+
needs: check
10063

101-
- name: Upload check results
102-
if: failure()
103-
uses: actions/upload-artifact@main
64+
- uses: r-lib/actions/check-r-package@v2
10465
with:
105-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
106-
path: check
66+
upload-snapshots: true
67+
upload-results: true
68+
args: 'c("--no-manual", "--as-cran", "--no-multiarch", "--run-donttest")'
69+
error-on: '"warning"'

0 commit comments

Comments
 (0)