Skip to content

Update cran setup

Update cran setup #39

Workflow file for this run

on:
push:
branches:
- cran
name: cran_setup
jobs:
cran_setup:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: "release"
extra-repositories: "https://inla.r-inla-download.org/R/testing"
- uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- name: Install system dependencies
run: |
brew install --cask xquartz
brew install pkg-config
brew install proj@9
brew install gdal
brew install eigen
- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"all"'
extra-packages: |
pkgdown
rmarkdown
devtools
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Install package
run: R CMD INSTALL .
- name: Delete vignettes and pkgdown, then copy cran vign
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git rm -rf vignettes
rm -rf vignettes
mkdir vignettes
cd cran_vignettes
cp * ../vignettes
cd ..
git rm -rf cran_vignettes
git add vignettes
sed -i .bak 's/#devel\.tag/#stable\.tag/' R/inla_rspde.R
sed -i .bak '/donttest{ #devel version$/a\
#'\'' tryCatch({
' R/inla_rspde.R
sed -i .bak 's/donttest{ #devel version/donttest{ #tryCatch version/' R/inla_rspde.R
sed -i .bak '/#stable\.tag$/a\
#'\'' }, error = function(e){print("Could not run the example")})
' R/inla_rspde.R
sed -i .bak 's/#stable\.tag/#stable\.tryCatch/' R/inla_rspde.R
sed -i .bak 's/#devel\.tag/#stable\.tag/' R/inlabru_rspde.R
sed -i .bak '/donttest{ #devel version$/a\
#'\'' tryCatch({
' R/inlabru_rspde.R
sed -i .bak 's/donttest{ #devel version/donttest{ #tryCatch version/' R/inlabru_rspde.R
sed -i .bak '/#stable\.tag$/a\
#'\'' }, error = function(e){print("Could not run the example")})
' R/inlabru_rspde.R
sed -i .bak 's/#stable\.tag/#stable\.tryCatch/' R/inlabru_rspde.R
Rscript -e "devtools::document()"
git add man
git add .Rbuildignore
git add DESCRIPTION
git add R/inla_rspde.R
git add R/inlabru_rspde.R
git commit -m "Doing the setup"
git push
shell: bash