-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (62 loc) · 2.46 KB
/
check-releasebranch.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
# 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:
name: releasebranch_8_4-ubuntu
permissions: read-all
jobs:
R-CMD-check-releasebranch:
runs-on: ubuntu-latest
strategy:
matrix:
container: [
"osgeo/grass-gis:releasebranch_8_4-ubuntu",
"osgeo/grass-gis:main-ubuntu"
]
container:
image: ${{ matrix.container }}
options: --privileged
steps:
- uses: actions/checkout@v4
- name: Install system deps
run: |
apt-get update
apt-get install -y \
libudunits2-dev \
libharfbuzz-dev \
libfribidi-dev \
gdal-bin \
libmysqlclient-dev \
libfontconfig1-dev \
qpdf \
pandoc \
pandoc-citeproc
- name: Install R
run: |
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
echo "deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" | tee -a /etc/apt/sources.list
apt-get update
apt-get install -y r-base-dev
- name: Configure RSPM in .Renviron
run: |
echo 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"))' >> ~/.Rprofile
echo 'options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"])))' >> ~/.Rprofile
echo 'options(Ncpus=parallel::detectCores())' >> ~/.Rprofile
- name: Install R dependencies
run: |
R -e "install.packages(c('remotes', 'rcmdcheck'))"
R -e "remotes::install_deps(dependencies = TRUE)"
R -e "install.packages('terra', repos = 'https://cloud.r-project.org/', type = 'source')"
- name: Download test dataset
run: |
wget https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.zip -O /tmp/nc_basic_spm_grass7.zip
unzip /tmp/nc_basic_spm_grass7.zip -d /tmp/grassdb
rm /tmp/nc_basic_spm_grass7.zip
# - name: Run R CMD check
# run: |
# R -e "rcmdcheck::rcmdcheck(args = c('--no-manual', '--no-build-vignettes'), error_on = 'error', check_dir = 'check')"
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true