-
Notifications
You must be signed in to change notification settings - Fork 9
96 lines (79 loc) · 2.95 KB
/
check-extra.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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }}-${{ matrix.config.arch }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'devel', arch: 'base', http-user-agent: 'release', rtools: ''}
# R-4.0.0 uses Rtools40 (based on msys2).
- {os: windows-latest, r: '4.0.0', arch: '64', rtools: '40'}
- {os: windows-latest, r: '4.0.0', arch: '32', rtools: '40'}
# R>=4.2 uses Rtools42 or later (based on MXE, 64-bit only).
- {os: windows-latest, r: '4.2.0', arch: 'base', rtools: '42'}
- {os: ubuntu-latest, r: '3.0.0', arch: 'base'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Configure git
run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- name: Install macOS dependencies
if: runner.os == 'macOS'
run : |
brew install automake netcdf udunits
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get install -y libnetcdf-dev libudunits2-dev
- name: Install Windows RTools40 dependencies
if: runner.os == 'Windows' && matrix.config.rtools == '40'
run: |
pacman -Sy
if test "${{ matrix.config.arch }}" = 32 ; then
arch=i686
else
arch=x86_64
fi
pacman -S --noconfirm mingw-w64-${arch}-{netcdf,udunits}
shell: sh
# Avoid R package dependencies by using a simple test script:
- name: Check RNetCDF
env:
_R_CHECK_FORCE_SUGGESTS_: false
run: |
echo ::group::Build RNetCDF
R CMD build .
echo ::endgroup::
echo ::group::Check RNetCDF
if test "${{ matrix.config.arch }}" != "base" ; then
R --arch "${{ matrix.config.arch }}" CMD check --no-manual RNetCDF_*.*-*.tar.gz
else
R CMD check --no-manual RNetCDF_*.*-*.tar.gz
fi
echo ::endgroup::
shell: sh
- name: Upload check directory
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.os }}_r-${{ matrix.config.r }}-${{ matrix.config.arch }}_check
path: RNetCDF.Rcheck/
retention-days: 5