-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
175509c
commit 26c48ad
Showing
4 changed files
with
23 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,55 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
branches: [main, master] | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
branches: [main, master] | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }} / ${{ matrix.config.rust-version }}) | ||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: windows-latest, r: 'release', rust-version: 'stable-msvc'} | ||
- {os: macOS-latest, r: 'release', rust-version: 'stable'} | ||
- {os: ubuntu-20.04, r: 'release', rust-version: 'stable', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: ubuntu-20.04, r: 'devel', rust-version: 'stable', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: macOS-latest, r: 'release', rust-version: 'stable' } | ||
- {os: ubuntu-20.04, r: 'release', rust-version: 'stable' } | ||
- {os: ubuntu-20.04, r: 'devel', rust-version: 'stable' } | ||
|
||
env: | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
RSPM: ${{ matrix.config.rspm }} | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.config.rust-version }} | ||
default: true | ||
|
||
- name: Set up R | ||
uses: r-lib/actions/setup-r@v1 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
windows-path-include-mingw: false | ||
|
||
- name: Set up pandoc | ||
uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | ||
shell: Rscript {0} | ||
|
||
- name: Cache R packages (not Windows) | ||
if: startsWith(runner.os, 'Windows') == false | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | ||
|
||
- name: Configure Windows | ||
if: startsWith(runner.os, 'Windows') | ||
run: | | ||
rustup target add x86_64-pc-windows-gnu | ||
rustup target add i686-pc-windows-gnu | ||
shell: pwsh | ||
|
||
- name: Configure Linux | ||
if: startsWith(runner.os, 'Linux') | ||
run: | | ||
while read -r cmd | ||
do | ||
eval sudo $cmd | ||
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') | ||
- uses: r-lib/actions/setup-r@v1 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
remotes::install_cran("rcmdcheck") | ||
shell: Rscript {0} | ||
|
||
- name: Check | ||
id: rcmd_check | ||
env: | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--force-multiarch"), error_on = "warning", check_dir = "check") | ||
shell: Rscript {0} | ||
|
||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@main | ||
- uses: r-lib/actions/setup-r-dependencies@v1 | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-rust${{ matrix.config.rust-version }}-results | ||
path: check | ||
extra-packages: rcmdcheck | ||
|
||
- uses: r-lib/actions/check-r-package@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters