Skip to content

Add support for DelayedArray reading #266

Add support for DelayedArray reading

Add support for DelayedArray reading #266

# 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'