Merge branch 'fix-check' into develop
This commit is contained in:
commit
b0eccc5e6b
2 changed files with 19 additions and 63 deletions
80
.github/workflows/build.yml
vendored
80
.github/workflows/build.yml
vendored
|
|
@ -11,7 +11,7 @@
|
|||
# ======================================================== #
|
||||
|
||||
on: [push, pull_request]
|
||||
name: package-build
|
||||
name: R-CMD-check
|
||||
|
||||
# ======================================================== #
|
||||
# Determine actions to take #
|
||||
|
|
@ -28,76 +28,32 @@ jobs:
|
|||
- {os: windows-latest, r: 'release'}
|
||||
- {os: macOS-latest, r: 'release'}
|
||||
- {os: ubuntu-latest, r: 'release'}
|
||||
- {os: ubuntu-latest, r: 'devel'}
|
||||
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
|
||||
- {os: ubuntu-latest, r: 'oldrel-1'}
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
R_KEEP_PKG_SOURCE: yes
|
||||
steps:
|
||||
- name: Retrieving current month
|
||||
if: runner.os == 'Linux'
|
||||
run: echo "CURRENT_MONTH=$(date +%m)" >> $GITHUB_ENV
|
||||
|
||||
# Checking out code -------------------------------------- #
|
||||
- name: Checking out the repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setting up pandoc
|
||||
uses: r-lib/actions/setup-pandoc@v2
|
||||
|
||||
# Setting up environment --------------------------------- #
|
||||
- name: Setting up R ${{ matrix.config.r }} on ${{ matrix.config.os }}
|
||||
uses: r-lib/actions/setup-r@v1
|
||||
uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
r-version: ${{ matrix.config.r }}
|
||||
http-user-agent: ${{ matrix.config.http-user-agent }}
|
||||
use-public-rspm: true
|
||||
|
||||
# Installing Pandoc -------------------------------------- #
|
||||
- name: Installing Pandoc
|
||||
uses: r-lib/actions/setup-pandoc@v1
|
||||
|
||||
# Querying dependencies ---------------------------------- #
|
||||
- name: Querying 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}
|
||||
|
||||
# Restoring R package cache ------------------------------ #
|
||||
- name: Restoring R package cache
|
||||
uses: actions/cache@v2
|
||||
uses: r-lib/actions/setup-r-dependencies@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-
|
||||
extra-packages: any::rcmdcheck
|
||||
needs: check
|
||||
|
||||
# Installing system dependencies ------------------------- #
|
||||
- name: Installing system dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get install libcurl4-openssl-dev
|
||||
while read -r cmd
|
||||
do
|
||||
eval sudo $cmd
|
||||
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
|
||||
|
||||
# Installing package dependencies ------------------------ #
|
||||
- name: Installing package dependencies
|
||||
if: ${{ env.CURRENT_MONTH < 4 || env.CURRENT_MONTH > 10 }}
|
||||
run: |
|
||||
remotes::install_cran(c("rcmdcheck", "BiocManager"))
|
||||
BiocManager::install("GenomicRanges")
|
||||
BiocManager::install("Rsamtools")
|
||||
remotes::install_deps(dependencies = TRUE)
|
||||
shell: Rscript {0}
|
||||
|
||||
# Checking package --------------------------------------- #
|
||||
- name: Checking package
|
||||
if: ${{ env.CURRENT_MONTH < 4 || env.CURRENT_MONTH > 10 }}
|
||||
env:
|
||||
_R_CHECK_CRAN_INCOMING_REMOTE_: false
|
||||
run: |
|
||||
options(crayon.enabled = TRUE)
|
||||
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
|
||||
shell: Rscript {0}
|
||||
|
||||
# Uploading check results -------------------------------- #
|
||||
- name: Uploading check results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@main
|
||||
uses: r-lib/actions/check-r-package@v2
|
||||
with:
|
||||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
|
||||
path: check
|
||||
upload-snapshots: true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Package: rBAPS
|
||||
Title: Bayesian Analysis of Population Structure
|
||||
Version: 0.0.0.9010
|
||||
Version: 0.0.0.9011
|
||||
Date: 2020-11-09
|
||||
Authors@R:
|
||||
c(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue