-
-
Notifications
You must be signed in to change notification settings - Fork 19
135 lines (114 loc) · 4.88 KB
/
R-CMD-check-bioc.yaml
File metadata and controls
135 lines (114 loc) · 4.88 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
# Based on workflows from https://github.com/Huber-group-EMBL/rhdf5
# Uses steps from https://github.com/grimbough/bioc-actions
on:
push:
branches:
- devel
pull_request:
name: R-CMD-check-bioc
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
jobs:
R-CMD-check-bioc:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.bioc-version }})
strategy:
fail-fast: false
matrix:
config:
- { os: windows-latest, bioc-version: 'devel', bioc-mirror: 'https://bioconductor.posit.co/', cache: 1 }
- { os: macOS-latest, bioc-version: 'devel', bioc-mirror: 'https://bioconductor.posit.co/', cache: 1 }
- { os: macOS-15-intel, bioc-version: 'devel', bioc-mirror: 'https://bioconductor.posit.co/', cache: 2 }
- { os: ubuntu-latest, bioc-version: 'devel', bioc-mirror: 'https://bioconductor.posit.co/', cache: 1 }
- { os: ubuntu-latest, bioc-version: 'release', bioc-mirror: 'https://bioconductor.posit.co/', cache: 1 }
steps:
## R CMD check complains about Windows line endings without this
- name: Configure git
run: |
git config --global core.autocrlf false
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install hdf5-tools libsz2 libaec-dev
## Install missing libraries for macOS ARM (macOS-latest)
- name: Install macOS dependencies
if: matrix.config.os == 'macOS-latest'
run: |
brew install gettext openssl
mkdir -p ~/.R
echo "CPPFLAGS += -I$(brew --prefix gettext)/include -I$(brew --prefix openssl)/include" >> ~/.R/Makevars
echo "LDFLAGS += -L$(brew --prefix gettext)/lib -L$(brew --prefix openssl)/lib" >> ~/.R/Makevars
- name: Setup R and Bioconductor
uses: rcannood/bioc-actions/setup-bioc@remove-version-map
with:
bioc-version: ${{ matrix.config.bioc-version }}
bioc-mirror: ${{ matrix.config.bioc-mirror }}
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: ${{ matrix.config.cache }}
extra-packages: any::rcmdcheck
needs: check
## Workaround: llvmlite has no pre-built pip wheel on macOS x86_64,
## but conda-forge does have a build. Use reticulate + conda to install.
## See https://github.com/numba/numba/issues/10187#issuecomment-3800638403
- name: Cache conda packages (macOS Intel)
if: matrix.config.os == 'macOS-15-intel'
uses: actions/cache@v5
with:
path: ~/.local/share/r-miniconda
key: ${{ runner.os }}-conda-${{ hashFiles('DESCRIPTION') }}
restore-keys: |
${{ runner.os }}-conda-
- name: Install Python packages via conda (macOS Intel)
id: install-conda
if: matrix.config.os == 'macOS-15-intel'
shell: Rscript {0}
run: |
reticulate::install_miniconda()
reticulate::py_install(
c("scanpy", "mudata"),
method = "conda",
channel = "conda-forge"
)
# need to store this in Renviron because there's no easy way of
# passing env vars to bioc-actions/build-install-check
writeLines(
paste0("RETICULATE_PYTHON=", reticulate::conda_python("r-reticulate")),
"~/.Renviron"
)
- name: Verify conda installation (macOS Intel)
if: matrix.config.os == 'macOS-15-intel'
shell: Rscript {0}
run: |
stopifnot(reticulate::py_module_available("scanpy"))
stopifnot(reticulate::py_module_available("mudata"))
cat("Python packages verified successfully\n")
- name: Bioc - Build, Install, Check
id: bioc-check
uses: grimbough/bioc-actions/build-install-check@v1
- name: Show testthat output
if: always()
run: find .. -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure() && steps.bioc-check.outputs.check-dir != ''
uses: actions/upload-artifact@v7
with:
name: ${{ format('{0}-{1}-bioc-{2}-results', runner.os, runner.arch, env.R_BIOC_VERSION) }}
path: ${{ steps.bioc-check.outputs.check-dir }}
- name: Run BiocCheck
if: matrix.config.os == 'ubuntu-latest' && matrix.config.bioc-version == 'devel'
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
error-on: 'never'
arguments: '--no-check-bioc-help'