-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (145 loc) · 6.48 KB
/
Copy pathR-CMD-check.yaml
File metadata and controls
171 lines (145 loc) · 6.48 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "1 7 11 * *"
name: OS-check
jobs:
OS-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- { os: macOS-latest, r: 'devel'}
- { os: macOS-latest, r: 'release'}
- { os: windows-latest, r: 'release'}
- { os: ubuntu-latest, r: 'devel'}
- { os: ubuntu-latest, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_TOKEN: ${{ secrets.GHTOKEN2 }}
GITHUB_PAT: ${{ secrets.GHTOKEN2 }}
steps:
- uses: actions/checkout@v2
## R is already included in the Bioconductor docker images
- name: Setup R from r-lib
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
## pandoc is already included in the Bioconductor docker images
- name: Setup pandoc from r-lib
uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps("Intro_To_Python/",dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
remotes::install_cran("BiocManager")
remotes::install_cran("devtools")
shell: Rscript {0}
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- name: Cache R packages
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-
- name: Cache R packages on Linux
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/Library
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu-22.04", package=unlist(strsplit(read.dcf("ATACCutRunChIP/DESCRIPTION")[,"Depends"],", |\n")))), collapse = " "))')
echo $sysreqs
sudo -s eval "$sysreqs"
sudo apt -y install libfontconfig1-dev
sudo apt-get install libharfbuzz-dev libfribidi-dev
sudo apt-get install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
- name: Install macOS system dependencies
if: matrix.config.os == 'macOS-latest'
run: |
## Enable installing XML from source if needed
brew install libxml2
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
## Required to install magick as noted at
## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
brew install imagemagick@6
## For textshaping, required by ragg, and required by pkgdown
brew install harfbuzz fribidi
## For installing usethis's dependency gert
brew install libgit2
- name: Install Windows system dependencies
if: runner.os == 'Windows'
run: |
## Edit below if you have any Windows system dependencies
shell: Rscript {0}
- name: Install dependencies 1
run: |
remotes::install_deps("Intro_To_Python/",dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("BiocManager", force = TRUE)
shell: Rscript {0}
- name: Install dependencies 2
if: matrix.config.r == 'devel'
run: |
BiocManager::install(version = "devel", ask=F)
BiocManager::install("rmarkdown", version = "devel")
BiocManager::install("devtools", version = "devel")
BiocManager::install("RockefellerUniversity/compileCourses",subdir="compileCourses", version = "devel")
shell: Rscript {0}
- name: Install dependencies 3
if: matrix.config.r != 'devel'
run: |
BiocManager::install("rmarkdown")
BiocManager::install("devtools")
BiocManager::install("RockefellerUniversity/compileCourses",subdir="compileCourses")
shell: Rscript {0}
- name: Cache R packages
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-
- name: Install System Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y glpk-utils
sudo apt-get install -y libcurl4-openssl-dev
shell: bash {0}
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Install package
if: github.ref == 'refs/heads/master'
run: |
devtools::install("Intro_To_Python/",dependencies = TRUE,quick = TRUE)
shell: Rscript {0}
- name: CompileCourse
run: |
require(compileCourses)
compileCourses::compileSingleCourseMaterial(repo="RockefellerUniversity",subdir="Intro_To_Python",branch="master")
shell: Rscript {0}