-
Notifications
You must be signed in to change notification settings - Fork 25
144 lines (117 loc) · 4.68 KB
/
r-ci.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
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
name: TileDB-SOMA R CI
on:
pull_request:
paths:
- '**'
- '!**.md'
- '!.github/**'
- '.github/workflows/r-ci.yml'
- '!.pre-commit-config.yaml'
- '!apis/python/**'
- '!docs/**'
- '!LICENSE'
push:
branches:
- main
- 'release-*'
workflow_dispatch:
env:
COVERAGE_FLAGS: "r"
COVERAGE_TOKEN: ${{ secrets.CODECOV_TOKEN }}
_R_CHECK_TESTS_NLINES_: 0
CATCHSEGV: "TRUE"
R_REMOTES_UPGRADE: "never"
TILEDB_SOMA_INIT_BUFFER_BYTES: 33554432 # accommodate tiny runners
jobs:
ci:
strategy:
fail-fast: false
matrix:
include:
- name: linux
os: ubuntu-latest
covr: 'no'
- name: macos
os: macOS-latest
covr: 'no'
- name: coverage
os: ubuntu-latest
covr: 'yes'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Show matrix OS
run: echo "matrix.os:" ${{ matrix.os }}
- name: Linux CPU info
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cat /proc/cpuinfo
- name: MacOS CPU info
if: ${{ matrix.os == 'macOS-latest' }}
run: sysctl -a | grep cpu
- name: Bootstrap
run: cd apis/r && tools/r-ci.sh bootstrap
- name: Install BioConductor package SingleCellExperiment
run: cd apis/r && tools/r-ci.sh install_bioc SingleCellExperiment
# Uncomment these next two stanzas as needed whenever we've just released a new tiledb-r for
# which source is available but CRAN releases (and hence update r2u binaries) are not yet:
#
# IMPORTANT: these two stanzas should remain uncommented _only_ during the propagation time
# between (a) publication of source for a new TileDB-R _upon which_ TileDB-SOMA depends in its
# apis/R/DESCRIPTION file and (b) appearance of binaries.
#
# Please see https://github.com/single-cell-data/TileDB-SOMA/wiki/Branches-and-releases which
# is crucial for anyone doing releases of TileDB-SOMA.
#
# Please edit both files in the same way:
# * r-ci.yml
# * r-python-interop-testing.yml
#
# Do not remove these comments until such time as we have eliminated our dependency on
# the TileDB-R package.
#- name: Install r-universe build of tiledb-r (macOS)
# if: ${{ matrix.os == 'macOS-latest' }}
# run: cd apis/r && Rscript -e "install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev', 'https://cloud.r-project.org'))"
#- name: Install r-universe build of tiledb-r (linux)
# if: ${{ matrix.os != 'macOS-latest' }}
# run: cd apis/r && Rscript -e "options(bspm.version.check=TRUE); install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev/bin/linux/jammy/4.3/', 'https://cloud.r-project.org'))"
- name: Dependencies
run: cd apis/r && Rscript -e "remotes::install_deps(dependencies = TRUE, upgrade = FALSE)"
# - name: Install dataset packages from source (macOS)
# if: ${{ matrix.os == 'macOS-latest' }}
# run: cd apis/r && _CI_PKG_TYPE_=both _CI_USE_BIOC_=true Rscript tools/install_missing_deps.R
# - name: CMake
# uses: lukka/get-cmake@latest
#- name: MkVars
# run: mkdir ~/.R && echo "CXX17FLAGS=-Wno-deprecated-declarations -Wno-deprecated" > ~/.R/Makevars
#- name: Build and install libtiledbsoma
# run: sudo scripts/bld --prefix=/usr/local
#- name: Call ldconfig
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: sudo ldconfig
#
# - name: Update Packages
# run: Rscript -e 'update.packages(ask=FALSE)'
- name: Build Package
run: cd apis/r && R CMD build --no-build-vignettes --no-manual .
- name: Install Package
run: cd apis/r && R CMD INSTALL $(ls -1tr *.tar.gz | tail -1)
# - name: Diagnostics
# run: Rscript -e 'print(Sys.info())'
# - name: Downgrade TileDB-R if needed
# run: cd apis/r && Rscript tools/controlled_downgrade.R
#- name: Test
# if: ${{ matrix.covr == 'no' }}
# run: |
# cd apis/r
# Rscript -e "install.packages('devtools')" \
# -e "devtools::install(upgrade = FALSE)" \
# -e "testthat::test_local('tests/testthat', load_package = 'installed')"
- name: Test
if: ${{ matrix.covr == 'no' }}
run: cd apis/r/tests && Rscript testthat.R
- name: Coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.covr == 'yes' && github.event_name == 'workflow_dispatch' }}
run: apis/r/tools/r-ci.sh coverage
- name: View Logs
run: apis/r/tools/r-ci.sh dump_logs
if: failure()