From 1d67670f25a188f8af28532abea4cdd0ab12959b Mon Sep 17 00:00:00 2001 From: DivadNojnarg Date: Thu, 1 Aug 2024 21:16:35 +0200 Subject: [PATCH] revdep on GA --- .github/workflows/recheck.yml | 145 ++++++++++++++++++++++++++++++++++ pkgdown/_pkgdown.yml | 3 +- revdep/.gitignore | 6 -- revdep/README.md | 29 ------- revdep/cran.md | 7 -- revdep/email.yml | 4 - revdep/failures.md | 65 --------------- revdep/problems.md | 1 - 8 files changed, 146 insertions(+), 114 deletions(-) create mode 100644 .github/workflows/recheck.yml delete mode 100644 revdep/.gitignore delete mode 100644 revdep/README.md delete mode 100644 revdep/cran.md delete mode 100644 revdep/email.yml delete mode 100644 revdep/failures.md delete mode 100644 revdep/problems.md diff --git a/.github/workflows/recheck.yml b/.github/workflows/recheck.yml new file mode 100644 index 00000000..33b4d67c --- /dev/null +++ b/.github/workflows/recheck.yml @@ -0,0 +1,145 @@ +name: Run a recheck + +on: + workflow_call: + inputs: + which: + description: Should be 'strong' or 'most'. + type: string + default: strong + required: false + +env: + R_LIBS_USER: ${{github.workspace}}/pkglib + _R_CHECK_FORCE_SUGGESTS_: 'FALSE' + _R_CHECK_CRAN_INCOMING_: 'FALSE' + _R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_: 'TRUE' #remove for R-4.4 + _R_CHECK_ELAPSED_TIMEOUT_: 3600 + GITHUB_ACTIONS: '' + CI: '' + +jobs: + prepare: + name: Prepare dependencies + runs-on: ubuntu-latest + container: ghcr.io/r-devel/recheck + outputs: + oldfile: ${{ steps.filenames.outputs.oldfile }} + newfile: ${{ steps.filenames.outputs.newfile }} + steps: + - name: prepare + run: | + mkdir -p $R_LIBS_USER + R -e ".libPaths()" + +# - name: clone +# run: git clone --depth=1 https://github.com/${{github.repository}} source + + - name: checkout + uses: actions/checkout@v4 + with: + path: source + + - name: download dependencies + run: rechecktools::install_recheck_deps('source', '${{inputs.which}}') + shell: Rscript {0} + + - name: build source package + run: | + mkdir newpkg + R CMD build source + mv *.tar.gz newpkg/ + rm -Rf source + + - name: Get old version of package + shell: Rscript {0} + run: | + dir.create("oldpkg") + pkg <- sub("_.*", "", list.files("newpkg")) + download.packages(pkg, "oldpkg", repos = "https://cran.r-project.org") + + - name: Get file names + id: filenames + run: | + echo "oldfile=$(cd oldpkg; echo *.tar.gz)" >> "$GITHUB_OUTPUT" + echo "newfile=$(cd newpkg; echo *.tar.gz)" >> "$GITHUB_OUTPUT" + + - name: Save package and library + uses: actions/cache/save@v4 + with: + path: | + pkglib + newpkg + oldpkg + key: ${{ runner.os }}-${{ github.run_id }}-${{github.run_attempt}} + + checks: + needs: prepare + runs-on: ubuntu-latest + name: Recheck ${{matrix.check == 'oldpkg' && needs.prepare.outputs.oldfile || needs.prepare.outputs.newfile}} (${{matrix.check}}) + container: ghcr.io/r-devel/recheck + timeout-minutes: 600 + strategy: + matrix: + check: [ 'oldpkg', 'newpkg' ] + steps: + + - name: Download package and library + uses: actions/cache/restore@v4 + with: + path: | + pkglib + newpkg + oldpkg + key: ${{ runner.os }}-${{ github.run_id }}-${{github.run_attempt}} + + - name: Run checks + shell: Rscript {0} + run: | + checkdir <- "${{matrix.check}}" + options(repos = c(CRAN = 'https://cloud.r-project.org')) + reverse <- list(repos = 'https://cloud.r-project.org', which = "${{ inputs.which }}") + Sys.setenv(R_PROFILE="nothing") # do not set binary p3m mirror in child proc + tools::check_packages_in_dir(checkdir, reverse = reverse, Ncpus = parallel::detectCores()) + details <- tools::check_packages_in_dir_details(checkdir) + write.csv(details, file.path(checkdir, 'check-details.csv')) + writeLines(paste(format(details), collapse = "\n\n"), file.path(checkdir, 'check-details.txt')) + tools::summarize_check_packages_in_dir_results(checkdir) + + - uses: actions/upload-artifact@v4 + with: + name: ${{matrix.check}}-checklogs + path: | + ${{matrix.check}}/*/*.log + ${{matrix.check}}/*/*.out + ${{matrix.check}}/*/*.Rout + ${{matrix.check}}/*/*.fail + ${{matrix.check}}/Outputs + ${{matrix.check}}/check-details.* + + results: + name: Show results + needs: checks + runs-on: ubuntu-latest + container: ghcr.io/r-hub/r-minimal/r-minimal:latest + steps: + - name: Download log files + uses: actions/download-artifact@v4 + + - name: Get results + shell: Rscript {0} + run: | + cat("\n------- Check results summary ------\n") + tools::summarize_check_packages_in_dir_results("newpkg-checklogs") + + # Check for regressions + cat("\n------- Check for regressions ------\n") + changes <- tools::check_packages_in_dir_changes("newpkg-checklogs", "oldpkg-checklogs") + if(nrow(changes)){ + cat("Changes:\n") + print(changes) + stop("Found potential problems") + } else { + cat("No changes between old and new version\n") + } + diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index cae0f4cb..f066e660 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -145,8 +145,7 @@ navbar: articles: - title: User guide - desc: ~ - navbar: User Guide + navbar: ~ contents: - '`improved-boxes`' - '`box-elements`' diff --git a/revdep/.gitignore b/revdep/.gitignore deleted file mode 100644 index 31f6c40d..00000000 --- a/revdep/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -checks -library -checks.noindex -library.noindex -data.sqlite -*.html diff --git a/revdep/README.md b/revdep/README.md deleted file mode 100644 index 02a3b9f6..00000000 --- a/revdep/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Platform - -|field |value | -|:--------|:--------------------------------------| -|version |R version 4.3.1 RC (2023-06-08 r84523) | -|os |macOS Sonoma 14.3.1 | -|system |aarch64, darwin20 | -|ui |X11 | -|language |(EN) | -|collate |en_US.UTF-8 | -|ctype |en_US.UTF-8 | -|tz |Europe/Zurich | -|date |2024-04-10 | -|pandoc |3.1.8 @ /usr/local/bin/pandoc | - -# Dependencies - -|package |old |new |Δ | -|:------------------|:-----|:-----|:--| -|shinydashboardPlus |2.0.3 |2.0.4 |* | - -# Revdeps - -## Failed to check (1) - -|package |version |error |warning |note | -|:---------|:-------|:-----|:-------|:----| -|pRolocGUI |2.12.0 |1 | |1 | - diff --git a/revdep/cran.md b/revdep/cran.md deleted file mode 100644 index 89f31576..00000000 --- a/revdep/cran.md +++ /dev/null @@ -1,7 +0,0 @@ -## revdepcheck results - -We checked 28 reverse dependencies (0 from CRAN + 28 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. - - * We saw 0 new problems - * We failed to check 0 packages - diff --git a/revdep/email.yml b/revdep/email.yml deleted file mode 100644 index 18c2a597..00000000 --- a/revdep/email.yml +++ /dev/null @@ -1,4 +0,0 @@ -release_date: ??? -rel_release_date: ??? -my_news_url: ??? -release_version: ??? diff --git a/revdep/failures.md b/revdep/failures.md deleted file mode 100644 index 5351f0e1..00000000 --- a/revdep/failures.md +++ /dev/null @@ -1,65 +0,0 @@ -# pRolocGUI - -
- -* Version: 2.12.0 -* GitHub: https://github.com/lgatto/pRolocGUI -* Source code: https://github.com/cran/pRolocGUI -* Date/Publication: 2023-10-24 -* Number of recursive dependencies: 244 - -Run `revdepcheck::revdep_details(, "pRolocGUI")` for more info - -
- -## In both - -* checking whether package ‘pRolocGUI’ can be installed ... ERROR - ``` - Installation failed. - See ‘/Users/davidgranjon/david/RinteRface/shinydashboardPlus/revdep/checks.noindex/pRolocGUI/new/pRolocGUI.Rcheck/00install.out’ for details. - ``` - -* checking package dependencies ... NOTE - ``` - Package suggested but not available for checking: ‘pRolocdata’ - ``` - -## Installation - -### Devel - -``` -* installing *source* package ‘pRolocGUI’ ... -** using staged installation -** R -** inst -** byte-compile and prepare package for lazy loading -Error: package or namespace load failed for ‘mzR’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): - there is no package called ‘ncdf4’ -In addition: Warning message: -package ‘MSnbase’ was built under R version 4.3.3 -Execution halted -ERROR: lazy loading failed for package ‘pRolocGUI’ -* removing ‘/Users/davidgranjon/david/RinteRface/shinydashboardPlus/revdep/checks.noindex/pRolocGUI/new/pRolocGUI.Rcheck/pRolocGUI’ - - -``` -### CRAN - -``` -* installing *source* package ‘pRolocGUI’ ... -** using staged installation -** R -** inst -** byte-compile and prepare package for lazy loading -Error: package or namespace load failed for ‘mzR’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): - there is no package called ‘ncdf4’ -In addition: Warning message: -package ‘MSnbase’ was built under R version 4.3.3 -Execution halted -ERROR: lazy loading failed for package ‘pRolocGUI’ -* removing ‘/Users/davidgranjon/david/RinteRface/shinydashboardPlus/revdep/checks.noindex/pRolocGUI/old/pRolocGUI.Rcheck/pRolocGUI’ - - -``` diff --git a/revdep/problems.md b/revdep/problems.md deleted file mode 100644 index 9a207363..00000000 --- a/revdep/problems.md +++ /dev/null @@ -1 +0,0 @@ -*Wow, no problems at all. :)* \ No newline at end of file