Skip to content

Commit 81ff211

Browse files
committed
Force installing ggplot2 version 3.5.2 to avoid CI errors
1 parent 16a9725 commit 81ff211

File tree

3 files changed

+57
-39
lines changed

3 files changed

+57
-39
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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")'

.github/workflows/lint.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,15 @@ jobs:
4242
with:
4343
use-public-rspm: true
4444

45-
- name: Print R library paths
46-
run: Rscript -e '.libPaths(); sessionInfo()'
47-
4845
- name: Install necessary packages
4946
run: |
47+
Rscript -e 'cat("\nlibrary path:\n");.libPaths(); sessionInfo(); cat("\n")'
5048
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())'
5149
5250
- name: Install packages from github
5351
run: |
5452
Rscript -e 'remotes::install_github(c("elgabbas/ecokit", "hmsc-r/HMSC", "EmilHvitfeldt/paletteer", "YuLab-SMU/ggtree", "babaknaimi/sdm"))'
5553
56-
# - name: Install some pinned package versions
57-
# run: |
58-
# Rscript -e 'renv::install(c("scales@1.3.0", "pkgdown@2.0.7", "lintr@3.0.0", "sessioninfo@1.2.2", "ggplot2@3.5.2", "cowplot@1.1.3", "ggpubr@0.6.0", "ggExtra@0.10.1"))'
59-
6054
- name: Install remaining dependencies
6155
run: |
6256
Rscript -e 'remotes::install_deps(dependencies=c("Depends", "Imports"), upgrade = "never")'
@@ -68,7 +62,7 @@ jobs:
6862
run: |
6963
Rscript -e 'renv::install("ggplot2@3.5.2")'
7064
Rscript -e 'packageVersion("ggplot2")'
71-
Rscript -e 'rcmdcheck::rcmdcheck(args="--no-manual", error_on="error")'
65+
# Rscript -e 'rcmdcheck::rcmdcheck(args="--no-manual", error_on="error")'
7266
7367
# - name: Install dependencies
7468
# uses: r-lib/actions/setup-r-dependencies@v2

.github/workflows/pkgdown.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151

5252
- name: Install necessary packages
5353
run: |
54+
Rscript -e 'cat("\nlibrary path:\n");.libPaths(); sessionInfo(); cat("\n")'
5455
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())'
5556
5657
- name: Install packages from github
@@ -61,13 +62,14 @@ jobs:
6162
# run: |
6263
# Rscript -e 'renv::install(c("scales@1.3.0", "pkgdown@2.0.7", "lintr@3.0.0", "sessioninfo@1.2.2", "ggplot2@3.5.2", "cowplot@1.1.3", "ggpubr@0.6.0", "ggExtra@0.10.1"))'
6364

64-
- name: Install remaining dependencies and Run R CMD check
65+
- name: Install remaining dependencies and the package itself
6566
env:
6667
_R_CHECK_FORCE_SUGGESTS_: false
6768
run: |
6869
Rscript -e 'remotes::install_deps(dependencies=c("Depends", "Imports"), upgrade = "never")'
6970
Rscript -e 'renv::install("ggplot2@3.5.2")'
70-
Rscript -e 'rcmdcheck::rcmdcheck(args="--no-manual", error_on="error")'
71+
# Rscript -e 'rcmdcheck::rcmdcheck(args="--no-manual", error_on="error")'
72+
Rscript -e 'remotes::install_local(".", upgrade = "never")'
7173
7274
- name: Build site
7375
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)

0 commit comments

Comments
 (0)