v1.4.0 #402
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
on: | |
pull_request: | |
branches: | |
- main | |
name: Binary checks | |
jobs: | |
build: | |
name: Build for ${{ matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macOS-latest, r: 'release', artifact_name: '*.tar.gz', asset_name: macOS} | |
- {os: windows-latest, r: 'release', artifact_name: '*.zip', asset_name: winOS} | |
- {os: ubuntu-latest, r: 'release', artifact_name: '*.tar.gz', asset_name: linuxOS} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
RSPM: ${{ matrix.config.rspm }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
cache-version: 2 | |
extra-packages: | | |
any::rcmdcheck | |
any::lintr | |
any::spelling | |
any::covr | |
needs: check | |
- uses: r-lib/actions/check-r-package@v2 | |
env: | |
_R_CHECK_FORCE_SUGGESTS_: false | |
with: | |
upload-snapshots: true | |
- name: Binary | |
run: | | |
pkgbuild::clean_dll() | |
binary <- pkgbuild::build(binary = TRUE, needs_compilation = TRUE, compile_attributes = TRUE) | |
dir.create("build") | |
file.copy(binary, "build") | |
shell: Rscript {0} | |
- name: Save binary artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.config.asset_name }} | |
path: build/ | |
- name: Calculate code coverage | |
run: Rscript -e "covr::codecov()" | |
- name: Lint | |
run: lintr::lint_package() | |
shell: Rscript {0} | |
# - name: Goodpractice # check if available on CRAN again in the future | |
# run: | | |
# goodpractice::gp() | |
# shell: Rscript {0} | |
- name: Spell check | |
run: spelling::spell_check_package() | |
shell: Rscript {0} |