Skip to content

Commit a58e8eb

Browse files
committed
Merge branch 'main' into mac-deps
* main: Revert Windows pak adjustments; Add debug step (#305)
2 parents a4672eb + 5100318 commit a58e8eb

File tree

5 files changed

+30
-31
lines changed

5 files changed

+30
-31
lines changed

.github/internal/install-shinyverse/action.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ runs:
4848
http-user-agent: ${{ inputs.http-user-agent }}
4949
pandoc-version: ${{ inputs.pandoc-version }}
5050
extra-packages: ${{ inputs.extra-packages }}
51-
env:
52-
RSPM: ${{ if (runner.os == 'Linux') && }}
51+
pak-version: "devel"
5352

5453
# - name: Get packages for macOS system dependencies
5554
# if: runner.os == 'macOS'

.github/workflows/apps-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
value: "https://p3m.dev/cran/__linux__/noble/latest"
2929
cache-version:
3030
description: cache-version to be used when pulling library cache
31-
value: "8"
31+
value: "13"
3232
devel:
3333
description: Resolved r devel version
3434
# When R 4.3 was released, R version 4.4.0 was not recognized.

.github/workflows/apps-test-os.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ jobs:
198198
)
199199
shinycoreci::assert_test_output(test_output)
200200
201+
# > If the workflow run is a re-run, with debugging enabled, then it opens a tmate shell that you can ssh into for interactive debugging.
202+
- uses: r-hub/actions/debug-shell@v1
203+
if: always()
204+
with:
205+
connect-timeout-seconds: "300"
201206
- name: Remove R options file
202207
if: always()
203208
shell: bash

R/install-path.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on_ci <- function() {
77
#' @keywords internal
88
resolve_libpath <- function(..., local_pkgs = FALSE) {
99
stopifnot(length(list(...)) == 0)
10+
11+
# If running on CI, use the default libpath.
12+
# No need to keep a separate library for local testing
13+
if (on_ci()) {
14+
return(.libPaths()[1])
15+
}
16+
1017
# If using local_pkgs, use the standard libpath location
1118
libpath <- if (isTRUE(local_pkgs)) .libPaths()[1] else shinycoreci_libpath()
1219
libpath

R/install.R

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -231,41 +231,29 @@ install_pkgs_with_callr <- function(
231231
) {
232232
stopifnot(length(list(...)) == 0)
233233
callr::r(
234-
function(repos_option, packages, upgrade, dependencies, is_windows) {
234+
function(repos_option, packages, upgrade, dependencies) {
235235
options(repos = repos_option)
236236

237-
if (is_windows) {
238-
message(
239-
"Installing packages with install.packages(): ",
240-
paste0(packages, collapse = ", ")
241-
)
242-
# Throw if any installation produces a warning
243-
# Ex: In install.packages(packages) : installation of package 'terra' had non-zero exit status
244-
options(warn = 2)
245-
install.packages(packages)
246-
} else {
247-
# Performing a leap of faith that pak is installed.
248-
# Avoids weird installs when using pak to install shinycoreci
249-
stopifnot(utils::packageVersion("pak") >= "0.3.0")
250-
pak__pkg_install <- utils::getFromNamespace("pkg_install", "pak")
251-
message(
252-
"Installing packages with pak::pkg_install(): ",
253-
paste0(packages, collapse = ", ")
254-
)
255-
pak__pkg_install(
256-
packages,
257-
ask = FALSE, # Not interactive, so don't ask
258-
upgrade = upgrade,
259-
dependencies = dependencies
260-
)
261-
}
237+
# Performing a leap of faith that pak is installed.
238+
# Avoids weird installs when using pak to install shinycoreci
239+
stopifnot(utils::packageVersion("pak") >= "0.3.0")
240+
pak__pkg_install <- utils::getFromNamespace("pkg_install", "pak")
241+
message(
242+
"Installing packages with pak::pkg_install(): ",
243+
paste0(packages, collapse = ", ")
244+
)
245+
pak__pkg_install(
246+
packages,
247+
ask = FALSE, # Not interactive, so don't ask
248+
upgrade = upgrade,
249+
dependencies = dependencies
250+
)
262251
},
263252
list(
264253
repos_option = shinyverse_repos_option(),
265254
packages = packages,
266255
upgrade = upgrade,
267-
dependencies = dependencies,
268-
is_windows = is_windows()
256+
dependencies = dependencies
269257
),
270258
show = TRUE,
271259
libpath = libpath,

0 commit comments

Comments
 (0)