@@ -41,42 +41,64 @@ jobs:
4141 - name : Set up Pandoc
4242 uses : r-lib/actions/setup-pandoc@v2
4343
44+ - name : Install system dependencies for GEOS, GDAL, PROJ
45+ run : |
46+ sudo apt-get update
47+ sudo apt-get install -y \
48+ libgeos-dev \
49+ libgdal-dev \
50+ libproj-dev
51+
52+ - name : Install GEOS, GDAL, PROJ on macOS
53+ if : matrix.config.os == 'macos-latest'
54+ run : |
55+ brew install geos gdal proj
56+ shell : bash
57+
58+ - name : Install GEOS, GDAL, PROJ on Ubuntu
59+ if : matrix.config.os == 'ubuntu-latest'
60+ run : |
61+ sudo apt-get update
62+ sudo apt-get install -y libgeos-dev libgdal-dev libproj-dev
63+ shell : bash
64+
65+ - name : Install GEOS, GDAL, PROJ on Windows
66+ if : matrix.config.os == 'windows-latest'
67+ run : |
68+ choco install geos gdal proj
69+ RefreshEnv
70+ shell: pwsh
71+
4472 - name : Set up R
4573 uses : r-lib/actions/setup-r@v2
4674 with :
4775 r-version : ${{ matrix.config.r }}
4876 http-user-agent : ${{ matrix.config.http-user-agent }}
4977 use-public-rspm : true
5078
51- - name : Ensure remotes is installed
52- run : Rscript -e 'if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")'
79+ - name : Install necessary packages
80+ run : |
81+ Rscript -e 'cat("\nlibrary path:\n");.libPaths(); sessionInfo(); cat("\n")'
82+ Rscript -e 'install.packages(c("rcmdcheck", "remotes", "Rcpp", "lubridate", "RcppArmadillo", "tidyverse", "terra", "sf", "coda", "foreach", "fs", "tibble", "dplyr", "future", "future.apply", "rlang", "DT", "kableExtra", "knitr", "httr", "foreign", "tidyselect", "purrr", "rvest", "stringr", "rmarkdown", "archive", "magrittr", "arrow", "caret", "colorRamps", "devtools", "doParallel", "ecospat", "fastmatch", "float", "furrr", "gdata", "ggbreak", "ggnewscale", "ggtext", "gridtext", "gt", "gtools", "janitor", "jsonify", "lobstr", "ncdf4", "pak", "pbapply", "png", "quarto", "R.utils", "RCurl", "Rfast", "rgbif", "RNetCDF", "scales", "rworldmap", "smoothr", "snow", "spelling", "testthat", "writexl", "pkgdown", "lintr", "sessioninfo", "cowplot", "ggpubr", "ggExtra", "zip", "tidyterra", "exactextractr", "blockCV", "renv"), Ncpus = parallel::detectCores())'
5383
54- - name : Force install ggplot2 3.5.2
55- run : Rscript -e 'remotes::install_version("ggplot2", version = "3.5.2")'
56-
57- - name : Force install scales 1.3.0
58- run : Rscript -e 'remotes::install_version("scales", version = "1.3.0")'
59-
60- - name : Force install pkgdown 2.0.7
61- run : Rscript -e 'remotes::install_version("pkgdown", version = "2.0.7")'
84+ - name : Install packages from github
85+ run : |
86+ Rscript -e 'remotes::install_github(c("elgabbas/ecokit", "hmsc-r/HMSC", "EmilHvitfeldt/paletteer", "YuLab-SMU/ggtree", "babaknaimi/sdm"))'
6287
63- - name : Install GEOS on macOS
64- if : matrix.config.os == 'macos-latest'
65- run : brew install geos
66- shell : bash
67-
68- - name : Install dependencies
69- uses : r-lib/actions/setup-r-dependencies@v2
70- with :
71- extra-packages : |
72- any::lintr
73- github::elgabbas/ecokit
74- github::hmsc-r/HMSC
75- local::.
76- needs : check
88+ - name : Install remaining dependencies
89+ run : |
90+ Rscript -e 'remotes::install_deps(dependencies=c("Depends", "Imports"), upgrade = "never")'
7791
78- - name : Check package
79- uses : r-lib/actions/check-r-package@v2
80- with :
81- upload-snapshots : true
82- build_args : ' c("--no-manual","--compact-vignettes=gs+qpdf")'
92+ # Run R CMD check (without relying on r-lib/actions)
93+ - name : Run R CMD check
94+ env :
95+ _R_CHECK_FORCE_SUGGESTS_ : false
96+ run : |
97+ Rscript -e 'renv::install("ggplot2@3.5.2")'
98+ Rscript -e 'packageVersion("ggplot2")'
99+ Rscript -e 'rcmdcheck::rcmdcheck(args="--no-manual", error_on="error")'
100+ # - name: Check package
101+ # uses: r-lib/actions/check-r-package@v2
102+ # with:
103+ # upload-snapshots: true
104+ # build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
0 commit comments