diff --git a/.github/workflows/R-CMD-check-devel.yaml b/.github/workflows/R-CMD-check-devel.yaml index 417bd687..5a9b1b44 100644 --- a/.github/workflows/R-CMD-check-devel.yaml +++ b/.github/workflows/R-CMD-check-devel.yaml @@ -31,7 +31,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" needs: check extra-packages: | any::rcmdcheck diff --git a/.github/workflows/R-CMD-check-hard.yaml b/.github/workflows/R-CMD-check-hard.yaml index 9c20c879..7174722e 100644 --- a/.github/workflows/R-CMD-check-hard.yaml +++ b/.github/workflows/R-CMD-check-hard.yaml @@ -36,7 +36,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" dependencies: '"hard"' cache: false extra-packages: | diff --git a/.github/workflows/R-CMD-check-strict.yaml b/.github/workflows/R-CMD-check-strict.yaml deleted file mode 100644 index b974ffa9..00000000 --- a/.github/workflows/R-CMD-check-strict.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -# -# R CMD Check will fail on NOTE. -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - schedule: - # * is a special character in YAML so you have to quote this string - # Trigger once a week at 00:00 on Sunday - - cron: "0 0 * * SUN" - -name: R-CMD-check-strict - -jobs: - R-CMD-check-strict: - runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - # CRAN does not provide macOS binaries for R-devel, so some packages - # need to be built from source. To avoid that, use R-release. - - { os: macos-latest, r: "release" } - - { os: windows-latest, r: "devel" } - - { os: ubuntu-latest, r: "devel" } - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - _R_CHECK_CRAN_INCOMING_REMOTE_: true - _R_CHECK_CRAN_INCOMING_: false - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - with: - pandoc-version: "latest" - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - pak-version: devel - upgrade: 'TRUE' - needs: check - extra-packages: | - any::rcmdcheck - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true - upload-results: true - error-on: '"note"' diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 7a3ed371..18c32c1c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -8,6 +8,10 @@ on: name: R-CMD-check +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} @@ -18,20 +22,28 @@ jobs: fail-fast: false matrix: config: - # Checks are not run on R-devel because they are already run in - # `R-CMD-check-strict` workflow - - #- { os: macos-latest, r: "devel" } - - { os: macos-latest, r: "release" } - - { os: macos-latest, r: "oldrel-1" } + #- {os: macOS-latest, r: 'devel'} + - { os: macOS-latest, r: "release" } + - { os: macOS-latest, r: "oldrel" } + #- {os: macOS-latest, r: 'oldrel-2'} + #- {os: macOS-latest, r: 'oldrel-3'} - #- { os: windows-latest, r: "devel" } + #- { os: windows-latest, r: "next" } + - { os: windows-latest, r: "devel" } - { os: windows-latest, r: "release" } - - { os: windows-latest, r: "oldrel-1" } + - { os: windows-latest, r: "oldrel" } + #- {os: windows-latest, r: 'oldrel-2'} + #- {os: windows-latest, r: 'oldrel-3'} - #- { os: ubuntu-latest, r: "devel" } - #- { os: ubuntu-latest, r: "release" } - #- { os: ubuntu-latest, r: "oldrel-1" } + # use 4.1 to check with rtools40's older compiler + #- { os: windows-latest, r: "4.1" } + + #- { os: ubuntu-latest, r: "next" } + - { os: ubuntu-latest, r: "devel" } + - { os: ubuntu-latest, r: "release" } + #- { os: ubuntu-latest, r: "oldrel" } + #- { os: ubuntu-latest, r: "oldrel-2" } + #- { os: ubuntu-latest, r: "oldrel-3" } env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -55,8 +67,23 @@ jobs: upgrade: 'TRUE' extra-packages: | any::rcmdcheck + Matrix=?ignore-before-r=100.0.0 + lme4=?ignore-before-r=100.0.0 + TMB=?ignore-before-r=100.0.0 needs: check + - name: Install packages from source + run: | + utils::install.packages(c("Matrix", "lme4", "TMB"), type = "source") + shell: Rscript {0} + - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + upload-results: true + error-on: 'ifelse(getRversion() > "4.3", "note", "warning")' + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_FORCE_SUGGESTS_: false + _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_: true diff --git a/.github/workflows/check-all-examples.yaml b/.github/workflows/check-all-examples.yaml index ba24579e..d6ae0eb8 100644 --- a/.github/workflows/check-all-examples.yaml +++ b/.github/workflows/check-all-examples.yaml @@ -36,7 +36,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | any::devtools local::. diff --git a/.github/workflows/check-link-rot.yaml b/.github/workflows/check-link-rot.yaml index d10c474d..69179ba8 100644 --- a/.github/workflows/check-link-rot.yaml +++ b/.github/workflows/check-link-rot.yaml @@ -31,7 +31,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" dependencies: '"hard"' extra-packages: | any::rcmdcheck diff --git a/.github/workflows/check-random-test-order.yaml b/.github/workflows/check-random-test-order.yaml index 55dfd62c..f91969b8 100644 --- a/.github/workflows/check-random-test-order.yaml +++ b/.github/workflows/check-random-test-order.yaml @@ -24,7 +24,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | local::. diff --git a/.github/workflows/check-readme.yaml b/.github/workflows/check-readme.yaml index 3f5a1121..67f1df18 100644 --- a/.github/workflows/check-readme.yaml +++ b/.github/workflows/check-readme.yaml @@ -41,7 +41,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | local::. any::gghalves diff --git a/.github/workflows/check-spelling.yaml b/.github/workflows/check-spelling.yaml index c79d7f80..6740b47b 100644 --- a/.github/workflows/check-spelling.yaml +++ b/.github/workflows/check-spelling.yaml @@ -30,7 +30,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" dependencies: '"hard"' extra-packages: | any::rcmdcheck diff --git a/.github/workflows/check-styling.yaml b/.github/workflows/check-styling.yaml index 4e79ce89..abf1b2fa 100644 --- a/.github/workflows/check-styling.yaml +++ b/.github/workflows/check-styling.yaml @@ -26,7 +26,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" dependencies: '"hard"' extra-packages: | local::. diff --git a/.github/workflows/check-test-warnings.yaml b/.github/workflows/check-test-warnings.yaml index f17812e6..46af9ef4 100644 --- a/.github/workflows/check-test-warnings.yaml +++ b/.github/workflows/check-test-warnings.yaml @@ -28,7 +28,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | local::. any::devtools diff --git a/.github/workflows/check-vignette-warnings.yaml b/.github/workflows/check-vignette-warnings.yaml index d378981a..93204ff4 100644 --- a/.github/workflows/check-vignette-warnings.yaml +++ b/.github/workflows/check-vignette-warnings.yaml @@ -32,7 +32,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | local::. diff --git a/.github/workflows/html-5-check.yaml b/.github/workflows/html-5-check.yaml index 36acbd80..35503027 100644 --- a/.github/workflows/html-5-check.yaml +++ b/.github/workflows/html-5-check.yaml @@ -25,7 +25,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | any::rcmdcheck any::V8 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f6951746..fefe904a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -27,7 +27,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | r-lib/lintr local::. diff --git a/.github/workflows/pkgdown-no-suggests.yaml b/.github/workflows/pkgdown-no-suggests.yaml index 9676ba63..767bead5 100644 --- a/.github/workflows/pkgdown-no-suggests.yaml +++ b/.github/workflows/pkgdown-no-suggests.yaml @@ -34,7 +34,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" dependencies: '"hard"' cache: false extra-packages: | diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 48cdafba..359e0273 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -34,7 +34,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | r-lib/pkgdown local::. diff --git a/.github/workflows/styler.yaml b/.github/workflows/styler.yaml index 58f021fb..302f4570 100644 --- a/.github/workflows/styler.yaml +++ b/.github/workflows/styler.yaml @@ -24,7 +24,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" dependencies: '"hard"' extra-packages: | local::. diff --git a/.github/workflows/test-coverage-examples.yaml b/.github/workflows/test-coverage-examples.yaml index 9e5457b5..0c81b506 100644 --- a/.github/workflows/test-coverage-examples.yaml +++ b/.github/workflows/test-coverage-examples.yaml @@ -26,7 +26,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | any::covr local::. diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index beb317ac..b918c0b2 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -25,7 +25,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: pak-version: devel - upgrade: 'TRUE' + upgrade: "TRUE" extra-packages: | any::covr needs: coverage diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 757c5834..96c6bdad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ default_language_version: repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.2.9003 + rev: v0.4.2 hooks: - id: no-browser-statement - id: no-debug-statement @@ -14,7 +14,7 @@ repos: - id: deps-in-desc - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-json @@ -30,7 +30,7 @@ repos: )$ - repo: https://github.com/lorenzwalthert/gitignore-tidy - rev: "475bf5d96927a1887ce2863ff3075b1d7240bc51" + rev: "0.1.2" hooks: - id: tidy-gitignore diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..664fc9ba --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# h/t to @jimhester and @yihui for this parse block: +# https://github.com/yihui/knitr/blob/dc5ead7bcfc0ebd2789fe99c527c7d91afb3de4a/Makefile#L1-L4 +# Note the portability change as suggested in the manual: +# https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-portable-packages +PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION` +PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION` + + +all: check + +build: install_deps + R CMD build . + +check: build + R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz + +install_deps: + Rscript \ + -e 'if (!requireNamespace("remotes")) install.packages("remotes")' \ + -e 'remotes::install_deps(dependencies = TRUE)' + +install: build + R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz + +clean: + @rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck