Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install things as necessary from shinycoreci r-universe #260

Merged
merged 75 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
74ab363
First pass at installing less things and install apps deps on demand …
schloerke Mar 12, 2024
1ea2d11
Code feedback
schloerke Mar 12, 2024
7509a52
checks
schloerke Mar 12, 2024
b58c1f2
Use `resolve_libpath(local_pkgs=)` for clearer intent
schloerke Mar 12, 2024
f430f2c
Use `actions/checkout@v4`, not `@v3`
schloerke Mar 12, 2024
35f3822
Remove install step
schloerke Mar 12, 2024
c055d24
Restructure matrix to be a shotgun
schloerke Mar 12, 2024
d7b613a
Remove slack integration
schloerke Mar 12, 2024
700ec5d
fix snaps
schloerke Mar 13, 2024
0436cf8
Fix readme
schloerke Mar 13, 2024
642c336
Add app to proove that pkgs are installed
schloerke Mar 13, 2024
38dc962
Add `attempt_to_install_universe()` method
schloerke Mar 13, 2024
582c8ae
Use new shinyverse install method
schloerke Mar 13, 2024
ba35e56
Generate apps deps (GitHub Actions)
schloerke Mar 13, 2024
4487d9b
Fix broken test
schloerke Mar 14, 2024
25c8744
fix snaps
schloerke Mar 14, 2024
c89ecda
Update step dep to remove node16 warning
schloerke Mar 14, 2024
1703e7a
Remove `gha-adjust-packages-to-install.R` script
schloerke Mar 14, 2024
a972c29
Update apps-test-os.yml
schloerke Mar 14, 2024
63a6511
Suppress output when installing first time in test_in_local
schloerke Mar 14, 2024
be8fb26
Diagnostics
schloerke Mar 14, 2024
10f6fa5
Try custom installation of shinyverse
schloerke Mar 14, 2024
6ba6fef
Generate apps deps (GitHub Actions)
schloerke Mar 14, 2024
52e9bae
Make the shinyverse the first cran repo. Add rspm afterwards
schloerke Mar 14, 2024
e7f5d7a
Merge branch 'install_all_the_things' of https://github.com/rstudio/s…
schloerke Mar 14, 2024
7888dc6
Update action.yaml
schloerke Mar 14, 2024
a39b86c
Update action.yaml
schloerke Mar 14, 2024
767786b
Do not install to new lib on CI; Avoid full double installation of co…
schloerke Mar 14, 2024
47c8ca1
Remove unused files
schloerke Mar 14, 2024
2a7f84c
Fix typo
schloerke Mar 14, 2024
dcb1dd4
Get info from r-universe directly
schloerke Mar 14, 2024
34ef83b
Generate apps deps (GitHub Actions)
schloerke Mar 14, 2024
40474b1
Bump version
schloerke Mar 14, 2024
c7b8dc7
`devtools::build_readme()` (GitHub Actions)
schloerke Mar 14, 2024
7f3a76e
Try forcing an upgrade to install the pkgs
schloerke Mar 14, 2024
e4e2c34
Try installing the shinyverse from source at start
schloerke Mar 14, 2024
ec4d0f9
On ci, store packages in side lib
schloerke Mar 14, 2024
885a62b
Install proper rtools version
schloerke Mar 14, 2024
d19b0c8
Use helper method to find shinyverse recursive deps (e.g. `httpuv`) w…
schloerke Mar 14, 2024
7fe88c0
Install shinycoreci R package from RSPM; Let shinycoreci handle shiny…
schloerke Mar 14, 2024
e9401a5
Update action.yaml
schloerke Mar 14, 2024
d2e23dc
Remove CI test
schloerke Mar 14, 2024
be655aa
Remove check warning
schloerke Mar 14, 2024
799a6d7
Merge branch 'main' into install_all_the_things
schloerke Mar 14, 2024
fe58f92
Generate apps deps (GitHub Actions)
schloerke Mar 14, 2024
6c0b79a
Touch >=10 apps so many apps are tested
schloerke Mar 15, 2024
c9e10a3
Merge branch 'install_all_the_things' of https://github.com/rstudio/s…
schloerke Mar 15, 2024
1dfbca3
Generate apps deps (GitHub Actions)
schloerke Mar 15, 2024
f5ef9f9
Try to inspect more of the shiny packages when installing. Make sure …
schloerke Mar 15, 2024
1b76fba
Sort order the shinyverse
schloerke Mar 15, 2024
42db712
Try installing mac sys deps before installing R
schloerke Mar 15, 2024
adceeb4
Add shinycoreci to the mix of packages to be installed; e.g. 316 need…
schloerke Mar 15, 2024
a005a00
Update action.yaml
schloerke Mar 15, 2024
1456238
Update action.yaml
schloerke Mar 15, 2024
e996e77
Update action.yaml
schloerke Mar 15, 2024
c6a4961
Remove macos brew installs for now
schloerke Mar 15, 2024
8557cf2
Reduce install timeout
schloerke Mar 15, 2024
49c2b03
Make withr an Import
schloerke Mar 15, 2024
2e77a06
Only install shinycoreci if the libpath is shinycoreci_libpath
schloerke Mar 15, 2024
6d6c703
Update DESCRIPTION
schloerke Mar 15, 2024
4a29501
Merge branch 'main' into install_all_the_things
cpsievert Apr 1, 2024
847be9b
Generate apps deps (GitHub Actions)
cpsievert Apr 1, 2024
2725925
Undo changes to snapshots (they're just for experimenting)
cpsievert Apr 1, 2024
ab4b3a3
Remove rtools version for windows. Let shiny-workflows handle it
schloerke Apr 1, 2024
572d7b4
Use `3.x` for pandoc version; (Upgrading from 2.7.3)
schloerke Apr 1, 2024
2a3f873
match padoc-version for install to 3.x
schloerke Apr 1, 2024
d4b3228
Merge branch 'main' into install_all_the_things
cpsievert May 17, 2024
05eda24
Apply suggestions from code review
cpsievert May 17, 2024
d4ec97c
`devtools::build_readme()` (GitHub Actions)
cpsievert May 17, 2024
0e47d2c
Apply suggestions from code review
cpsievert May 17, 2024
68d6f4c
Use regular installation methods
cpsievert May 17, 2024
f32501a
Apply suggestions from code review
schloerke May 17, 2024
fdefb69
`devtools::document()` (GitHub Actions)
schloerke May 17, 2024
c396ae1
`devtools::build_readme()` (GitHub Actions)
schloerke May 17, 2024
ab9c589
Missed one
cpsievert May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
^todo\.md$

^inst/apps/.*/tests/.*
^inst/apps/\.renvignore$
\.jshintrc$
www/nvd3/deprecated
^_pkgdown\.yml$
Expand Down
Empty file removed .Rprofile
Empty file.
46 changes: 2 additions & 44 deletions .github/internal/install-shinyverse/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inputs:
required: false
pandoc-version:
description: Pandoc version to pass through
default: "2.7.3"
default: "3.x"
required: false
runs:
using: "composite"
Expand All @@ -40,54 +40,12 @@ runs:
sudo apt-get update
sudo apt-get install -y libglpk-dev

- name: Gather remotes and app deps
id: shinyverse
shell: Rscript {0}
run: |
source("inst/gha/gha-shinyverse-packages.R")
pkgs <- shinyverse_pkgs()
message("Shinyverse packages:\n", gsub(",", ",\n", pkgs))
cat("packages=", pkgs, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)

- name: Rtools version
if: runner.os == 'Windows'
id: rtools-version
shell: Rscript {0}
run: |
# Get R version like `"4.2"`
short_r_version <- sub("\\.\\d$", "", "${{ inputs.r-version }}")
# For R versions >= 4.2, use Rtools v42
# Otherwise leave blank
if (
package_version("${{ inputs.r-version }}") >= package_version("4.2")
) {
message("Using Rtools v42")
cat("value=42\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
} else {
message("Not setting Rtools version!")
}

- name: Adjust packages to install
id: pkgs
shell: Rscript {0}
run: |
source("inst/gha/gha-adjust-packages-to-install.R")
pkgs_to_install <- adjust_pkgs(
"${{ steps.shinyverse.outputs.packages }}",
r_version = "${{ inputs.r-version }}"
)
message("Final packages:\n", gsub(",", ",\n", pkgs_to_install))
cat("to-install=", pkgs_to_install, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)

- name: Install R, shinycoreci, and shinyverse
- name: Install R and shinycoreci
uses: rstudio/shiny-workflows/setup-r-package@v1
with:
r-version: ${{ inputs.r-version }}
cache-version: ${{ inputs.cache-version }}
http-user-agent: ${{ inputs.http-user-agent }}
pandoc-version: ${{ inputs.pandoc-version }}
rtools-version: ${{ steps.rtools-version.outputs.value }}
extra-packages:
local::.
${{ steps.pkgs.outputs.to-install }}
${{ inputs.extra-packages }}
9 changes: 4 additions & 5 deletions .github/shiny-workflows/package-install.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

if (!requireNamespace("digest", quietly = TRUE)) {
# Need for url remotes. See https://github.com/r-lib/actions/issues/562#issuecomment-1129088041
install.packages("digest", repos = "http://cran.us.r-project.org")
}
# if (!requireNamespace("digest", quietly = TRUE)) {
# # Need for url remotes. See https://github.com/r-lib/actions/issues/562#issuecomment-1129088041
# install.packages("digest", repos = "http://cran.us.r-project.org")
# }
2 changes: 1 addition & 1 deletion .github/workflows/apps-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
value: "ubuntu-20.04"
cache-version:
description: cache-version to be used when pulling library cache
value: "3"
value: "5"
devel:
description: Resolved r devel version
# When R 4.3 was released, R version 4.4.0 was not recognized.
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/apps-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ jobs:
retry: 3
# extra_app_text: ", apps = c('000-all', '000-manual', '300-bs-themer')"

## Deployment server has been disabled
- os: "${{ needs.config.outputs.ubuntu }}"
r: "${{ needs.config.outputs.oldrel1 }}"
type: "connect"
account: "barret"
server_name: "rsc.radixu.com"
server_url: "https://rsc.radixu.com/__api__"
# rspm: "https://demo.rstudiopm.com/all/__linux__/focal/latest"
cores: 1
retry: 3
# extra_app_text: ", apps = c('000-all', '000-manual', '300-bs-themer')"
Expand All @@ -56,7 +54,7 @@ jobs:
# RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: GitHub Pull

- name: R Options
Expand All @@ -65,12 +63,11 @@ jobs:
echo 'MAKEFLAGS=-j2' >> .Renviron

- name: Install R, shinycoreci, and shinyverse
timeout-minutes: 45
timeout-minutes: 30 # Should be < 10 mins
uses: ./.github/internal/install-shinyverse
with:
r-version: ${{ matrix.config.r }}
cache-version: deploy-2-${{ needs.config.outputs.cache-version }}
extra-packages: rstudio/rsconnect

# Perform as second step to make sure this version is installed
- name: Install shinycoreci from GitHub
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/apps-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
steps:
- name: GitHub Pull (PR)
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# check out the commit sha, not the merged sha. Avoids the "Merge SHA_A into SHA_B" into commits
ref: ${{ github.event.pull_request.head.sha }} # # Ref: https://github.com/actions/checkout/pull/115/files#diff-04c6e90faac2675aa89e2176d2eec7d8R203-R209
fetch-depth: 0
- name: GitHub Pull (Branch)
if: github.event_name != 'pull_request'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -53,6 +53,7 @@ jobs:
options(repos = c(CRAN="https://cran.rstudio.com/"))
source("inst/gha/data-apps-deps-update.R")
update_apps_deps()
update_shinyverse()

- name: Display file contents
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apps-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
echo "sha: $SHORT_SHA"
echo "sha=$SHORT_SHA" >> $GITHUB_OUTPUT

- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: steps.can-build.conclusion != 'skipped'

- name: Log in to the Container registry
Expand Down
107 changes: 25 additions & 82 deletions .github/workflows/apps-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,184 +25,127 @@ jobs:
uses: ./.github/workflows/apps-config.yml

macos-release:
if: ${{ ! cancelled() }}
needs: [config, ubuntu-release]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.release }}
os: ${{ needs.config.outputs.macos }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
macos-oldrel-1:
if: ${{ ! cancelled() }}
needs: [config, ubuntu-oldrel-1]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel1 }}
os: ${{ needs.config.outputs.macos }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
macos-oldrel-2:
if: ${{ ! cancelled() }}
needs: [config, ubuntu-oldrel-2]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel2 }}
os: ${{ needs.config.outputs.macos }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
macos-oldrel-3:
if: ${{ ! cancelled() }}
needs: [config, ubuntu-oldrel-3]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel3 }}
os: ${{ needs.config.outputs.macos }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
macos-oldrel-4:
if: ${{ ! cancelled() }}
needs: [config, ubuntu-oldrel-4]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel4 }}
os: ${{ needs.config.outputs.macos }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

ubuntu-release:
needs: [precheck, config]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.release }}
os: ${{ needs.config.outputs.ubuntu }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
ubuntu-oldrel-1:
needs: [precheck, config]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel1 }}
os: ${{ needs.config.outputs.ubuntu }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
ubuntu-oldrel-2:
needs: [precheck, config]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel2 }}
os: ${{ needs.config.outputs.ubuntu }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
ubuntu-oldrel-3:
needs: [precheck, config]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel3 }}
os: ${{ needs.config.outputs.ubuntu }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
ubuntu-oldrel-4:
needs: [precheck, config]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel4 }}
os: ${{ needs.config.outputs.ubuntu }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

windows-release:
if: ${{ ! cancelled() }}
needs: [config, macos-release]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.release }}
os: ${{ needs.config.outputs.windows }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
windows-oldrel-1:
if: ${{ ! cancelled() }}
needs: [config, macos-oldrel-1]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel1 }}
os: ${{ needs.config.outputs.windows }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
windows-oldrel-2:
if: ${{ ! cancelled() }}
needs: [config, macos-oldrel-2]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel2 }}
os: ${{ needs.config.outputs.windows }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
windows-oldrel-3:
if: ${{ ! cancelled() }}
needs: [config, macos-oldrel-3]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel3 }}
os: ${{ needs.config.outputs.windows }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
windows-oldrel-4:
if: ${{ ! cancelled() }}
needs: [config, macos-oldrel-4]
needs: [config]
uses: ./.github/workflows/apps-test-os.yml
with:
r-version: ${{ needs.config.outputs.oldrel4 }}
os: ${{ needs.config.outputs.windows }}
cache-version: ${{ needs.config.outputs.cache-version }}
secrets:
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

build-results:
uses: ./.github/workflows/build-results.yml
if: ${{ (! cancelled()) && (github.event_name != 'pull_request') }}
needs:
## Comment for now to reduce requirements as we know the last round is windows
# - macos-release
# - macos-oldrel-1
# - macos-oldrel-2
# - macos-oldrel-3
# - macos-oldrel-4
- macos-release
- macos-oldrel-1
- macos-oldrel-2
- macos-oldrel-3
- macos-oldrel-4

# - ubuntu-release
# - ubuntu-oldrel-1
# - ubuntu-oldrel-2
# - ubuntu-oldrel-3
# - ubuntu-oldrel-4
- ubuntu-release
- ubuntu-oldrel-1
- ubuntu-oldrel-2
- ubuntu-oldrel-3
- ubuntu-oldrel-4

- windows-release
- windows-oldrel-1
Expand Down
Loading
Loading