-
Notifications
You must be signed in to change notification settings - Fork 4
87 lines (76 loc) · 3.38 KB
/
r-cmd-check.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
name: R-CMD-check
on: [push, pull_request]
jobs:
check:
runs-on: ${{ matrix.config.os }}
timeout-minutes: 660
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-11, r: 'release', arch: 'arm64'}
steps:
- uses: actions/checkout@v4
- name: Cache LaTeX packages
uses: actions/cache@v4
with:
path: |
/usr/local/texlive
~/Library/TinyTeX
~/AppData/Roaming/TinyTeX
key: ${{ runner.os }}-texlive-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-texlive-
- name: Cache R
uses: actions/cache@v4
with:
path: |
${{ runner.tool_cache }}/R
key: ${{ runner.os }}-R-${{ matrix.config.r }}
- name: Set up R
uses: r-lib/actions/[email protected]
with:
r-version: ${{ matrix.config.r }}
continue-on-error: true
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev
sudo apt-get install -y libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev libfontconfig1-dev
sudo apt-get install -y libharfbuzz-dev libfribidi-dev
sudo apt-get install -y libcurl4-gnutls-dev default-jdk
sudo apt-get install -y libglpk-dev
sudo R CMD javareconf
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: Install Windows system dependencies
if: runner.os == 'Windows'
run: |
choco install miktex -y
echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -Append -FilePath $Env:GITHUB_PATH
& "C:\Program Files\MiKTeX\miktex\bin\x64\initexmf.exe" --update-fndb
- name: Install macOS system dependencies
if: runner.os == 'macOS'
run: |
brew install --cask basictex || (curl -L -o basictex.pkg "https://de.mirrors.cicku.me/ctan/systems/mac/mactex/BasicTeX.pkg" && sudo installer -pkg basictex.pkg -target /)
echo "/Library/TeX/texbin" >> $GITHUB_PATH
# sudo /Library/TeX/texbin/tlmgr update --self --all
# sudo /Library/TeX/texbin/tlmgr install collection-latex collection-latexrecommended collection-fontsrecommended
sudo /Library/TeX/texbin/tlmgr update --self
sudo /Library/TeX/texbin/tlmgr install inconsolata
# Install recommended fonts, including Helvetica
sudo /Library/TeX/texbin/tlmgr install collection-fontsrecommended
- name: Install rJava and other R dependencies
run: |
export _R_CHECK_FORCE_SUGGESTS_ = false
Rscript -e "install.packages('rJava')"
Rscript -e "install.packages('remotes')"
Rscript -e "remotes::install_cran(c('stringi', 'qdapRegex', 'readr', 'tokenizers', 'data.table', 'ggplot2', 'anytime', 'mgsub', 'stats', 'qdap', 'ggwordcloud', 'dplyr', 'ragg', 'checkmate', 'visNetwork', 'lubridate', 'methods', 'leaflet'))"
- name: Check
shell: bash
run: R CMD build . && R CMD check *tar.gz --as-cran