Skip to content

Commit 2bdb36e

Browse files
authored
Install things as necessary from shinycoreci r-universe (#260)
1 parent 4c0b672 commit 2bdb36e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+961
-847
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
^todo\.md$
1212

1313
^inst/apps/.*/tests/.*
14+
^inst/apps/\.renvignore$
1415
\.jshintrc$
1516
www/nvd3/deprecated
1617
^_pkgdown\.yml$

.Rprofile

Whitespace-only changes.

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

+2-44
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ inputs:
2020
required: false
2121
pandoc-version:
2222
description: Pandoc version to pass through
23-
default: "2.7.3"
23+
default: "3.x"
2424
required: false
2525
runs:
2626
using: "composite"
@@ -40,54 +40,12 @@ runs:
4040
sudo apt-get update
4141
sudo apt-get install -y libglpk-dev
4242
43-
- name: Gather remotes and app deps
44-
id: shinyverse
45-
shell: Rscript {0}
46-
run: |
47-
source("inst/gha/gha-shinyverse-packages.R")
48-
pkgs <- shinyverse_pkgs()
49-
message("Shinyverse packages:\n", gsub(",", ",\n", pkgs))
50-
cat("packages=", pkgs, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
51-
52-
- name: Rtools version
53-
if: runner.os == 'Windows'
54-
id: rtools-version
55-
shell: Rscript {0}
56-
run: |
57-
# Get R version like `"4.2"`
58-
short_r_version <- sub("\\.\\d$", "", "${{ inputs.r-version }}")
59-
# For R versions >= 4.2, use Rtools v42
60-
# Otherwise leave blank
61-
if (
62-
package_version("${{ inputs.r-version }}") >= package_version("4.2")
63-
) {
64-
message("Using Rtools v42")
65-
cat("value=42\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
66-
} else {
67-
message("Not setting Rtools version!")
68-
}
69-
70-
- name: Adjust packages to install
71-
id: pkgs
72-
shell: Rscript {0}
73-
run: |
74-
source("inst/gha/gha-adjust-packages-to-install.R")
75-
pkgs_to_install <- adjust_pkgs(
76-
"${{ steps.shinyverse.outputs.packages }}",
77-
r_version = "${{ inputs.r-version }}"
78-
)
79-
message("Final packages:\n", gsub(",", ",\n", pkgs_to_install))
80-
cat("to-install=", pkgs_to_install, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
81-
82-
- name: Install R, shinycoreci, and shinyverse
43+
- name: Install R and shinycoreci
8344
uses: rstudio/shiny-workflows/setup-r-package@v1
8445
with:
8546
r-version: ${{ inputs.r-version }}
8647
cache-version: ${{ inputs.cache-version }}
8748
http-user-agent: ${{ inputs.http-user-agent }}
8849
pandoc-version: ${{ inputs.pandoc-version }}
89-
rtools-version: ${{ steps.rtools-version.outputs.value }}
9050
extra-packages:
91-
local::.
92-
${{ steps.pkgs.outputs.to-install }}
9351
${{ inputs.extra-packages }}
+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
if (!requireNamespace("digest", quietly = TRUE)) {
3-
# Need for url remotes. See https://github.com/r-lib/actions/issues/562#issuecomment-1129088041
4-
install.packages("digest", repos = "http://cran.us.r-project.org")
5-
}
1+
# if (!requireNamespace("digest", quietly = TRUE)) {
2+
# # Need for url remotes. See https://github.com/r-lib/actions/issues/562#issuecomment-1129088041
3+
# install.packages("digest", repos = "http://cran.us.r-project.org")
4+
# }

.github/workflows/apps-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
value: "ubuntu-20.04"
1919
cache-version:
2020
description: cache-version to be used when pulling library cache
21-
value: "3"
21+
value: "5"
2222
devel:
2323
description: Resolved r devel version
2424
# When R 4.3 was released, R version 4.4.0 was not recognized.

.github/workflows/apps-deploy.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ jobs:
3838
retry: 3
3939
# extra_app_text: ", apps = c('000-all', '000-manual', '300-bs-themer')"
4040

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

5856
steps:
59-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@v4
6058
name: GitHub Pull
6159

6260
- name: R Options
@@ -65,12 +63,11 @@ jobs:
6563
echo 'MAKEFLAGS=-j2' >> .Renviron
6664
6765
- name: Install R, shinycoreci, and shinyverse
68-
timeout-minutes: 45
66+
timeout-minutes: 30 # Should be < 10 mins
6967
uses: ./.github/internal/install-shinyverse
7068
with:
7169
r-version: ${{ matrix.config.r }}
7270
cache-version: deploy-2-${{ needs.config.outputs.cache-version }}
73-
extra-packages: rstudio/rsconnect
7471

7572
# Perform as second step to make sure this version is installed
7673
- name: Install shinycoreci from GitHub

.github/workflows/apps-deps.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
steps:
3333
- name: GitHub Pull (PR)
3434
if: github.event_name == 'pull_request'
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
# check out the commit sha, not the merged sha. Avoids the "Merge SHA_A into SHA_B" into commits
3838
ref: ${{ github.event.pull_request.head.sha }} # # Ref: https://github.com/actions/checkout/pull/115/files#diff-04c6e90faac2675aa89e2176d2eec7d8R203-R209
3939
fetch-depth: 0
4040
- name: GitHub Pull (Branch)
4141
if: github.event_name != 'pull_request'
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 0
4545

@@ -53,6 +53,7 @@ jobs:
5353
options(repos = c(CRAN="https://cran.rstudio.com/"))
5454
source("inst/gha/data-apps-deps-update.R")
5555
update_apps_deps()
56+
update_shinyverse()
5657
5758
- name: Display file contents
5859
run: |

.github/workflows/apps-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
echo "sha: $SHORT_SHA"
6666
echo "sha=$SHORT_SHA" >> $GITHUB_OUTPUT
6767
68-
- uses: actions/checkout@v3
68+
- uses: actions/checkout@v4
6969
if: steps.can-build.conclusion != 'skipped'
7070

7171
- name: Log in to the Container registry

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

+25-82
Original file line numberDiff line numberDiff line change
@@ -25,184 +25,127 @@ jobs:
2525
uses: ./.github/workflows/apps-config.yml
2626

2727
macos-release:
28-
if: ${{ ! cancelled() }}
29-
needs: [config, ubuntu-release]
28+
needs: [config]
3029
uses: ./.github/workflows/apps-test-os.yml
3130
with:
3231
r-version: ${{ needs.config.outputs.release }}
3332
os: ${{ needs.config.outputs.macos }}
3433
cache-version: ${{ needs.config.outputs.cache-version }}
35-
secrets:
36-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
37-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3834
macos-oldrel-1:
39-
if: ${{ ! cancelled() }}
40-
needs: [config, ubuntu-oldrel-1]
35+
needs: [config]
4136
uses: ./.github/workflows/apps-test-os.yml
4237
with:
4338
r-version: ${{ needs.config.outputs.oldrel1 }}
4439
os: ${{ needs.config.outputs.macos }}
4540
cache-version: ${{ needs.config.outputs.cache-version }}
46-
secrets:
47-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
48-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
4941
macos-oldrel-2:
50-
if: ${{ ! cancelled() }}
51-
needs: [config, ubuntu-oldrel-2]
42+
needs: [config]
5243
uses: ./.github/workflows/apps-test-os.yml
5344
with:
5445
r-version: ${{ needs.config.outputs.oldrel2 }}
5546
os: ${{ needs.config.outputs.macos }}
5647
cache-version: ${{ needs.config.outputs.cache-version }}
57-
secrets:
58-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
59-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
6048
macos-oldrel-3:
61-
if: ${{ ! cancelled() }}
62-
needs: [config, ubuntu-oldrel-3]
49+
needs: [config]
6350
uses: ./.github/workflows/apps-test-os.yml
6451
with:
6552
r-version: ${{ needs.config.outputs.oldrel3 }}
6653
os: ${{ needs.config.outputs.macos }}
6754
cache-version: ${{ needs.config.outputs.cache-version }}
68-
secrets:
69-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
70-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7155
macos-oldrel-4:
72-
if: ${{ ! cancelled() }}
73-
needs: [config, ubuntu-oldrel-4]
56+
needs: [config]
7457
uses: ./.github/workflows/apps-test-os.yml
7558
with:
7659
r-version: ${{ needs.config.outputs.oldrel4 }}
7760
os: ${{ needs.config.outputs.macos }}
7861
cache-version: ${{ needs.config.outputs.cache-version }}
79-
secrets:
80-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
81-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
8262

8363
ubuntu-release:
84-
needs: [precheck, config]
64+
needs: [config]
8565
uses: ./.github/workflows/apps-test-os.yml
8666
with:
8767
r-version: ${{ needs.config.outputs.release }}
8868
os: ${{ needs.config.outputs.ubuntu }}
8969
cache-version: ${{ needs.config.outputs.cache-version }}
90-
secrets:
91-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
92-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
9370
ubuntu-oldrel-1:
94-
needs: [precheck, config]
71+
needs: [config]
9572
uses: ./.github/workflows/apps-test-os.yml
9673
with:
9774
r-version: ${{ needs.config.outputs.oldrel1 }}
9875
os: ${{ needs.config.outputs.ubuntu }}
9976
cache-version: ${{ needs.config.outputs.cache-version }}
100-
secrets:
101-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
102-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
10377
ubuntu-oldrel-2:
104-
needs: [precheck, config]
78+
needs: [config]
10579
uses: ./.github/workflows/apps-test-os.yml
10680
with:
10781
r-version: ${{ needs.config.outputs.oldrel2 }}
10882
os: ${{ needs.config.outputs.ubuntu }}
10983
cache-version: ${{ needs.config.outputs.cache-version }}
110-
secrets:
111-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
112-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
11384
ubuntu-oldrel-3:
114-
needs: [precheck, config]
85+
needs: [config]
11586
uses: ./.github/workflows/apps-test-os.yml
11687
with:
11788
r-version: ${{ needs.config.outputs.oldrel3 }}
11889
os: ${{ needs.config.outputs.ubuntu }}
11990
cache-version: ${{ needs.config.outputs.cache-version }}
120-
secrets:
121-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
122-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
12391
ubuntu-oldrel-4:
124-
needs: [precheck, config]
92+
needs: [config]
12593
uses: ./.github/workflows/apps-test-os.yml
12694
with:
12795
r-version: ${{ needs.config.outputs.oldrel4 }}
12896
os: ${{ needs.config.outputs.ubuntu }}
12997
cache-version: ${{ needs.config.outputs.cache-version }}
130-
secrets:
131-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
132-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
13398

13499
windows-release:
135-
if: ${{ ! cancelled() }}
136-
needs: [config, macos-release]
100+
needs: [config]
137101
uses: ./.github/workflows/apps-test-os.yml
138102
with:
139103
r-version: ${{ needs.config.outputs.release }}
140104
os: ${{ needs.config.outputs.windows }}
141105
cache-version: ${{ needs.config.outputs.cache-version }}
142-
secrets:
143-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
144-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
145106
windows-oldrel-1:
146-
if: ${{ ! cancelled() }}
147-
needs: [config, macos-oldrel-1]
107+
needs: [config]
148108
uses: ./.github/workflows/apps-test-os.yml
149109
with:
150110
r-version: ${{ needs.config.outputs.oldrel1 }}
151111
os: ${{ needs.config.outputs.windows }}
152112
cache-version: ${{ needs.config.outputs.cache-version }}
153-
secrets:
154-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
155-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
156113
windows-oldrel-2:
157-
if: ${{ ! cancelled() }}
158-
needs: [config, macos-oldrel-2]
114+
needs: [config]
159115
uses: ./.github/workflows/apps-test-os.yml
160116
with:
161117
r-version: ${{ needs.config.outputs.oldrel2 }}
162118
os: ${{ needs.config.outputs.windows }}
163119
cache-version: ${{ needs.config.outputs.cache-version }}
164-
secrets:
165-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
166-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
167120
windows-oldrel-3:
168-
if: ${{ ! cancelled() }}
169-
needs: [config, macos-oldrel-3]
121+
needs: [config]
170122
uses: ./.github/workflows/apps-test-os.yml
171123
with:
172124
r-version: ${{ needs.config.outputs.oldrel3 }}
173125
os: ${{ needs.config.outputs.windows }}
174126
cache-version: ${{ needs.config.outputs.cache-version }}
175-
secrets:
176-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
177-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
178127
windows-oldrel-4:
179-
if: ${{ ! cancelled() }}
180-
needs: [config, macos-oldrel-4]
128+
needs: [config]
181129
uses: ./.github/workflows/apps-test-os.yml
182130
with:
183131
r-version: ${{ needs.config.outputs.oldrel4 }}
184132
os: ${{ needs.config.outputs.windows }}
185133
cache-version: ${{ needs.config.outputs.cache-version }}
186-
secrets:
187-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
188-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
189134

190135
build-results:
191136
uses: ./.github/workflows/build-results.yml
192-
if: ${{ (! cancelled()) && (github.event_name != 'pull_request') }}
193137
needs:
194-
## Comment for now to reduce requirements as we know the last round is windows
195-
# - macos-release
196-
# - macos-oldrel-1
197-
# - macos-oldrel-2
198-
# - macos-oldrel-3
199-
# - macos-oldrel-4
138+
- macos-release
139+
- macos-oldrel-1
140+
- macos-oldrel-2
141+
- macos-oldrel-3
142+
- macos-oldrel-4
200143

201-
# - ubuntu-release
202-
# - ubuntu-oldrel-1
203-
# - ubuntu-oldrel-2
204-
# - ubuntu-oldrel-3
205-
# - ubuntu-oldrel-4
144+
- ubuntu-release
145+
- ubuntu-oldrel-1
146+
- ubuntu-oldrel-2
147+
- ubuntu-oldrel-3
148+
- ubuntu-oldrel-4
206149

207150
- windows-release
208151
- windows-oldrel-1

0 commit comments

Comments
 (0)