Skip to content

Fixing old numpy does not pow issue (use power instead) #58

Fixing old numpy does not pow issue (use power instead)

Fixing old numpy does not pow issue (use power instead) #58

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::rpymat, any::reticulate
needs: check
- name: Get conda path
id: get-conda-path
run: |
path <- rpymat:::install_root()
cat(sprintf("path=%s\n", path), file = Sys.getenv("GITHUB_OUTPUT"))
shell: Rscript {0}
- name: Get conda cache key
id: get-conda-cache-key
run: |
echo key=1 >> $GITHUB_OUTPUT
- name: Restore ANTsPy
id: restore-conda-cache
uses: actions/cache@v3
with:
path: |
${{ steps.get-conda-path.outputs.path }}
key: ${{ runner.os }}-conda-${{ steps.get-conda-cache-key.outputs.key }}
restore-keys: |
${{ runner.os }}-conda-
- name: Install ANTsPy
run: |
python_ver <- "3.9"
verbose <- TRUE
# Install conda and create a conda environment
if(!dir.exists(rpymat::env_path())) {
standalone <- !file.exists(rpymat::conda_bin())
rpymat::configure_conda(python_ver = python_ver, force = TRUE, standalone = standalone)
}
rpymat::ensure_rpymat(verbose = verbose)
installed_pkgs_tbl <- rpymat::list_pkgs()
# install necessary libraries
pkgs <- c("h5py", "numpy", "scipy", "pandas", "cython")
if(!all(pkgs %in% installed_pkgs_tbl$package)) {
rpymat::add_packages(pkgs)
}
# install antspyx family
if(!"antspyx" %in% installed_pkgs_tbl$package) {
rpymat::add_packages(packages = "antspyx", pip = TRUE)
}
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true