-
Notifications
You must be signed in to change notification settings - Fork 6
executable file
·109 lines (104 loc) · 4.61 KB
/
r.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
r-version: ['4.4.1']
config:
- {os: windows-latest, r: 'release', windows_32_or_64: '64'}
- {os: macOS-latest, r: 'release',}
- {os: ubuntu-24.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
env:
RGL_USE_NULL: true
steps:
- uses: actions/checkout@v3
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install Dependencies (Windows)
if: matrix.config.os == 'windows-latest'
run: choco install pandoc texlive
- name: Install Dependencies (Linux)
if: matrix.config.os == 'ubuntu-24.04'
run: sudo apt-get install pandoc libcurl4-openssl-dev libudunits2-dev libgdal-dev texlive-latex-base libfontconfig1-dev
- name: Install Dependencies (macOS)
if: matrix.config.os == 'macOS-latest'
run: brew install pandoc udunits gdal
- name: Install R dependencies (macOs)
if: matrix.config.os == 'macOS-latest'
run: |
install.packages(c("remotes", "rcmdcheck", "plotly", "SEAHORS"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Install R dependencies (windows, R '4.4.1')
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.r-version == '4.4.1') }}
run: |
install.packages(c("rlang", "remotes", "rcmdcheck", "sf", "Morpho", "stringi", "rgl"), INSTALL_opts = c("--no-multiarch"))
install.packages(c("xfun", "stringi"), type="binary", INSTALL_opts = c("--no-multiarch"))
remotes::install_github("dmurdoch/rgl", INSTALL_opts = c("--no-multiarch"))
remotes::install_deps(dependencies = TRUE, INSTALL_opts = c("--no-multiarch"))
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
shell: Rscript {0}
- name: Install R dependencies (windows, R '3.6.3')
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.r-version == '3.6.3') }}
run: |
install.packages(c("remotes", "rcmdcheck", "sf", "purrr", "Morpho", "plyr", "tidyr", "plotly", "testthat", "shiny", "cxhull"), INSTALL_opts = c("--no-multiarch"))
install.packages(c("rlang", "Rcpp", "htmltools", "digest", "cxhull"), type="binary", INSTALL_opts = c("--no-multiarch"))
remotes::install_github("dmurdoch/rgl")
remotes::install_deps(dependencies = TRUE)
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
shell: Rscript {0}
- name: Install R dependencies (Ubuntu)
if: matrix.config.os == 'ubuntu-24.04'
run: |
install.packages(c("remotes", "curl", "pkgbuild", "rcmdcheck", "purrr", "sf", "Morpho", "cxhull", "Rvcg", "SEAHORS", "svglite", "knitr", "systemfonts"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
- name: Test coverage
if: ${{ (failure()) && ( matrix.config.os == 'ubuntu-24.04' ) }}
run: covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "archeoViz")
)
shell: Rscript {0}
- name: Show testthat output
if: ${{ (always()) && ( matrix.config.os == 'ubuntu-24.04' ) }}
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/archeoViz -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload test results
if: ${{ (failure()) && ( matrix.config.os == 'ubuntu-24.04' ) }}
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/archeoViz