pitrou commented on a change in pull request #12745:
URL: https://github.com/apache/arrow/pull/12745#discussion_r838551376



##########
File path: .github/workflows/r.yml
##########
@@ -329,12 +329,37 @@ jobs:
         if: ${{ matrix.config.rtools == 35 }}
         shell: Rscript {0}
         run: install.packages("cpp11", type = "source")
+      - name: Prune dependencies (on R 3.6)
+        if: ${{ matrix.config.rtools == 35 }}
+        shell: Rscript {0}
+        run: |
+            # To prevent the build from timing out, let's prune some optional 
deps (and their possible version requirements)
+            setwd("r")
+            # create a backup to use later
+            file.copy("DESCRIPTION", "DESCRIPTION.bak")
+            d <- read.dcf("DESCRIPTION")
+            to_prune <- c("duckdb", "DBI", "dbplyr", "decor", "knitr", 
"rmarkdown", "pkgload", "reticulate")
+            pattern <- paste0("\\n?", to_prune, "( \\([^,]*\\))?,?", collapse 
= "|")
+            d[,"Suggests"] <- gsub(pattern, "", d[,"Suggests"])
+            write.dcf(d, "DESCRIPTION")
+      - name: Restore R package cache
+        uses: actions/cache@v2
+        with:
+          path: |
+            ${{ env.R_LIBS_USER }}/*
+          key: ${{ steps.get-version.outputs.os-version }}-${{ 
steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-${{ 
hashFiles('r/DESCRIPTION') }}
+          restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ 
steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-
       - name: Install R package dependencies
         shell: Rscript {0}
         run: |
           # options(pkgType="win.binary") # processx doesn't have a binary for 
UCRT yet
           install.packages(c("remotes", "rcmdcheck"))
           remotes::install_deps("r", dependencies = TRUE)
+      - name: Restore DESCRIPTION for 3.6

Review comment:
       I'm curious, what is this step for?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to