Skip to content
Open
Changes from all commits
Commits
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
16 changes: 13 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -40,6 +40,16 @@ jobs:
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Configure R-devel repository
if: matrix.config.r == 'devel'
shell: Rscript {0}
run: |
cat(
'options(repos = c(RUNIVERSE = sprintf("https://cran.r-universe.dev/bin/linux/resolute-x86_64/%s/", getRversion()[, 1:2]), getOption("repos")))\n',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resolute here will also change at some point. It's probably possible to derive that too, but maybe not necessary. When r-universe moves past resolute, will this error or go back to source? I guess either way we'd notice and could update it. Then again, if we're going to notice it because this workflow errors or starts taking an hour, then maybe we don't need to add any of this extra complication to derive the URL at all and we just update it manually? Now I'm not sure ;)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm that's true. Yeah I didn't bother deriving since its getting unwieldy. I'm happy with this current compromise. I think it would just warn since the repo would be invalid and would fall back to source installs from CRAN/P3M. Ubuntu 26 is a LTS release so I doubt they'll drop support anytime soon.

All that to say, I think this is a decent balance between ugly and automated, but could be convinced to go either way (more/less ugly/brittle)

file = "~/.Rprofile",
append = TRUE
)

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
Expand Down
Loading