How can I force building a dependency from source in GHA to avoid R CMD check warning?

I am trying to check {bit64} on a large variety of OS/R version combinations.

I'm getting a ton of failures, mostly expected, but also have many distracting spurious failures due to warnings like this:

* checking whether package ‘bit64’ can be installed ... WARNING
Warning: Found the following significant warnings:
  Warning: package ‘bit’ was built under R version 3.6.3
See ‘/home/runner/work/bit64/bit64/check/bit64.Rcheck/00install.out’ for details.

IIUC this will be because a pre-compiled version of my upstream dependency {bit} was used for R CMD check.

To avoid this, again IINM, I'll need to force {bit} to be compiled on the same runner as {bit64} so there's no version mismatch.

How can I do this in the r-lib/actions/setup-r / r-lib/actions/setup-r-dependencies actions?

If you want to compile bit from source, try setting

- uses: r-lib/actions/setup-r-dependencies@v2
  with:
    extra-packages:  |
      bit=?source

EDIT: changed bit?source to bit=?source, slightly better.

Thanks! Looks promising. Adding the documentation links for future reference:

About setup-r-dependencies' extra-dependencies key:

That references {pak} syntax, which I see documented here: Frequently Asked Questions — FAQ • pak. I'm still trying to understand this latter (Difference between <pkg>?source and <pkg>=?source ? · Issue #708 · r-lib/pak · GitHub); thanks Gabor!